Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Jenkins git setup breaks checkcommits #40

Closed
jodh-intel opened this issue Jan 31, 2018 · 1 comment
Closed

Jenkins git setup breaks checkcommits #40

jodh-intel opened this issue Jan 31, 2018 · 1 comment
Labels

Comments

@jodh-intel
Copy link
Contributor

I was just viewing the logs for a PR earlier and noticed this alarming message from checkcommits:

Found 0 commits between commit HEAD and branch master

I bit of digging shows that the problem is caused by our git setup. Assumine a runtime PR, Jenkins is essentially doing this:

pr=1234
go get github.com/clearcontainers/runtime

git fetch origin "pull/${pr}/head"
git checkout master
git reset --hard FETCH_HEAD
git rebase origin/master

After the above, there is only 1 branch - master so checkcommits cannot compare the PR branch with master, and therefore finds zero commits to check.

We need to change the git setup to be something like this:

pr=1234
go get github.com/clearcontainers/runtime

git fetch origin "refs/pull/$pr/head:PR_${pr}"
git checkout "PR_${pr}"

/cc @grahamwhaley, @sboeuf, @chavafg.

@jodh-intel
Copy link
Contributor Author

jodh-intel commented Jan 31, 2018

The problem is the jenkins_job_build.sh setup script.

Closing this as it's now replaced by clearcontainers/tests#876.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant