diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..eb7c859 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM harbor.ervine.dev/public/alpinev3.13 + +LABEL maintainer="Jonathan Ervine " + +# Install updates +ENV LANG='en_US.UTF-8' \ + LANGUAGE='en_US.UTF-8' \ + TERM='xterm' \ + VERSION='0.1' \ + TAUT_USER='filemon' \ + TAUT_UID=1027 \ + TAUT_GID=1027 + +RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ + apk update && \ + apk -U upgrade --ignore alpine-baselayout && \ + apk -U add python3 git py-setuptools inotify-tools + +# +# Add named init script. +# + +CMD [ "/usr/bin/sleep", "3600" ] diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..d59a020 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,38 @@ +podTemplate(yaml: """ +kind: Pod +spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + 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/x86_64-alpine-inotify.git', credentialsId: 'jenkins-to-git' + container('kaniko') { + sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/alpine/inotify:v0.1 --destination=harbor.ervine.dev/public/x86_64/alpine/inotify:0.1' + } + } + stage('Notify gchat') { + hangoutsNotify message: "Alpine Linux container with inotify file watcher 0.1 has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false + } + } +} +