First build
This commit is contained in:
parent
069d185c25
commit
52a709eed9
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
FROM quay.io/repository/ansible/ansible-runner:stable-2.9-devel
|
||||||
|
|
||||||
|
RUN pip3 install -r hvac && \
|
||||||
|
pip3 install -r psutil && \
|
||||||
|
pip3 install -r pymysql
|
||||||
|
|
||||||
|
VOLUME /runner
|
||||||
|
|
||||||
|
WORKDIR /runner
|
||||||
|
|
||||||
|
ENV HOME=/home/runner
|
||||||
|
|
||||||
|
ENTRYPOINT ["entrypoint"]
|
||||||
|
CMD ["ansible-runner", "run", "/runner"]
|
||||||
38
Jenkinsfile
vendored
Normal file
38
Jenkinsfile
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
podTemplate(yaml: """
|
||||||
|
kind: Pod
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: kaniko
|
||||||
|
image: gcr.io/kaniko-project/executor:debug-539ddefcae3fd6b411a95982a830d987f4214251
|
||||||
|
imagePullPolicy: Always
|
||||||
|
command:
|
||||||
|
- /busybox/cat
|
||||||
|
tty: true
|
||||||
|
volumeMounts:
|
||||||
|
- name: jenkins-docker-cfg
|
||||||
|
mountPath: /kaniko/.docker
|
||||||
|
volumes:
|
||||||
|
- name: jenkins-docker-cfg
|
||||||
|
projected:
|
||||||
|
sources:
|
||||||
|
- secret:
|
||||||
|
name: regcred
|
||||||
|
items:
|
||||||
|
- key: .dockerconfigjson
|
||||||
|
path: config.json
|
||||||
|
"""
|
||||||
|
) {
|
||||||
|
|
||||||
|
node(POD_LABEL) {
|
||||||
|
stage('Build with Kaniko') {
|
||||||
|
git url: 'ssh://git@git.ervine.org/jonny/ansible-runner.git', credentialsId: 'jenkins-to-git'
|
||||||
|
container('kaniko') {
|
||||||
|
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/ansible-runner-extra:2.9'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Notify gchat') {
|
||||||
|
hangoutsNotify message: "Ansible Runner with extra modules container has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user