[Jenkins] Release archive root parameter added
This commit is contained in:
parent
2c54c3108f
commit
57fdd8f82f
@ -1,9 +1 @@
|
|||||||
.git
|
pytest.ini
|
||||||
.gitignore
|
|
||||||
.releaseignore
|
|
||||||
Dockerfile
|
|
||||||
Jenkinsfile
|
|
||||||
Pipfile
|
|
||||||
Pipfile.lock
|
|
||||||
doc
|
|
||||||
scripts
|
|
||||||
|
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@ -10,6 +10,7 @@ pipeline {
|
|||||||
PROJECT_NAME = 'bot-base'
|
PROJECT_NAME = 'bot-base'
|
||||||
DEPLOY_DOC_PATH = "www/docs/${env.PROJECT_NAME}/"
|
DEPLOY_DOC_PATH = "www/docs/${env.PROJECT_NAME}/"
|
||||||
DEPLOY_REL_PATH = "www/releases/${env.PROJECT_NAME}/"
|
DEPLOY_REL_PATH = "www/releases/${env.PROJECT_NAME}/"
|
||||||
|
RELEASE_ROOT = "src"
|
||||||
TAG_NAME = """${TAG_NAME ?: ""}"""
|
TAG_NAME = """${TAG_NAME ?: ""}"""
|
||||||
ARTIFACTS = "${WORKSPACE}/.artifacts"
|
ARTIFACTS = "${WORKSPACE}/.artifacts"
|
||||||
}
|
}
|
||||||
@ -19,9 +20,9 @@ pipeline {
|
|||||||
sh 'git clean -fxd'
|
sh 'git clean -fxd'
|
||||||
sh 'mkdir -p ${ARTIFACTS}/build'
|
sh 'mkdir -p ${ARTIFACTS}/build'
|
||||||
sh 'mkdir -p /tmp/build'
|
sh 'mkdir -p /tmp/build'
|
||||||
sh 'pipenv lock -r | tee requirements.txt'
|
sh 'pipenv lock -r | tee ${RELEASE_ROOT}/requirements.txt'
|
||||||
sh 'echo .artifacts >> .releaseignore'
|
sh 'echo .artifacts >> .releaseignore'
|
||||||
sh 'rsync -avr --exclude-from=.releaseignore ./ /tmp/build'
|
sh 'rsync -avr --exclude-from=.releaseignore ${RELEASE_ROOT}/ /tmp/build'
|
||||||
sh 'tar -C /tmp/build -cvzf ${ARTIFACTS}/build/${TAG_NAME:-${GIT_BRANCH#*/}}.tar.gz --owner=0 --group=0 .'
|
sh 'tar -C /tmp/build -cvzf ${ARTIFACTS}/build/${TAG_NAME:-${GIT_BRANCH#*/}}.tar.gz --owner=0 --group=0 .'
|
||||||
sh 'cd /tmp/build && zip ${ARTIFACTS}/build/${TAG_NAME:-${GIT_BRANCH#*/}}.zip -r .'
|
sh 'cd /tmp/build && zip ${ARTIFACTS}/build/${TAG_NAME:-${GIT_BRANCH#*/}}.zip -r .'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user