diff options
author | Christian Segundo | 2023-12-26 17:59:04 +0100 |
---|---|---|
committer | Christian Segundo | 2023-12-26 17:59:04 +0100 |
commit | e927466fbce654682463800868cf8961a80b4c3e (patch) | |
tree | 24a897ff45d5ce94c7665d856c5096e39bcfc1fd /Jenkinsfile | |
parent | b4631bc494c64f62994c48fbb06548251fd36224 (diff) | |
download | nvim-e927466fbce654682463800868cf8961a80b4c3e.tar.gz |
bb jenkins
Diffstat (limited to 'Jenkinsfile')
-rw-r--r-- | Jenkinsfile | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 22dd78e..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,97 +0,0 @@ -String cron_string = BRANCH_NAME == "master" ? "@daily" : "" -pipeline { - agent { - docker { - image 'quay.io/buildah/stable' - args '--privileged=true' - } - } - options { parallelsAlwaysFailFast() } - triggers { cron(cron_string) } - environment { - PROJECT = 'nvim' - IMAGE_NAME = "docker.io/chn2guevara/$PROJECT" - } - stages { - stage('Prepare') { - steps { - sh 'dnf install git -y' - script { - env.TAG_NAME = sh( - returnStdout: true, - script: 'git name-rev --name-only --tags HEAD | sed \'s/^undefined$//\'').trim() - } - } - } - stage('Manifest') { - steps { sh "buildah manifest create $PROJECT" } - } - stage('Build') { - parallel { - stage('arm64/v8 stable') { - steps { - sh""" - buildah build --pull --platform linux/arm64/v8 --network host \ - --tag $IMAGE_NAME:stable --build-arg NEOVIM_VERSION=stable \ - --manifest $PROJECT . - """ - } - } - stage('amd64 stable') { - steps { - sh""" - buildah build --pull --platform linux/amd64 --network host \ - --tag $IMAGE_NAME:stable --build-arg NEOVIM_VERSION=stable \ - --manifest $PROJECT . - """ - } - } - stage('arm64/v8 nightly') { - steps { - sh""" - buildah build --pull --platform linux/arm64/v8 --network host \ - --tag $IMAGE_NAME:nightly --build-arg NEOVIM_VERSION=nightly \ - --manifest $PROJECT . - """ - } - } - stage('amd64 nightly') { - steps { - sh""" - buildah build --pull --platform linux/amd64 --network host \ - --tag $IMAGE_NAME:nightly --build-arg NEOVIM_VERSION=nightly \ - --manifest $PROJECT . - """ - } - } - } - } - stage('docker.io login') { - when { branch 'master' } - steps { - withCredentials([string( - credentialsId: 'dockerhub-personal', - variable: 'CREDENTIALS') - ]) { - sh '''#!/bin/bash - IFS=" " read -r username password <<<"$CREDENTIALS" - buildah login \ - --username "$username" \ - --password-stdin <<< "$password" docker.io - ''' - } - } - } - stage('Push') { - when { branch 'master' } - parallel { - stage('stable') { - steps { sh "buildah manifest push --all $PROJECT docker://$IMAGE_NAME:stable" } - } - stage('nightly') { - steps { sh "buildah manifest push --all $PROJECT docker://$IMAGE_NAME:nightly" } - } - } - } - } -} |