Kaptain.
Telegram /
LinkedIn /
Email /
GIT /
RSS /
GPG /

№ 11249 В разделе
Sysadmin
от March 16th, 2021,
В подшивках: Gitlab, Jenkins
Install Gitlab plugin into Jenkins, add connection in global settings (or project settings), add to Jenkinsfile:
properties([gitLabConnection('gitlab-21h')])
node {
checkout scm
updateGitlabCommitStatus(name: "Release", state: "running")
try {
stage("Tests") {
updateGitlabCommitStatus(name: "Tests", state: "running")
echo "Tests"
updateGitlabCommitStatus(name: "Tests", state: "success")
}
stage("Build") {
updateGitlabCommitStatus(name: "Build", state: "running")
echo "Build"
updateGitlabCommitStatus(name: "Build", state: "success")
}
stage("Publish") {
updateGitlabCommitStatus(name: "Publish", state: "running")
echo "Publish"
updateGitlabCommitStatus(name: "Publish", state: "success")
}
updateGitlabCommitStatus(name: "Release", state: "success")
addGitLabMRComment(comment: "Release successfully complete")
} catch (Exception e) {
updateGitlabCommitStatus(name: "Release", state: "failed")
addGitLabMRComment(comment: "Release successfully failed")
}
}
Fortune cookie: There was an old man of Duddee Who came home as drunk as could be. He wound up the clock With the end of his cock, And buggered his wife with the key.
Leave a Reply