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

Only publish Windows images on the master branch #93

Merged
merged 1 commit into from
Oct 23, 2019
Merged

Only publish Windows images on the master branch #93

merged 1 commit into from
Oct 23, 2019

Conversation

slide
Copy link
Member

@slide slide commented Oct 23, 2019

Currently all PR's will publish windows images, making it only happen on master

Currently all PR's will publish windows images, making it only happen on master
@slide slide merged commit dde4b44 into jenkinsci:master Oct 23, 2019
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Declarative there is a syntax you can use to do a stage or a post conditionally on master, but here you need a script anyway.

powershell '& ./make.ps1 publish'
powershell '& ./make.ps1 build'

def branchName = "${env.BRANCH_NAME}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def branchName = "${env.BRANCH_NAME}"
def branchName = BRANCH_NAME

and inline.

powershell '& ./make.ps1 build'

def branchName = "${env.BRANCH_NAME}"
if (branchName ==~ 'master') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (branchName ==~ 'master') {
if (branchName == 'master') {

@oleg-nenashev oleg-nenashev changed the title Only publish on master Only publish Windows images on the master branch Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants