This commit is contained in:
commit
4de3a176ef
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM alpine:3.18
|
||||
|
||||
ARG VERSION=3.1.0
|
||||
ARG TARGETARCH=x64
|
||||
|
||||
RUN apk add --no-cache curl && \
|
||||
if [ "$TARGETARCH" == "amd64" ]; then export TARGETARCH="x64"; fi; wget --no-verbose -O /usr/local/bin/duplicacy "https://github.com/gilbertchen/duplicacy/releases/download/v${VERSION}/duplicacy_linux_${TARGETARCH}_${VERSION}" && \
|
||||
chmod 777 /usr/local/bin/duplicacy && \
|
||||
mkdir -p /config/scripts && \
|
||||
mkdir -p /config/cache && \
|
||||
mkdir -p /data
|
||||
39
Jenkinsfile
vendored
Normal file
39
Jenkinsfile
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
pipeline {
|
||||
environment {
|
||||
registry = 'https://registry.hub.docker.com'
|
||||
registryCredential = 'dockerhub_jcabillot'
|
||||
dockerImage = 'jcabillot/duplicacy'
|
||||
DOCKER_BUILDKIT = '1'
|
||||
}
|
||||
|
||||
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}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user