#373 Fix Jenkins CI vol #2
Merged a month ago by jkaluza. Opened a month 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 cd5c505

a month ago

rebased onto 38b1dc5

a month ago

rebased onto 91a352b

a month ago

rebased onto ef06d15

a month ago

rebased onto 561924b

a month ago

rebased onto 87de808

a month ago

Pull-Request has been merged by jkaluza

a month ago