[CI] Upload nightly builds to S3 (#4976)
* Do not store built artifacts in the Jenkins master * Add wheel renaming script * Upload wheels to S3 bucket * Use env.GIT_COMMIT * Capture git hash correctly * Add missing import in Jenkinsfile * Address reviewer's comments * Put artifacts for pull requests in separate directory * No wildcard expansion in Windows CMD
This commit is contained in:
committed by
GitHub
parent
ac457c56a2
commit
da6e74f7bb
@@ -3,6 +3,11 @@
|
||||
|
||||
/* Jenkins pipeline for Windows AMD64 target */
|
||||
|
||||
import groovy.transform.Field
|
||||
|
||||
@Field
|
||||
def commit_id // necessary to pass a variable from one stage to another
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
// Build stages
|
||||
@@ -12,6 +17,7 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
checkoutSrcs()
|
||||
commit_id = "${GIT_COMMIT}"
|
||||
}
|
||||
stash name: 'srcs'
|
||||
milestone ordinal: 1
|
||||
@@ -76,7 +82,7 @@ def BuildWin64() {
|
||||
"""
|
||||
bat """
|
||||
cd python-package
|
||||
conda activate && python setup.py bdist_wheel --universal
|
||||
conda activate && python setup.py bdist_wheel --universal && for /R %%i in (dist\\*.whl) DO python ../tests/ci_build/rename_whl.py "%%i" ${commit_id} win_amd64
|
||||
"""
|
||||
echo "Insert vcomp140.dll (OpenMP runtime) into the wheel..."
|
||||
bat """
|
||||
@@ -86,7 +92,8 @@ def BuildWin64() {
|
||||
"""
|
||||
echo 'Stashing Python wheel...'
|
||||
stash name: 'xgboost_whl', includes: 'python-package/dist/*.whl'
|
||||
archiveArtifacts artifacts: "python-package/dist/*.whl", allowEmptyArchive: true
|
||||
path = ("${BRANCH_NAME}" == 'master') ? '/' : "${BRANCH_NAME}/"
|
||||
s3Upload bucket: 'xgboost-nightly-builds', path: path, acl: 'PublicRead', workingDir: 'python-package/dist', includePathPattern:'**/*.whl'
|
||||
echo 'Stashing C++ test executable (testxgboost)...'
|
||||
stash name: 'xgboost_cpp_tests', includes: 'build/testxgboost.exe'
|
||||
deleteDir()
|
||||
|
||||
Reference in New Issue
Block a user