add dir instruction to get inside the app dir when creating version json file

This commit is contained in:
burnettk 2023-05-15 11:40:11 -04:00
parent c2a2b5e832
commit dfcd46f6f6
1 changed files with 8 additions and 6 deletions

14
Jenkinsfile vendored
View File

@ -49,12 +49,14 @@ pipeline {
stages {
stage('Prep') {
steps { script {
def jobMetaJson = new JsonBuilder([
git_commit: env.GIT_COMMIT.take(7),
git_branch: env.GIT_BRANCH,
build_id: env.BUILD_ID,
]).toPrettyString()
sh "echo '${jobMetaJson}' > version_info.json"
dir("spiffworkflow-${params.COMPONENT}") {
def jobMetaJson = new JsonBuilder([
git_commit: env.GIT_COMMIT.take(7),
git_branch: env.GIT_BRANCH,
build_id: env.BUILD_ID,
]).toPrettyString()
sh "echo '${jobMetaJson}' > version_info.json"
}
} }
}