diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bf8b799 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# Base on latest (edge) alpine image +FROM harbor.ervine.dev/library/x86_64/alpine/alpine:3.12 + +MAINTAINER “Jonathan Ervine” + +# Install updates +ENV LANG='en_US.UTF-8' \ + LANGUAGE='en_US.UTF-8' + +RUN apk update && apk -U upgrade --ignore alpine-baselayout && apk add python3 git openssh-client gcc python3-dev musl-dev libffi-dev openssl-dev + +VOLUME /data + +CMD [ "/bin/sh" ] diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..6931477 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,34 @@ +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 'https://git.ervine.org/jonny/kubespray-installer' + container('kaniko') { + sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/library/x86_64/alpine/htpc-mgr:latest --destination=harbor.ervine.dev/library/x86_64/alpine/htpc-mgr:3.12' + } + } + } +}