-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buildDockerImage() #147
buildDockerImage() #147
Conversation
@halkeye Could you please merge it with the master? |
yay green again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
stage("Build") { | ||
steps { | ||
script { | ||
GIT_COMMIT_REV = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'%h'").trim() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this already added by declarative pipeline or is it too long?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/shrug
is it? its not super googleable
stage("Deploy master as latest") { | ||
when { branch "master" } | ||
steps { | ||
sh "docker tag ${config.registry}${imageName} ${config.registry}${imageName}:master" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is a master tag needed as well as latest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, latest really could be anything, while master is master branch
But yea, i donno, i mostly copy and pasted it from my own shared pipeline which had this, but I'm not sure i ever used anything other than latest and tag
Co-authored-by: Tim Jacomb <t.jacomb@kainos.com>
I did no such thing, I guess every new commit dismisses it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a great starting point and enhancement for our build flows. Thanks!
Created new pipeline (based on my own shared lib)
Also upgraded the base unit test framework so it can test declarative pipelines, and renamed checkout to checkoutSCM so the testing framework doesn't conflict with it.