blob: 7539075e23ff9c8bc613b9479f6d0ba111d4f6c7 [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://${GERRIT_HOST}/${GERRIT_PROJECT} ${PROJECT}
cd ${PROJECT}
git fetch origin $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"
}
}
}
}
}