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

fix: REPLACE_ME build pack placeholders should work with modern syntax #6700

Merged

Conversation

abayer
Copy link
Contributor

@abayer abayer commented Feb 6, 2020

Submitter checklist

  • Change is code complete and matches issue description.
  • Change is covered by existing or new tests.

Description

We were replacing the REPLACE_ME_* placeholders in directories in lifecycle-based pipeline.yaml syntax, but not in pipeline-based syntax in pipeline.yaml, so let's, y'know, do that.

Special notes for the reviewer(s)

/assign @hferentschik

Which issue this PR fixes

fixes #6698

DockerRegistryOrg string
}

func (j *ParsedPipeline) ReplacePlaceholdersInStepAndStageDirs(args StepPlaceholderReplacementArgs) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

exported method ParsedPipeline.ReplacePlaceholdersInStepAndStageDirs should have comment or be unexported

@abayer abayer force-pushed the replace-placeholder-buildpack-jx-syntax branch 2 times, most recently from a202dd9 to 36cdc41 Compare February 6, 2020 09:19
@abayer
Copy link
Contributor Author

abayer commented Feb 6, 2020

/retest

fixes jenkins-x#6698

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
@abayer abayer force-pushed the replace-placeholder-buildpack-jx-syntax branch from 36cdc41 to 1b2cc1a Compare February 6, 2020 10:10
@abayer
Copy link
Contributor Author

abayer commented Feb 6, 2020

/retest

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
}

// modifyStep allows a container step to be modified to do something different
func (s *Step) modifyStep(params StepPlaceholderReplacementArgs) {

Choose a reason for hiding this comment

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

Gee, I was not aware of how tightly the buildpack setup is tied in here. So changes to build packs might have very unexpected side effects. Either when we try to change them or when a user tries to customize.

I realize though that we are just moving code here.

Would it potentially not better to move this somehow out and let the user make a choice, by for example choosing a specific build-pack w/ or w/o kaniko? I seem to recall @garethjevans saying that it would be nice to get this out, but that it would not be so easy?

@hferentschik
Copy link

/lgtm

@jenkins-x-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hferentschik

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jenkins-x-bot jenkins-x-bot merged commit 3b4d5aa into jenkins-x:master Feb 7, 2020
abayer added a commit to abayer/jx that referenced this pull request Feb 9, 2020
Missed this earlier in jenkins-x#6700. Also, when we're converting from a build
pack using `jenkins-x.yml` syntax, set the stage directory when
unset to the default if the stage contains steps, so we don't need to
put a redundant directory on each step in that stage. This logic could
probably be improved a bit, but it generates effective syntax that
works and is what I would expect it to be.

fixes jenkins-x#6717

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
jenkins-x-bot pushed a commit that referenced this pull request Feb 10, 2020
Missed this earlier in #6700. Also, when we're converting from a build
pack using `jenkins-x.yml` syntax, set the stage directory when
unset to the default if the stage contains steps, so we don't need to
put a redundant directory on each step in that stage. This logic could
probably be improved a bit, but it generates effective syntax that
works and is what I would expect it to be.

fixes #6717

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
daveconde pushed a commit to daveconde/jx that referenced this pull request Apr 7, 2020
Missed this earlier in jenkins-x#6700. Also, when we're converting from a build
pack using `jenkins-x.yml` syntax, set the stage directory when
unset to the default if the stage contains steps, so we don't need to
put a redundant directory on each step in that stage. This logic could
probably be improved a bit, but it generates effective syntax that
works and is what I would expect it to be.

fixes jenkins-x#6717

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
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.

REPLACE_ME placeholders in buildpacks using modern syntax aren't replaced
4 participants