Jenkinsfile added
This commit is contained in:
parent
e415b20b80
commit
1004be8a52
37
Jenkinsfile
vendored
Normal file
37
Jenkinsfile
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
pipeline {
|
||||
// parameters {
|
||||
// string defaultValue: '2.462.2-jdk17', name: 'jenkinsTag', trim: true, description: 'Jenkins base image tag to use'
|
||||
// }
|
||||
agent {
|
||||
kubernetes {
|
||||
yaml """
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
spec:
|
||||
containers:
|
||||
- name: kaniko
|
||||
image: gcr.io/kaniko-project/executor:latest
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- sleep
|
||||
args:
|
||||
- 1d
|
||||
volumeMounts:
|
||||
- name: kaniko-secret
|
||||
mountPath: /kaniko/.docker
|
||||
volumes:
|
||||
- name: kaniko-secret
|
||||
secret:
|
||||
secretName: build-kubix-harbor-registry-credentials
|
||||
"""
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('Build and Push Image with Kaniko') {
|
||||
steps {
|
||||
sh 'echo $PATH'
|
||||
sh '/kaniko/executor --dockerfile=./Dockerfile --context=dir://. --destination=https://harbor.kubix.siatel.ro/builds/jenkins:${jenkinsTag}-plus'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user