mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-27 09:48:21 +01:00
Separate build based on current branch name
This commit is contained in:
parent
4cd271cc51
commit
53867c9d03
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@ -29,6 +29,9 @@ pipeline{
|
|||||||
{
|
{
|
||||||
stage('Prebuild build') {
|
stage('Prebuild build') {
|
||||||
steps {
|
steps {
|
||||||
|
sh'''
|
||||||
|
export -p | tee env.source
|
||||||
|
'''
|
||||||
sshCommand remote: remote, command: '''
|
sshCommand remote: remote, command: '''
|
||||||
set -e
|
set -e
|
||||||
export WORKSPACE=$(realpath "./jenkins/workspace/antos")
|
export WORKSPACE=$(realpath "./jenkins/workspace/antos")
|
||||||
@ -46,8 +49,10 @@ pipeline{
|
|||||||
set -e
|
set -e
|
||||||
export WORKSPACE=$(realpath "./jenkins/workspace/antos")
|
export WORKSPACE=$(realpath "./jenkins/workspace/antos")
|
||||||
cd $WORKSPACE
|
cd $WORKSPACE
|
||||||
[ -d build ] && rm -rf build
|
source env.source
|
||||||
export BUILDDIR="$WORKSPACE/build/opt/www/htdocs/os"
|
buildir="build/$GIT_BRANCH"
|
||||||
|
[ -d "$buildir" ] && rm -rf "$buildir"
|
||||||
|
export BUILDDIR="$WORKSPACE/$buildir/opt/www/htdocs/os"
|
||||||
make release
|
make release
|
||||||
'''
|
'''
|
||||||
script {
|
script {
|
||||||
|
Loading…
Reference in New Issue
Block a user