Skip to content
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

Merged
merged 6 commits into from
May 26, 2020
Merged

Conversation

halkeye
Copy link
Member

@halkeye halkeye commented May 25, 2020

Created new pipeline (based on my own shared lib)

buildDockerImage("plugin-site-api")

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.

@halkeye halkeye requested a review from a team May 25, 2020 17:29
@oleg-nenashev
Copy link
Contributor

@halkeye Could you please merge it with the master?

@halkeye
Copy link
Member Author

halkeye commented May 25, 2020

yay green again

README.adoc Outdated Show resolved Hide resolved
timja
timja previously approved these changes May 26, 2020
Copy link
Member

@timja timja left a 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()
Copy link
Member

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?

Copy link
Member Author

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"
Copy link
Member

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?

Copy link
Member Author

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

vars/buildDockerImage.groovy Outdated Show resolved Hide resolved
Co-authored-by: Tim Jacomb <t.jacomb@kainos.com>
@halkeye
Copy link
Member Author

halkeye commented May 26, 2020

halkeye dismissed timja’s stale review via b2e941d 2 minutes ago

I did no such thing, I guess every new commit dismisses it?

Copy link
Contributor

@oleg-nenashev oleg-nenashev left a 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!

@oleg-nenashev oleg-nenashev merged commit c88ea13 into jenkins-infra:master May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants