#493 Let's try to migrate to fedora-30 in Jenkins and Docker files
Closed 4 years ago by gnaponie. Opened 4 years ago by gnaponie.
gnaponie/freshmaker fedora30  into  master

file modified
+4 -4
@@ -1,4 +1,4 @@ 

- FROM fedora:29

+ FROM fedora:30

  LABEL \

      name="Freshmaker application" \

      vendor="Freshmaker developers" \
@@ -11,13 +11,13 @@ 

  

  RUN cd /etc/yum.repos.d/ \

      && dnf -v -y install 'dnf-command(config-manager)' \

-     && dnf config-manager --add-repo http://download-ipv4.eng.brq.redhat.com/rel-eng/RCMTOOLS/latest-RCMTOOLS-2-F-29/compose/Everything/x86_64/os/ \

+     && dnf config-manager --add-repo http://download-ipv4.eng.brq.redhat.com/rel-eng/RCMTOOLS/latest-RCMTOOLS-2-F-30/compose/Everything/x86_64/os/ \

      && dnf -y clean all \

      && dnf -v --nogpg -y install \

      httpd python3-mod_wsgi mod_auth_gssapi python3-rhmsg mod_ssl python3-odcs-client \

      /tmp/$(basename $freshmaker_rpm) \

-     && dnf -y -v downgrade https://kojipkgs.fedoraproject.org//packages/qpid-proton/0.26.0/1.fc29/x86_64/qpid-proton-c-0.26.0-1.fc29.x86_64.rpm \

-     https://kojipkgs.fedoraproject.org//packages/qpid-proton/0.26.0/1.fc29/x86_64/python3-qpid-proton-0.26.0-1.fc29.x86_64.rpm \

+     && dnf -y -v downgrade https://kojipkgs.fedoraproject.org//packages/qpid-proton/0.26.0/1.fc30/x86_64/qpid-proton-c-0.26.0-1.fc30.x86_64.rpm \

+     https://kojipkgs.fedoraproject.org//packages/qpid-proton/0.26.0/1.fc30/x86_64/python3-qpid-proton-0.26.0-1.fc30.x86_64.rpm \

      && dnf -y -v upgrade https://kojipkgs.fedoraproject.org/packages/kobo/0.10.0/1.fc31/noarch/python3-kobo-0.10.0-1.fc31.noarch.rpm \

      https://kojipkgs.fedoraproject.org/packages/kobo/0.10.0/1.fc31/noarch/python3-kobo-rpmlib-0.10.0-1.fc31.noarch.rpm \

      && dnf -y clean all \

file modified
+11 -11
@@ -42,7 +42,7 @@ 

  

      timestamps {

  

- node('fedora-29') {

+ node('fedora-30') {

      stage('Prepare') {

          checkout scm

          sh 'sudo rm -f rpmbuild-output/*.src.rpm'
@@ -118,11 +118,11 @@ 

          parallel (

              'F29': {

                  sh """

-                 mkdir -p mock-result/f29

-                 flock /etc/mock/fedora-29-x86_64.cfg \

-                 /usr/bin/mock -v --enable-network --resultdir=mock-result/f29 -r fedora-29-x86_64 --clean --rebuild rpmbuild-output/*.src.rpm

+                 mkdir -p mock-result/f30

+                 flock /etc/mock/fedora-30-x86_64.cfg \

+                 /usr/bin/mock -v --enable-network --resultdir=mock-result/f30 -r fedora-30-x86_64 --clean --rebuild rpmbuild-output/*.src.rpm

                  """

-                 archiveArtifacts artifacts: 'mock-result/f29/**'

+                 archiveArtifacts artifacts: 'mock-result/f30/**'

              },

          )

      }
@@ -132,11 +132,11 @@ 

      stage('Build Docker container') {

          checkout scm

          // Remember to reflect the version change in the Dockerfile in the future.

-         sh 'grep -q "FROM fedora:29" Dockerfile'

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

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

+         sh 'grep -q "FROM fedora:30" Dockerfile'

+         unarchive mapping: ['mock-result/f30/': '.']

+         def f30_rpm = findFiles(glob: 'mock-result/f30/**/*.noarch.rpm')[0]

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

-             rpm2cpio ${f29_rpm} | \

+             rpm2cpio ${f30_rpm} | \

              cpio --quiet --extract --to-stdout ./usr/lib/python\\*/site-packages/freshmaker\\*.egg-info/PKG-INFO | \

              awk '/^Version: / {print \$2}'

          """).trim()
@@ -150,7 +150,7 @@ 

              /* Note that the docker.build step has some magic to guess the

               * Dockerfile used, which will break if the build directory (here ".")

               * is not the final argument in the string. */

-             def image = docker.build "factory2/freshmaker:internal-${appversion}", "--build-arg freshmaker_rpm=$f29_rpm --build-arg cacert_url=https://password.corp.redhat.com/RH-IT-Root-CA.crt ."

+             def image = docker.build "factory2/freshmaker:internal-${appversion}", "--build-arg freshmaker_rpm=$f30_rpm --build-arg cacert_url=https://password.corp.redhat.com/RH-IT-Root-CA.crt ."

              /* Pushes to the internal registry can sometimes randomly fail

               * with "unknown blob" due to a known issue with the registry

               * storage configuration. So we retry up to 3 times. */
@@ -162,7 +162,7 @@ 

          docker.withRegistry(

                  'https://quay.io/',

                  'quay-io-factory2-builder-sa-credentials') {

-             def image = docker.build "factory2/freshmaker:${appversion}", "--build-arg freshmaker_rpm=$f29_rpm ."

+             def image = docker.build "factory2/freshmaker:${appversion}", "--build-arg freshmaker_rpm=$f30_rpm ."

              image.push()

          }

          /* Save container version for later steps (this is ugly but I can't find anything better...) */

this is a test. Please wait merging this PR

Pull-Request has been closed by gnaponie

4 years ago

Pull-Request has been reopened by gnaponie

4 years ago

I'm testing this in Jenkins.

Reverting this PR. The issue is that fedora-30 nodes are not available in rcm-jenkins.

Pull-Request has been closed by gnaponie

4 years ago