commit b64e114b73de3996b60162e7de328c656b2257fa Author: dave Date: Thu Apr 21 21:20:54 2022 -0700 initial commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bcadbce --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM ubuntu:focal + +RUN apt-get update && \ + apt-get install -y wget && \ + cd /usr/local/bin && \ + wget -qO- https://github.com/harshavardhana/s3www/releases/download/v0.5.3/s3www_0.5.3_linux_amd64.tar.gz | tar zxvf - s3www + +ENTRYPOINT ["/usr/local/bin/s3www"] diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..ef85854 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,39 @@ +pipeline { + agent { + kubernetes { + // inheritFrom 'mypod' + yaml """ +apiVersion: v1 +kind: Pod +spec: + containers: + - name: docker + image: docker:20-dind + args: + - "--insecure-registry" + - "dockermirror:5000" + securityContext: + privileged: true +""" + } + } + stages { + stage("Build iamge") { + steps { + container("docker") { + script { + def image + try { + image = docker.image("dockermirror:5000/dpedu/nagdebbuilder-${distro}") + image.pull() // Pull a recent version to share base layers with (?) + } catch (exc) { + echo "couldn't pull image, assuming we're building it for the first time" + image = docker.build("dockermirror:5000/dpedu/s3www",) + } + // image.push() + } + } + } + } + } +}