Bug 1371493 - Changing JenkinsPipeline BC Jenkinsfile will affect finished jenkinsPipeline builds
Summary: Changing JenkinsPipeline BC Jenkinsfile will affect finished jenkinsPipeline ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Management Console
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-30 10:28 UTC by Yadan Pei
Modified: 2017-05-30 12:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-30 12:48:17 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Yadan Pei 2016-08-30 10:28:36 UTC
Description of problem:
When editing JenkinsPipeline BC,its finished builds configurations are also changed, this is wrong

Version-Release number of selected component (if applicable):
openshift v1.3.0-alpha.3+d8c9694
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

How reproducible:
Always

Steps to Reproduce:
1. Create JenkinsPipeline BC and trigger builds
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/image-streams/image-streams-centos7.json -n openshift
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/jenkins-ephemeral-template.json
$ oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.json
$ oc new-app jenkins-ephemeral
$ oc start-build sample-pipeline 
2. When sample-pipeline #1 is finished, access BC edit page at /edit/pipelines/sample-pipeline, change the Jenkinsfile content, such as add stage 'test'
node('maven') {
stage 'build'
.....
stage 'test'
echo "this is test"
.....
}

3. Click "Save' on BC edit page
4. Check BC 'sample-pipeline' page about Jenkinsfile content
5. Check build sample-pipeline #1 page about Jenkinsfile content

Actual results:
4. On BC 'sample-pipeline' page, Jenkinsfile is shown with new changes
node('maven') {
stage 'build'
.....
stage 'test'
echo "this is test"
.....
}
5. For finished sample-pipeline #1 build, Jenkinsfile content is also shown with new changes
node('maven') {
stage 'build'
.....
stage 'test'
echo "this is test"
.....
}

Expected results:
5. Editing BC should not change its finished builds configurations

Additional info:
CLI could show correct Jenkinsfile about build sample-pipeline #1
# oc get builds sample-pipeline #1 -o yaml
node('maven') {
stage 'build'
...
state 'deploy'
..
}

Comment 1 Samuel Padgett 2016-09-16 19:34:21 UTC
We're incorrectly showing the build config Jenkinsfile instead of the build Jenkinsfile.

Comment 3 Yadan Pei 2016-10-14 03:12:12 UTC
Checked against latest origin-web-console(latest commit is b7fa730, manually vendored)

After changing Jenkinsfile of bc/sample-pipeline, Jenkinsfile for completed builds(#1) will not be updated, the changes only apply to new builds(#2...)

Move to VERIFIED

Comment 4 Li Zhe 2016-11-24 08:17:37 UTC
Reproduced on ded-stage-dcp 3.3.1.5
The running builds will also be effected.


Note You need to log in before you can comment on or make changes to this bug.