initial commit
All checks were successful
git.dreamfall.space/caddy-docker/pipeline/head This commit looks good

This commit is contained in:
Morgan McMillian 2024-09-11 15:31:11 -07:00
commit 6117b0a28d
2 changed files with 43 additions and 0 deletions

8
Dockerfile Normal file
View file

@ -0,0 +1,8 @@
FROM docker.io/library/caddy:builder AS builder
RUN xcaddy build \
--with github.com/caddy-dns/linode
FROM docker.io/library/caddy:latest
COPY --from=builder /usr/bin/caddy /usr/bin/caddy

35
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,35 @@
pipeline {
agent none
environment {
CHAT = "spacenerdmo@clacks.network"
MAIL = "morgan@mcmillian.dev"
}
stages {
stage('Build docker image') {
agent { label 'docker-build' }
environment {
TAG = "${env.BRANCH_NAME == "main" ? "latest" : env.BRANCH_NAME}"
}
steps {
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', notifySuspects: true, targets: "${CHAT}"
script {
docker.withRegistry('https://git.dreamfall.space/spacenerdmo', 'spacenerdmo-pkg-pub') {
def customImage = docker.build("git.dreamfall.space/spacenerdmo/caddy:${TAG}")
customImage.push()
}
}
}
post {
success {
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Succeeded', notifySuspects: true, targets: "${CHAT}"
}
failure {
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Failed', notifySuspects: true, targets: "${CHAT}"
mail to: "${MAIL}",
subject: "Deploy Failed: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
}
}
}
}