Using type: after results in steps with duplicate names in the pipeline.
Here is a sample jenkins-x.yml to place in a javascript project which adds an after step to the npmrc step:
pipelineConfig:
extends:
import: kubernetes
file: javascript/pipeline.yaml
pipelines:
overrides:
- pipeline: pullRequest
stage: build
name: npmrc
type: after
step:
sh: cp /builder/home/.npmrc /workspace/source/.npmrc
name: npmrc-copy
image: jenkinsxio/jx:2.0.119
It should copy the npmrc file after the npmrc step has completed.
Log from pipelinerunner:
{"level":"error","msg":"failed to create effective project configuration: effective pipeline creation failed: failed to create effective pipeline for pull request: validation failed for Pipeline: step names within a stage must be unique: stages[0].steps\nThe following step names in the stage from-build-pack are used more than once: build-npmrc","time":"2019-07-02T19:17:11Z"}
The output of jx version is:
NAME VERSION
jx 2.0.381-dev+799c1f2f2
Kubernetes cluster v1.13.5
kubectl v1.14.1
helm client Client: v2.13.1+g618447c
git git version 2.20.1
Operating System Ubuntu 19.04
AKS
Ubuntu 19.04
my experience after the last few hours of trying to override build steps, is that the whole override process is busted. doesn't seem to override anything from the pipeline config as expected per documentation.
Stick everything in the build pipeline and specify buildPack: none and it should work
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close
@jenkins-x-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue with/reopen.
Mark the issue as fresh with/remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.
Most helpful comment
my experience after the last few hours of trying to override build steps, is that the whole override process is busted. doesn't seem to override anything from the pipeline config as expected per documentation.