Compare commits
No commits in common. "57f591d0a2a2ad48c1afb157e76c64d040802f22" and "e5a5038ebb45bde68707d7123908024875710ffb" have entirely different histories.
57f591d0a2
...
e5a5038ebb
3 changed files with 61 additions and 14 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -63,5 +63,3 @@ target/
|
|||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
.vscode/
|
||||
*.yaml
|
||||
*.yml
|
||||
|
|
|
@ -18,3 +18,5 @@ pipeline:
|
|||
from_secret: smtp_user
|
||||
password:
|
||||
from_secret: smtp_pass
|
||||
recipients:
|
||||
- morgan@clacks.network
|
||||
|
|
71
Jenkinsfile
vendored
71
Jenkinsfile
vendored
|
@ -1,29 +1,76 @@
|
|||
pipeline {
|
||||
agent none
|
||||
environment {
|
||||
CHAT = "devel@conference.mcmillian.dev"
|
||||
SNAPCRAFT_STORE_CREDENTIALS = credentials('snapcraft-store-credentials')
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout(true)
|
||||
}
|
||||
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}"
|
||||
// mattermostSend "Docker build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||
cleanWs()
|
||||
checkout scm
|
||||
script {
|
||||
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') {
|
||||
def customImage = docker.build("git.dreamfall.space/thrrgilag/partybot:${TAG}")
|
||||
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'docker-gitea-creds') {
|
||||
def customImage = docker.build('git.dreamfall.space/thrrgilag/partybot:latest')
|
||||
customImage.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Succeeded', notifySuspects: true, targets: "${CHAT}"
|
||||
// post {
|
||||
// success {
|
||||
// mattermostSend color: "good", message: "Docker build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||
// }
|
||||
// failure {
|
||||
// mattermostSend color: "danger", message: "Docker build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||
// }
|
||||
// }
|
||||
}
|
||||
stage('Build snap packages') {
|
||||
when { expression { false == true } }
|
||||
parallel {
|
||||
stage('Build snap for ARM64') {
|
||||
agent { label "snap-arm64" }
|
||||
steps {
|
||||
// mattermostSend "ARM64 Snap build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||
cleanWs()
|
||||
checkout scm
|
||||
sh "snapcraft clean"
|
||||
sh "snapcraft"
|
||||
}
|
||||
post {
|
||||
success {
|
||||
// mattermostSend color: "good", message: "ARM64 Snap build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||
archiveArtifacts artifacts: '*.snap'
|
||||
sh "snapcraft upload --release=edge *.snap"
|
||||
}
|
||||
// failure {
|
||||
// mattermostSend color: "danger", message: "ARM64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||
// }
|
||||
}
|
||||
}
|
||||
failure {
|
||||
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Failed', notifySuspects: true, targets: "${CHAT}"
|
||||
stage('Build snap for AMD64') {
|
||||
agent { label "snap-amd64" }
|
||||
steps {
|
||||
// mattermostSend "AMD64 Snap build Started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||
cleanWs()
|
||||
checkout scm
|
||||
sh "snapcraft clean"
|
||||
sh "snapcraft"
|
||||
}
|
||||
post {
|
||||
success {
|
||||
// mattermostSend color: "good", message: "AMD64 Snap build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||
archiveArtifacts artifacts: '*.snap'
|
||||
sh "snapcraft upload --release=edge *.snap"
|
||||
}
|
||||
// failure {
|
||||
// mattermostSend color: "danger", message: "AMD64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue