Adds a docker image and build task for said image

This commit is contained in:
zontreck 2025-03-15 00:18:27 -07:00
parent 37ba232a54
commit d87c0192ac
6 changed files with 110 additions and 2 deletions

54
Jenkinsfile vendored
View file

@ -130,5 +130,59 @@ pipeline {
}
}
}
stage("Build Server") {
agent {
label 'linux'
}
steps {
script {
sh '''
#!/bin/bash
dart pub get
mkdir out
dart compile exe -o out/server cli/server.dart
mv out/server bugvaultd
'''
}
}
post {
always {
archiveArtifacts artifacts: "bugvaultd"
cleanWs()
}
}
}
stage("Build Docker") {
agent {
label 'dockermain'
}
steps {
script {
sh '''
#!/bin/bash
docker build -t git.zontreck.com/packages/bugvault:latest "$(pwd)"
docker push git.zontreck.com/packages/bugvault:latest
docker rmi -f git.zontreck.com/packages/bugvault:latest
docker buildx prune -a -f
'''
}
}
post {
always {
cleanWs()
}
}
}
}
}