SUSE / rookcheck

Apache License 2.0
4 stars 11 forks source link

Jenkinsfile.integration: add build number to cluster prefix #164

Closed kshtsk closed 4 years ago

kshtsk commented 4 years ago

Include build number in cluster prefix for PR triggered jobs.

Signed-off-by: Kyr Shatskyy kyrylo.shatskyy@suse.com

kshtsk commented 4 years ago

retest this please

kshtsk commented 4 years ago

@jhesketh My changes are not picked up by pipeline because of this:

Loading trusted files from base branch master at 88fa66928c34ba353566a71e20ee200c250157ce rather than f62fab6f9a52ff05210b07619e4c2a0bb44de2a8
Obtained Jenkinsfile.integration from 88fa66928c34ba353566a71e20ee200c250157ce
Jenkinsfile.integration’ has been modified in an untrusted revision
kshtsk commented 4 years ago

Changing the Jenkinsfile is equivalent to changing the job configuration. Only users with a certain level of trust should be allowed to do it.

Jenkins handles it that way: when changes to the Jenkinsfile are committed to a PR , Jenkins asks GitHub whether the PR author has the permission to push to the origin repository, if yes they are trusted, otherwise they are not.

Therefore there are 2 ways to handle this:

kshtsk commented 4 years ago

This is stupid, because I am as admin of Jenkins cannot change this behavior and add myself as trusted, given that I don't want to have push access to that particular repo.

kshtsk commented 4 years ago

retest this please

jhesketh commented 4 years ago

Hmm, I thought anybody in the SUSE github org had those permissions. Looks like the job is currently running.

kshtsk commented 4 years ago

@jhesketh no, the problem is not that the job is running, the problem is that Jenkinsfile.integration is not used, correspondingly it is not tested, another issue with this, is that job started and code and the tests are running and jenkins will report that tests are passed whatever is in Jenkinsfile.integration and can merge it by mistake.

jhesketh commented 4 years ago

Ah, I see! I'm not sure how I trigger it with the correct JenkinsFile though?

kshtsk commented 4 years ago

Ah, I see! I'm not sure how I trigger it with the correct JenkinsFile though?

@jhesketh The PR should be submitted by you or anyone who is admin for suse/rookcheck repo or has write access to it. I guess it is you, @toabctl and someone else.

jhesketh commented 4 years ago

I couldn't create a new PR from your repo because this one already exists. Instead I've pulled it into my personal fork and created one from there (https://github.com/SUSE/rookcheck/pull/165).