From c580be8b08f957def23189540830fd37e2fb931f Mon Sep 17 00:00:00 2001
From: Ralph Bean <rbean@redhat.com>
Date: May 01 2018 14:24:49 +0000
Subject: [PATCH 1/2] F28 is released.  :)


---

diff --git a/Dockerfile b/Dockerfile
index f0495fa..ec15310 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM fedora:27
+FROM fedora:28
 LABEL \
     name="Greenwave application" \
     vendor="Greenwave developers" \
diff --git a/Jenkinsfile b/Jenkinsfile
index b881cb6..83ced8c 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -53,14 +53,6 @@ node('fedora') {
      * time, which will error out. */
     stage('Build RPM') {
         parallel (
-            'F26': {
-                sh """
-                mkdir -p mock-result/f26
-                flock /etc/mock/fedora-26-x86_64.cfg \
-                /usr/bin/mock -v --enable-network --resultdir=mock-result/f26 -r fedora-26-x86_64 --clean --rebuild rpmbuild-output/*.src.rpm
-                """
-                archiveArtifacts artifacts: 'mock-result/f26/**'
-            },
             'F27': {
                 sh """
                 mkdir -p mock-result/f27
@@ -69,26 +61,34 @@ node('fedora') {
                 """
                 archiveArtifacts artifacts: 'mock-result/f27/**'
             },
+            'F28': {
+                sh """
+                mkdir -p mock-result/f28
+                flock /etc/mock/fedora-28-x86_64.cfg \
+                /usr/bin/mock -v --enable-network --resultdir=mock-result/f28 -r fedora-28-x86_64 --clean --rebuild rpmbuild-output/*.src.rpm
+                """
+                archiveArtifacts artifacts: 'mock-result/f28/**'
+            },
         )
     }
     stage('Invoke Rpmlint') {
         parallel (
-            'F26': {
-                sh 'rpmlint -f rpmlint-config.py mock-result/f26/*.rpm'
-            },
             'F27': {
                 sh 'rpmlint -f rpmlint-config.py mock-result/f27/*.rpm'
             },
+            'F28': {
+                sh 'rpmlint -f rpmlint-config.py mock-result/f28/*.rpm'
+            },
         )
     }
 }
 node('docker') {
     checkout scm
     stage('Build Docker container') {
-        unarchive mapping: ['mock-result/f26/': '.']
-        def f26_rpm = findFiles(glob: 'mock-result/f26/**/*.noarch.rpm')[0]
+        unarchive mapping: ['mock-result/f28/': '.']
+        def f28_rpm = findFiles(glob: 'mock-result/f28/**/*.noarch.rpm')[0]
         def appversion = sh(returnStdout: true, script: """
-            rpm2cpio ${f26_rpm} | \
+            rpm2cpio ${f28_rpm} | \
             cpio --quiet --extract --to-stdout ./usr/lib/python2.7/site-packages/greenwave\\*.egg-info/PKG-INFO | \
             awk '/^Version: / {print \$2}'
         """).trim()
@@ -102,14 +102,14 @@ node('docker') {
             /* 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/greenwave:internal-${appversion}", "--build-arg greenwave_rpm=$f26_rpm --build-arg cacert_url=https://password.corp.redhat.com/RH-IT-Root-CA.crt ."
+            def image = docker.build "factory2/greenwave:internal-${appversion}", "--build-arg greenwave_rpm=$f28_rpm --build-arg cacert_url=https://password.corp.redhat.com/RH-IT-Root-CA.crt ."
             image.push()
         }
         /* Build and push the same image with the same tag to quay.io, but without the cacert. */
         docker.withRegistry(
                 'https://quay.io/',
                 'quay-io-factory2-builder-sa-credentials') {
-            def image = docker.build "factory2/greenwave:${appversion}", "--build-arg greenwave_rpm=$f26_rpm ."
+            def image = docker.build "factory2/greenwave:${appversion}", "--build-arg greenwave_rpm=$f28_rpm ."
             image.push()
         }
         /* Save container version for later steps (this is ugly but I can't find anything better...) */

From 80fd007ce89dcf141195bfec8eafd920a8ef3d0b Mon Sep 17 00:00:00 2001
From: Ralph Bean <rbean@redhat.com>
Date: May 01 2018 17:05:36 +0000
Subject: [PATCH 2/2] Get /etc/mock/fedora-28-x86_64.cfg


---

diff --git a/Jenkinsfile b/Jenkinsfile
index 83ced8c..a72f822 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -9,6 +9,8 @@ node('fedora') {
     checkout scm
     sh 'sudo dnf -y builddep greenwave.spec'
     sh 'sudo dnf -y install python2-flake8 python2-pylint python2-sphinx python-sphinxcontrib-httpdomain'
+    /* Needed to get the latest /etc/mock/fedora-28-x86_64.cfg */
+    sh 'sudo dnf -y update mock-core-configs'
     stage('Invoke Flake8') {
         sh 'flake8'
     }

