Pull request Jenkins build ignores updates to Jenkinsfile
Summary
Jenkins build for Pull Request fails because Jenkinsfile from target branch is used
Steps to reproduce
Start the job
What is the current bug behavior?
Observe how pipeline step "node" prints "image: "basilevs/ubuntu-rcptt:3.6.2"
In a nested step mvn command fails:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:4.0.9:build-qualifier (default-build-qualifier) on project org.eclipse.rcptt.updates.aspectj.e44x: The plugin org.eclipse.tycho:tycho-packaging-plugin:4.0.9 requires Maven version 3.9.0 -> [Help 1]
00:10:00 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:4.0.9:build-qualifier (default-build-qualifier) on project org.eclipse.rcptt.updates.aspectj.e44x: The plugin org.eclipse.tycho:tycho-packaging-plugin:4.0.9 requires Maven version 3.9.0
What is the expected correct behavior?
The corresponding Jenkinsfile line in replaced in the Pull Request The new line is
image: basilevs/ubuntu-rcptt:3.6.3
The Pull request is created by a project committer, the security concern should not be in play. So the expected behavior is loading a newer image tag, where Maven is updated
Relevant logs and/or screenshots
Still waiting to schedule task
Waiting for next available executor on ‘rcptt-build-agent-3.5.4’
Agent rcptt-build-agent-3.5.4-fr92k-jltkq is provisioned from template rcptt-build-agent-3.5.4-fr92k
---
apiVersion: "v1"
kind: "Pod"
metadata:
annotations:
kubernetes.jenkins.io/last-refresh: "1739477271962"
buildUrl: "http://jenkins-ui.rcptt.svc.cluster.local/rcptt/job/Pull_requests/job/release%252F2.5/10/"
runUrl: "job/Pull_requests/job/release%252F2.5/10/"
labels:
jenkins: "slave"
jenkins/label-digest: "dd582513a490ff9fc4c2e94811ba076aeacc6a4a"
jenkins/label: "rcptt-build-agent-3_5_4"
kubernetes.jenkins.io/controller: "http___jenkins-ui_rcptt_svc_cluster_local_rcpttx"
name: "rcptt-build-agent-3.5.4-fr92k-jltkq"
namespace: "rcptt"
spec:
containers:
- env:
- name: "MAVEN_OPTS"
value: "-Duser.home=/home/jenkins"
- name: "XDG_CONFIG_HOME"
value: "/tmp"
image: "basilevs/ubuntu-rcptt:3.6.2"
name: "ubuntu"
resources:
limits:
memory: "4Gi"
cpu: "1"
requests:
memory: "4Gi"
cpu: "1"
tty: true
volumeMounts:
- mountPath: "/home/jenkins/.m2/settings.xml"
name: "settings-xml"
readOnly: true
subPath: "settings.xml"
- mountPath: "/home/jenkins/.m2/settings-security.xml"
name: "settings-security-xml"
readOnly: true
subPath: "settings-security.xml"
- mountPath: "/home/jenkins/.m2/repository"
name: "m2-repo"
- mountPath: "/home/jenkins/agent"
name: "workspace-volume"
readOnly: false
- env:
- name: "JENKINS_SECRET"
value: "********"
- name: "JENKINS_TUNNEL"
value: "jenkins-discovery.rcptt.svc.cluster.local:50000"
- name: "JENKINS_AGENT_NAME"
value: "rcptt-build-agent-3.5.4-fr92k-jltkq"
- name: "REMOTING_OPTS"
value: "-noReconnectAfter 1d"
- name: "JENKINS_NAME"
value: "rcptt-build-agent-3.5.4-fr92k-jltkq"
- name: "JENKINS_AGENT_WORKDIR"
value: "/home/jenkins/agent"
- name: "JENKINS_URL"
value: "http://jenkins-ui.rcptt.svc.cluster.local/rcptt/"
image: "docker.io/eclipsecbi/jiro-agent-basic-ubuntu:remoting-3261.v9c670a_4748a_9"
name: "jnlp"
resources:
requests:
memory: "256Mi"
cpu: "100m"
volumeMounts:
- mountPath: "/home/jenkins/agent"
name: "workspace-volume"
readOnly: false
nodeSelector:
kubernetes.io/os: "linux"
restartPolicy: "Never"
volumes:
- name: "settings-security-xml"
secret:
items:
- key: "settings-security.xml"
path: "settings-security.xml"
secretName: "m2-secret-dir"
- emptyDir: {}
name: "m2-repo"
- name: "settings-xml"
secret:
items:
- key: "settings.xml"
path: "settings.xml"
secretName: "m2-secret-dir"
- emptyDir:
medium: ""
name: "workspace-volume"
Running on rcptt-build-agent-3.5.4-fr92k-jltkq in /home/jenkins/agent/workspace/Pull_requests_PR-92
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:4.0.9:build-qualifier (default-build-qualifier) on project org.eclipse.rcptt.updates.aspectj.e44x: The plugin org.eclipse.tycho:tycho-packaging-plugin:4.0.9 requires Maven version 3.9.0 -> [Help 1]
00:10:00 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:4.0.9:build-qualifier (default-build-qualifier) on project org.eclipse.rcptt.updates.aspectj.e44x: The plugin org.eclipse.tycho:tycho-packaging-plugin:4.0.9 requires Maven version 3.9.0
Priority
-
Urgent -
High -
Medium -
Low
Severity
-
Blocker -
Major -
Normal -
Low
Impact
Can't update target platforms in Eclipse Platform based projects, as they require updates of Tycho, which requires updates of Maven. The changes are atomic in nature - attempting to implement them out of sync breaks the build.
RCPTT project is struggling with platform updates for a long time, so there is no particular rush to fix the problem immediately.
I've seen similar issues in SWT project, where JVM could not be updated, but tests were bound to JVM version. I assumed that this problem would only affect non-commiters then.
I realize that the problem is likely caused by a policy. In that case, it would be nice to get instructions on how changes to Jenkinsfile should normally be done.
