#373 Fix Jenkins CI vol #2
Merged 4 months ago by jkaluza. Opened 4 months ago by fivaldi.

file modified
+3 -3

@@ -43,8 +43,8 @@ 

      timestamps {

  

  node('fedora-29') {

-     checkout scm

      stage('Prepare') {

+         checkout scm

          sh 'sudo rm -f rpmbuild-output/*.src.rpm'

          sh 'mkdir -p rpmbuild-output'

          sh 'make -f .copr/Makefile srpm outdir=./rpmbuild-output/'

@@ -87,8 +87,8 @@ 

  }

  if ("${env.JOB_NAME}" != 'freshmaker-prs') {

  node('docker') {

-     checkout scm

      stage('Build Docker container') {

+         checkout scm

          unarchive mapping: ['mock-result/f29/': '.']

          def f29_rpm = findFiles(glob: 'mock-result/f29/**/*.noarch.rpm')[0]

          def appversion = sh(returnStdout: true, script: """

@@ -127,9 +127,9 @@ 

      }

  }

  node('docker') {

-     checkout scm

      if (scmVars.GIT_BRANCH == 'origin/master') {

          stage('Tag "latest".') {

+             checkout scm

              unarchive mapping: ['appversion': 'appversion']

              def appversion = readFile('appversion').trim()

              docker.withRegistry(

The behavior of the CI was a bit strange. The master node did the checkout correctly. The other nodes just checked out the origin/prod. the PR builds were done for this branch. The only correct thing was the description of the PR, because it was set on master node. Everything else was wrong.

The fix is to move the checkout inside of the first stage of each node.

rebased onto cd5c505f272a3f6ed581ec981b7863ec8b184f0d

4 months ago

rebased onto 38b1dc536239f204a1f0dc0fa941a38f344c575a

4 months ago

rebased onto 91a352b6a0a7571679f9ce2739a043d1ff6ac49a

4 months ago

rebased onto ef06d1538351b2d6f82036b6d072e86701b53160

4 months ago

rebased onto 561924b4b3fe068ea60c4bde044b16da896c7d99

4 months ago

rebased onto 87de808

4 months ago

Pull-Request has been merged by jkaluza

4 months ago