Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLATFORM-9396 use new change-tracking API #240

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 18 additions & 26 deletions JenkinsFile-release.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@Library('GlobalSharedLibrary') _
def FAILED_STAGE
def issueKey
def trackingKey
def GIT_COMMIT_HASH
def imageTag = "testImageTag"

DOCKER_IMAGE = 'node:18-slim'
Expand Down Expand Up @@ -80,25 +81,18 @@ pipeline {
stage('Track change start in Jira') {
steps {
script {
commitMsg = releaseTracking.getGitCommitMessage()
issueKey = releaseTracking.changeStart(
[
affectedApp : "Fandom Community Platform",
affectedService : "jwplayer",
environment : "Development" ,
version : "jwplayer-" + imageTag,
extraDescription : """
Deployment information:
- *Branch:* [https://github.com/Wikia/jwplayer-fandom/tree/${params.branch}]
- *Commit message:* ${commitMsg}
- *Image tag:* ${imageTag}
- *Build Url:* ${env.BUILD_URL}
""",
relatedIssues : releaseTracking.getIssueKeysFromText(commitMsg),
datacentersImpacted : ["poz-dev"]
]
)
echo "Jira issue key: ${issueKey}"
trackingKey = releaseTracking.deployStart(
buildUrl: env.BUILD_URL,
organization: 'Wikia',
repository: 'jwplayer-fandom',
commit: GIT_COMMIT_HASH,
imageTag: "jwplayer-$imageTag",
service: 'jwplayer',
environment: 'Development',
datacenter: ["poz-dev"],
components: ['Fandom Community Platform']
)
echo "Tracking key: ${trackingKey}"
}
}
}
Expand All @@ -115,12 +109,10 @@ pipeline {
stage('Track change completion in Jira') {
steps {
script {
releaseTracking.changeComplete(
[
environment : "Development",
issueKey : issueKey,
success : true
]
releaseTracking.deployEnd(
environment : 'Development',
trackingKey : trackingKey,
success : true
)
}
}
Expand Down
Loading