Created
September 21, 2021 20:03
-
-
Save dln/5b74dfe5b9d40b95a301489c1a525f27 to your computer and use it in GitHub Desktop.
Cloud Build on a Schedule, without Trigger.
This file contains hidden or 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
PROJECT_ID=myproject | |
gcloud scheduler jobs create http ${PROJECT_ID}-run-build \ | |
--schedule='1 12 * * *' \ | |
--uri=https://cloudbuild.googleapis.com/v1/projects/${PROJECT_ID}/builds?alt=json \ | |
--message-body-from-file=- \ | |
--oauth-service-account-email=${PROJECT_ID}@appspot.gserviceaccount.com \ | |
--oauth-token-scope=https://www.googleapis.com/auth/cloud-platform \ | |
<<EOF | |
{ "steps": [ | |
{ | |
"id": "hello cron", | |
"name": "alpine", | |
"args": ["echo", "Hello schedule"] | |
}] | |
} | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment