From dccb67f01efe7dc57c9c209768e12a003af1d5f1 Mon Sep 17 00:00:00 2001 From: Kiran G <kirang20@gmail.com> Date: Thu, 13 Jul 2017 13:31:22 +0530 Subject: [PATCH] Issue #13 feat: Make publish stage publish metadata.json --- Jenkinsfile | 15 ++++++++++----- metadata.sh | 3 +++ 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 metadata.sh diff --git a/Jenkinsfile b/Jenkinsfile index d8ee478..be170ff 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,10 +24,15 @@ node('docker') { stage('Publish'){ echo 'Push to Repo' - sh 'ls -al ~/' - sh('chmod 777 ./content/services/js-services/content_service/dockerPushToRepo.sh') - sh 'ARTIFACT_LABEL=bronze ./content/services/js-services/content_service/dockerPushToRepo.sh' - + sh 'ls -al ~/' + + dir('./content/services/js-services/content_service') { + sh('chmod 777 ./dockerPushToRepo.sh) + sh 'ARTIFACT_LABEL=bronze ./dockerPushToRepo.sh' + sh './metadata.sh > metadata.json' + sh 'cat metadata.json' + archive includes: "metadata.json" + } } } @@ -36,4 +41,4 @@ node('docker') { throw err } -} \ No newline at end of file +} diff --git a/metadata.sh b/metadata.sh new file mode 100644 index 0000000..73d9fda --- /dev/null +++ b/metadata.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# return version +echo '{"name":"content_service","version":"0.0.1","org":"sunbird","hubuser":"purplesunbird"}' -- GitLab