From ec2ce9a2717103235949692b1882a36736db5d4b Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Fri, 9 Aug 2024 07:56:49 -0700 Subject: [PATCH] initial import --- Dockerfile | 6 ++++++ Jenkinsfile | 31 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 Dockerfile create mode 100644 Jenkinsfile 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}" + } + } + } + } +}