diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..30817ff --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM docker.io/jenkins/jenkins:lts + +USER root +RUN apt-get update && apt-get install -y --no-install-recommends mercurial + +USER jenkins diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..24af065 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,31 @@ +pipeline { + agent none + environment { + CHAT = "spacenerdmo@clacks.network" + } + stages { + stage('Build docker image') { + agent { label 'docker-build' } + environment { + TAG = "lts" + } + steps { + jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', notifySuspects: true, targets: "${CHAT}" + script { + docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') { + def customImage = docker.build("git.dreamfall.space/thrrgilag/jenkins-mercurial:${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}" + } + } + } + } +}