Skip to content

Commit

Permalink
PLATFORM-9396 use new change-tracking API
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeller-wikia committed Jul 10, 2024
1 parent 1350014 commit 981720a
Showing 1 changed file with 18 additions and 26 deletions.
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

0 comments on commit 981720a

Please sign in to comment.