#588 Drop unsupported docker builds from Jenkins job
Merged 3 years ago by lholecek. Opened 3 years ago by lholecek.
lholecek/greenwave drop-jenkins-image-build  into  master

file modified
-42
@@ -128,32 +128,6 @@ 

          }

      }

  }

- node('docker') {

-     checkout scm

-     stage('Build Docker container') {

-         def appversion = sh(returnStdout: true, script: './get-version.sh').trim()

-         // Set the derived version in __init__.py

-         sh """

-         sed --regexp-extended --in-place \

-             -e "/^__version__ = /c\\__version__ = '${appversion}'" greenwave/__init__.py

-         """.trim()

-         /* Git builds will have a version like 0.3.2.dev1+git.3abbb08 following

-          * the rules in PEP440. But Docker does not let us have + in the tag

-          * name, so let's munge it here. */

-         appversion = appversion.replace('+', '-')

-         sh 'docker image prune -a -f'

-         /* 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}", "."

-             image.push()

-         }

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

-         writeFile file: 'appversion', text: appversion

-         archiveArtifacts artifacts: 'appversion'

-     }

- }

  

  node('fedora-29') {

      checkout scm
@@ -252,22 +226,6 @@ 

      }

  }

  

- node('docker') {

-     checkout scm

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

-         stage('Tag "latest".') {

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

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

-             docker.withRegistry(

-                     'https://quay.io/',

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

-                 def image = docker.image("factory2/greenwave:${appversion}")

-                 image.push('latest')

-             }

-         }

-     }

- }

- 

  } // end of timestamps

  } catch (e) {

      // since the result isn't set until after the pipeline script runs, we must set it here if it fails

JIRA: RHELWF-1647
Signed-off-by: Lukas Holecek hluk@email.cz

What instead?

Hopefully automated Quay builds (RHELWF-1647); manual builds if it would not be possible. Anyway, this is needed to fix the Jenkins job.

rebased onto 9bf754c8cfd3d44f0bcc1d43cfc5ea3bb32096f8

3 years ago

rebased onto aebbd96

3 years ago

Pull-Request has been merged by lholecek

3 years ago
Metadata