first import
Some checks failed
perso/docker-octant/pipeline/head There was a failure building this commit

This commit is contained in:
Julien Cabillot 2020-12-01 22:57:14 -05:00
commit 3d474c8dbb
2 changed files with 54 additions and 0 deletions

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM "ubuntu:20.10"
LABEL maintainer="Cabillot Julien <dockerimages@cabillot.eu>"
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"]

39
Jenkinsfile vendored Normal file
View File

@ -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}'
}
}
}
}
}
}