commit 3d474c8dbb6469d94f81eb3673f088ab245986e7 Author: Julien Cabillot Date: Tue Dec 1 22:57:14 2020 -0500 first import diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..53e4a23 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM "ubuntu:20.10" +LABEL maintainer="Cabillot Julien " + +USER "root" + +RUN curl -o /octant.deb -kL https://github.com/vmware-tanzu/octant/releases/download/$(curl -s https://github.com/vmware-tanzu/octant/releases/latest | sed 's/^.*tag\///' | sed 's/\".*$//')/octant_$(curl -s https://github.com/vmware-tanzu/octant/releases/latest | sed 's/^.*tag\///' | sed 's/\".*$//' | sed 's/v//' )_Linux-64bit.deb && \ + dpkg -i /octant.deb && \ + rm -f /octant.deb + +COPY octant/entrypoint.sh /root/entrypoint.sh +RUN chmod +x /root/entrypoint.sh + +#USER "iperf" + +CMD ["/bin/octant"] diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..04ee472 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,39 @@ +pipeline { + environment { + registry = 'https://registry.hub.docker.com' + registryCredential = 'dockerhub_jcabillot' + dockerImage = 'jcabillot/octant' + } + + agent any + + triggers { + cron('@midnight') + } + + stages { + stage('Clone repository') { + steps{ + checkout scm + } + } + + stage('Build image') { + steps{ + sh 'docker build --force-rm=true --no-cache=true --pull -t ${dockerImage} .' + } + } + + stage('Deploy Image') { + steps{ + script { + withCredentials([usernamePassword(credentialsId: 'dockerhub_jcabillot', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) { + sh 'docker login --username ${DOCKER_USER} --password ${DOCKER_PASS}' + sh 'docker push ${dockerImage}' + } + } + } + } + } +} +