Separate build based on current branch name

This commit is contained in:
Dany LE 2022-09-16 11:53:15 +02:00 committed by GitHub
parent 4cd271cc51
commit 53867c9d03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

9
Jenkinsfile vendored
View File

@ -29,6 +29,9 @@ pipeline{
{
stage('Prebuild build') {
steps {
sh'''
export -p | tee env.source
'''
sshCommand remote: remote, command: '''
set -e
export WORKSPACE=$(realpath "./jenkins/workspace/antos")
@ -46,8 +49,10 @@ pipeline{
set -e
export WORKSPACE=$(realpath "./jenkins/workspace/antos")
cd $WORKSPACE
[ -d build ] && rm -rf build
export BUILDDIR="$WORKSPACE/build/opt/www/htdocs/os"
source env.source
buildir="build/$GIT_BRANCH"
[ -d "$buildir" ] && rm -rf "$buildir"
export BUILDDIR="$WORKSPACE/$buildir/opt/www/htdocs/os"
make release
'''
script {