blob: 0a3430d3dcf6963f81c0c495999b3e783b26cdff [file] [log] [blame]
pipeline {
agent {
kubernetes {
yaml """
apiVersion: v1
kind: Pod
spec:
volumes:
- name: docker-auth
emptyDir: {}
containers:
- name: awscli
image: amazon/aws-cli
command: ['cat']
tty: true
volumeMounts:
- name: docker-auth
mountPath: /root/.docker
- name: buildah
image: quay.io/buildah/stable
command: ['cat']
tty: true
env:
- name: STORAGE_DRIVER
value: vfs
volumeMounts:
- name: docker-auth
mountPath: /root/.docker
"""
defaultContainer 'buildah'
}
}
stages {
stage('Build and Push Multiple Images') {
steps {
container('buildah') {
checkout scm
sh """
PROJECT="dockerfiles"
git clone https://${env.GERRIT_HOST}/${env.GERRIT_PROJECT} ${PROJECT}
cd ${PROJECT}
git fetch origin ${env.GERRIT_REFSPEC}
git checkout FETCH_HEAD
"""
sh "env"
sh "ci-dockerfiles-deployment/build-version.sh"
sh "ci-dockerfiles-deployment/builders.sh"
sh "ci-dockerfiles-deployment/report.sh"
}
}
}
}
}