Compare commits
7 Commits
f117f82ec0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| c6ae2f5532 | |||
| 3e5f4c7565 | |||
| 688b7f2385 | |||
| 327db39cb0 | |||
| 369ce1eccb | |||
| dd96371917 | |||
| 0f4a6381e1 |
@ -8,9 +8,9 @@ RUN apk add --no-cache python3 py-pip openssl ca-certificates bash git sudo zip
|
||||
&& apk --no-cache add sshpass openssh-client \
|
||||
&& apk del build-dependencies
|
||||
|
||||
RUN addgroup -S ansible && adduser -S ansible -G ansible
|
||||
USER ansible
|
||||
WORKDIR /home/ansible
|
||||
RUN addgroup -S jenkins && adduser -S jenkins -G jenkins && mkdir -p /home/jenkins/agent
|
||||
USER jenkins
|
||||
WORKDIR /home/jenkins/agent
|
||||
|
||||
CMD ["ansible-playbook", "--version"]
|
||||
|
||||
|
||||
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
podLabel = "image-build-${UUID.randomUUID()}"
|
||||
containerRegistry = 'docker.home.thejimnicholson.com/ansible-playbook-runner'
|
||||
containerRegistry = 'cr.thejimnicholson.com/tjn'
|
||||
containerImage = 'ansible-playbook-runner'
|
||||
|
||||
podTemplate(label: podLabel, containers: [
|
||||
@ -11,7 +11,8 @@ podTemplate(label: podLabel, containers: [
|
||||
command: 'sleep',
|
||||
args: '30d'
|
||||
)
|
||||
], workspaceVolume: dynamicPVC()) {
|
||||
], volumes: [secretVolume(secretName: 'cr-regcred', mountPath: '/kaniko/.docker')],
|
||||
workspaceVolume: dynamicPVC()) {
|
||||
node(podLabel) {
|
||||
stage('Checkout') {
|
||||
checkout scm
|
||||
@ -30,7 +31,7 @@ podTemplate(label: podLabel, containers: [
|
||||
--insecure \
|
||||
--skip-tls-verify \
|
||||
--tarPath ./${containerImage}-${GIT_TAG}.image.tar \
|
||||
--destination=${containerRegistry}/${containerImage}:${GIT_HASH} \
|
||||
--destination=${containerRegistry}/${containerImage}:${GIT_TAG} \
|
||||
--destination=${containerRegistry}/${containerImage}:latest"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user