generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): build_number var in sync (#1502)
- Loading branch information
1 parent
670c327
commit d9f287c
Showing
7 changed files
with
31 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
# | ||
# Exit on errors or unset variables | ||
set -eux | ||
|
||
# Run and verify job | ||
|
||
# Login | ||
if [ ! -z "${1:-}" ]; then | ||
oc login --token=${1} --server=https://api.silver.devops.gov.bc.ca:6443 | ||
oc project #Safeguard! | ||
fi | ||
|
||
# Create job | ||
CRONJOB=nr-spar-1502-sync | ||
RUN_JOB=${CRONJOB}--$(date +"%Y-%m-%d--%H-%M-%S") | ||
oc create job ${RUN_JOB} --from=cronjob/${CRONJOB} | ||
|
||
# Follow | ||
oc wait --for=condition=ready pod --selector=job-name=${RUN_JOB} --timeout=1m | ||
oc logs -l job-name=${RUN_JOB} --tail=50 --follow | ||
|
||
# Verify successful completion | ||
oc wait --for jsonpath='{.status.phase}'=Succeeded pod --selector=job-name=${RUN_JOB} --timeout=1m | ||
echo "Job successful!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters