mirror of
https://github.com/UiO-Gaming/ShiteMusicBot.git
synced 2026-11-05 13:56:51 +01:00
Refined jenkins process
More tagging Releases!
This commit is contained in:
1 file changed
+19
-5
Vendored
+19
-5
@@ -33,18 +33,19 @@ pipeline {
|
||||
script {
|
||||
if (BRANCH_NAME == 'master') {
|
||||
def image = docker.build("${DOCKER_REPO}:${TAG}-amd64")
|
||||
image.push()
|
||||
}
|
||||
image.push("${TAG}-amd64")
|
||||
image.push("latest-amd64")
|
||||
}
|
||||
else {
|
||||
def image = docker.build("${DOCKER_REPO}:${SBranch}-amd64")
|
||||
image.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('pr') {
|
||||
agent { label 'amd64'}
|
||||
when {
|
||||
changeRequest()
|
||||
}
|
||||
when { changeRequest() }
|
||||
steps {
|
||||
script {
|
||||
def image = docker.build("${DOCKER_REPO}:PR_$GIT_BRANCH-amd64")
|
||||
@@ -53,5 +54,18 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('GitHub Release') {
|
||||
when { branch 'master' }
|
||||
agent { label 'amd64'}
|
||||
steps {
|
||||
withCredentials([usernameColonPassword(credentialsId: 'RoxBot-Dev Github', variable: 'GitCred')]) {
|
||||
sh """
|
||||
git remote set-url origin "https://${GitCred}@github.com/${GIT_REPO}.git"
|
||||
git tag ${TAG}
|
||||
git push --tags
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user