Compare commits
2 commits
e5a5038ebb
...
57f591d0a2
Author | SHA1 | Date | |
---|---|---|---|
57f591d0a2 | |||
45ebe8d0b5 |
3 changed files with 14 additions and 61 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -63,3 +63,5 @@ target/
|
||||||
*.sublime-project
|
*.sublime-project
|
||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
.vscode/
|
.vscode/
|
||||||
|
*.yaml
|
||||||
|
*.yml
|
||||||
|
|
|
@ -18,5 +18,3 @@ pipeline:
|
||||||
from_secret: smtp_user
|
from_secret: smtp_user
|
||||||
password:
|
password:
|
||||||
from_secret: smtp_pass
|
from_secret: smtp_pass
|
||||||
recipients:
|
|
||||||
- morgan@clacks.network
|
|
||||||
|
|
67
Jenkinsfile
vendored
67
Jenkinsfile
vendored
|
@ -1,76 +1,29 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent none
|
agent none
|
||||||
environment {
|
environment {
|
||||||
SNAPCRAFT_STORE_CREDENTIALS = credentials('snapcraft-store-credentials')
|
CHAT = "devel@conference.mcmillian.dev"
|
||||||
}
|
|
||||||
options {
|
|
||||||
skipDefaultCheckout(true)
|
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build docker image') {
|
stage('Build docker image') {
|
||||||
agent { label 'docker-build' }
|
agent { label 'docker-build' }
|
||||||
|
environment {
|
||||||
|
TAG = "${env.BRANCH_NAME == "main" ? "latest" : env.BRANCH_NAME}"
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
// mattermostSend "Docker build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', notifySuspects: true, targets: "${CHAT}"
|
||||||
cleanWs()
|
|
||||||
checkout scm
|
|
||||||
script {
|
script {
|
||||||
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'docker-gitea-creds') {
|
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') {
|
||||||
def customImage = docker.build('git.dreamfall.space/thrrgilag/partybot:latest')
|
def customImage = docker.build("git.dreamfall.space/thrrgilag/partybot:${TAG}")
|
||||||
customImage.push()
|
customImage.push()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 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 {
|
post {
|
||||||
success {
|
success {
|
||||||
// mattermostSend color: "good", message: "ARM64 Snap build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Succeeded', notifySuspects: true, targets: "${CHAT}"
|
||||||
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>)"
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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>)"
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
failure {
|
||||||
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Failed', notifySuspects: true, targets: "${CHAT}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue