Compare commits

..

7 Commits

Author SHA1 Message Date
c6ae2f5532 Secrets are hard
All checks were successful
Homelab/ansible-playbook-runner/pipeline/head This commit looks good
2022-02-21 00:41:01 -08:00
3e5f4c7565 let's try it here.
Some checks failed
Homelab/ansible-playbook-runner/pipeline/head There was a failure building this commit
2022-02-21 00:34:53 -08:00
688b7f2385 Try using nexus
Some checks failed
Homelab/ansible-playbook-runner/pipeline/head There was a failure building this commit
2022-02-21 00:28:21 -08:00
327db39cb0 Use right ip
All checks were successful
Homelab/ansible-playbook-runner/pipeline/head This commit looks good
2022-01-20 15:43:51 -08:00
369ce1eccb Switch maybe to ip address
Some checks failed
Homelab/ansible-playbook-runner/pipeline/head There was a failure building this commit
2022-01-20 15:17:40 -08:00
dd96371917 Change default user
Some checks failed
Homelab/ansible-playbook-runner/pipeline/head There was a failure building this commit
2022-01-19 21:45:12 -08:00
0f4a6381e1 Fix name
All checks were successful
Homelab/ansible-playbook-runner/pipeline/head This commit looks good
2022-01-19 18:15:01 -08:00
2 changed files with 7 additions and 6 deletions

View File

@ -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
View File

@ -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"
}
}