Compare commits

...

2 commits

Author SHA1 Message Date
f88534d4f2 test new build agent
All checks were successful
thrrgilag/jenkins-mercurial/pipeline/head This commit looks good
2024-08-09 08:01:11 -07:00
ec2ce9a271 initial import 2024-08-09 07:56:49 -07:00
2 changed files with 37 additions and 0 deletions

6
Dockerfile Normal file
View file

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

31
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,31 @@
pipeline {
agent none
environment {
CHAT = "spacenerdmo@clacks.network"
}
stages {
stage('Build docker image') {
agent { label 'testbuilder' }
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}"
}
}
}
}
}