I would like to ask on how can I add another step for pulling another repo on the jenkins pipeline I created. You see from the jenkins pipeline settings I already specified a repo for pulling the ui to build. Then after the build is made I need to pull another repo for api and build it as one docker image. I already tried this doc however I'm getting issue on getting the the ui files to combine on the api, here is my pipeline script used.
pipeline {
agent { label 'slave-jenkins'}
stages {blah blah
}
stage('Workspace Cleanup') {
steps {
step([$class: 'WsCleanup'])
checkout scm
}
}
stage('Download and Build UI Files') {
steps {
sh '''#!/bin/bash
echo "###########################"
echo "PERFORMING NPM INSTALL"
echo "###########################"
npm install
echo "###########################"
echo "PERFORMING NPM RUN BUILD"
echo "###########################"
npm run build
echo "###########################"
echo "Downloading API Repo"
echo "###########################"
**git branch: 'master',**
**credentialsId: 'XXXXXXXXXXXX',**
**url: 'ssh://git@XXXXXXe:7999/~lXXXXXX.git'**
echo ""
'''
}
}
}