Skip to content

Instantly share code, notes, and snippets.

@melvincv
Created February 13, 2023 07:32
Show Gist options
  • Save melvincv/e19955915e44a299c88004b9a6933a32 to your computer and use it in GitHub Desktop.
Save melvincv/e19955915e44a299c88004b9a6933a32 to your computer and use it in GitHub Desktop.
different syntax
This is from the DevOps Projects course:
https://www.udemy.com/course/devopsprojects/learn/lecture/33799740#notes
stage('Build App Image') {
steps {
script {
dockerImage = docker.build(appRegistry + ":$BUILD_NUMBER", "./Docker-files/app/multistage/")
}
}
}
This is from
https://docs.cloudbees.com/docs/admin-resources/latest/plugins/docker-workflow#docker-workflow-sect-build
node {
git '…' // checks out Dockerfile and some project sources
def newApp = docker.build "mycorp/myapp:${env.BUILD_TAG}"
newApp.push()
}
The different syntax in the documentation confuses me.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment