Compare commits

...
Author SHA1 Message Date
ivanmkc 70e2cc05c7 Added more debugging 2021-08-30 13:38:22 -04:00
ivanmkc a843cec5a4 Added rev-list 2021-08-30 13:36:13 -04:00
ivanmkc e4a9c31840 Switched from fetch to pull 2021-08-30 13:36:13 -04:00
ivanmkc 1d48bbc5a6 Added debug step 2021-08-30 13:36:13 -04:00
Andrew Ferlitschandivanmkc 1a649a8357 fix: testing 2021-08-30 13:35:28 -04:00
Andrew Ferlitschandivanmkc a973938d7c fix: testing 2021-08-30 13:35:28 -04:00
Andrew Ferlitschandivanmkc a4affa4878 fix: testing 2021-08-30 13:35:28 -04:00
Andrew Ferlitschandivanmkc 3b59d34c16 fix: testing 2021-08-30 13:35:28 -04:00
Andrew Ferlitschandivanmkc 42d0676d0b fix: lint 2021-08-30 13:35:28 -04:00
Andrew Ferlitschandivanmkc fa1c0e702d feat: XAI SDK notebooks 2021-08-30 13:35:28 -04:00
7 changed files with 9471 additions and 18 deletions
@@ -17,28 +17,58 @@ steps:
args:
- -c
- 'if [ -n "${_BASE_BRANCH}" ]; then git fetch origin "${_BASE_BRANCH}":refs/remotes/origin/"${_BASE_BRANCH}"; else echo "Skipping fetch."; fi'
# Install Python dependencies
- name: ${_PYTHON_IMAGE}
entrypoint: pip
args: ['install', '--upgrade', '--user', '--requirement', '.cloud-build/requirements.txt']
# Install Python dependencies and run testing script
# DEBUG: git log
- name: ${_PYTHON_IMAGE}
entrypoint: /bin/sh
args:
- -c
- 'python3 -m pip freeze && python3 .cloud-build/ExecuteChangedNotebooks.py --test_paths_file "${_TEST_PATHS_FILE}" --base_branch "${_FORCED_BASE_BRANCH}" --output_folder ${BUILD_ID} --variable_project_id ${PROJECT_ID} --variable_region ${_GCP_REGION}'
env:
- 'IS_TESTING=1'
# Manually copy artifacts to GCS
- name: gcr.io/cloud-builders/gsutil
entrypoint: /bin/sh
args:
- -c
- 'if [ $(ls -pR "/workspace/${BUILD_ID}" | grep -v / | grep -v ^$ | wc -l) -ne 0 ]; then gsutil -m -q rsync -r "/workspace/${BUILD_ID}" "gs://${_GCS_ARTIFACTS_BUCKET}/test-artifacts/PR_${_PR_NUMBER}/BUILD_${BUILD_ID}/"; else echo "No artifacts to copy."; fi'
# Fail if there is anything in the failure folder
- 'git log'
# DEBUG: git diff --name-only origin/master...
- name: ${_PYTHON_IMAGE}
entrypoint: /bin/sh
args:
args:
- -c
- 'echo "Download executed notebooks with this command: \"mkdir -p artifacts && gsutil rsync -r gs://${_GCS_ARTIFACTS_BUCKET}/test-artifacts/PR_${_PR_NUMBER}/BUILD_${BUILD_ID} artifacts/\"" && if [ "$(ls -A /workspace/${BUILD_ID}/failure | wc -l)" -ne 0 ]; then exit 1; else exit 0; fi'
timeout: 86400s
- 'git diff --name-only origin/master...'
# DEBUG: git diff --name-only origin/master
- name: ${_PYTHON_IMAGE}
entrypoint: /bin/sh
args:
- -c
- 'git diff --name-only origin/master'
# DEBUG: git diff --name-only master
- name: ${_PYTHON_IMAGE}
entrypoint: /bin/sh
args:
- -c
- 'git diff --name-only master'
# DEBUG: git rev-list origin/master... -v
- name: ${_PYTHON_IMAGE}
entrypoint: /bin/sh
args:
- -c
- 'git rev-list origin/master... -v'
# # Install Python dependencies
# - name: ${_PYTHON_IMAGE}
# entrypoint: pip
# args: ['install', '--upgrade', '--user', '--requirement', '.cloud-build/requirements.txt']
# # Install Python dependencies and run testing script
# - name: ${_PYTHON_IMAGE}
# entrypoint: /bin/sh
# args:
# - -c
# - 'python3 -m pip freeze && python3 .cloud-build/ExecuteChangedNotebooks.py --test_paths_file "${_TEST_PATHS_FILE}" --base_branch "${_FORCED_BASE_BRANCH}" --output_folder ${BUILD_ID} --variable_project_id ${PROJECT_ID} --variable_region ${_GCP_REGION}'
# env:
# - 'IS_TESTING=1'
# # Manually copy artifacts to GCS
# - name: gcr.io/cloud-builders/gsutil
# entrypoint: /bin/sh
# args:
# - -c
# - 'if [ $(ls -pR "/workspace/${BUILD_ID}" | grep -v / | grep -v ^$ | wc -l) -ne 0 ]; then gsutil -m -q rsync -r "/workspace/${BUILD_ID}" "gs://${_GCS_ARTIFACTS_BUCKET}/test-artifacts/PR_${_PR_NUMBER}/BUILD_${BUILD_ID}/"; else echo "No artifacts to copy."; fi'
# # Fail if there is anything in the failure folder
# - name: ${_PYTHON_IMAGE}
# entrypoint: /bin/sh
# args:
# - -c
# - 'echo "Download executed notebooks with this command: \"mkdir -p artifacts && gsutil rsync -r gs://${_GCS_ARTIFACTS_BUCKET}/test-artifacts/PR_${_PR_NUMBER}/BUILD_${BUILD_ID} artifacts/\"" && if [ "$(ls -A /workspace/${BUILD_ID}/failure | wc -l)" -ne 0 ]; then exit 1; else exit 0; fi'
# timeout: 86400s