diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cf4241c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# Base on latest (edge) alpine image +FROM harbor.ervine.dev/library/x86_64/alpine/alpine-3.10 + +MAINTAINER “Jonathan Ervine” + +# Install updates +ENV LANG='en_US.UTF-8' \ + LANGUAGE='en_US.UTF-8' + +RUN apk update && apk -U upgrade && apk add python3 git + +VOLUME /data + +CMD [ "/bin/sh" ] diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..d26438f --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,18 @@ +node("docker-node") { + docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') { + + git branch: "3.10.3", url: "ssh://git@git.ervine.org:2222/jonny/alpine-kubespray-installer", credentialsId: 'jenkins-to-git' + + sh "git rev-parse HEAD > .git/commit-id" + def commit_id = readFile('.git/commit-id').trim() + println commit_id + + stage "build" + def app = docker.build "library/x86_64/alpine/kubespray" + + stage "publish" + app.push("${env.BUILD_NUMBER}") + app.push("latest") + app.push("3.10") + } +}