Skip to content
Snippets Groups Projects
Commit 5d25550a authored by Erick Hitter's avatar Erick Hitter
Browse files

Merge branch 'add/exit-not-configured' into 'master'

Allow deploy to be skipped without failing the job

See merge request !14
parents a26aab80 fd79d3b5
No related branches found
No related tags found
1 merge request!14Allow deploy to be skipped without failing the job
Pipeline #5053 passed with stage
in 7 seconds
......@@ -50,6 +50,7 @@ Set the following environment variables in the GitLab project's configuration:
* `PLUGIN_VERSION` - version to tag
* `WP_ORG_RELEASE_REF` - git commit ref (branch or tag) to use for release
* `WP_ORG_ASSETS_DIR` - directory name, relative to repo root, where screenshots and other static assets are held
* `WP_ORG_DEPLOY_SKIP` - set to `1` to skip the deploy without failing the job
### Alternate loading method
......
......@@ -16,13 +16,19 @@ function cleanup() {
# Provide a basic version identifier, particularly since this script
# is usually accessed via CDN.
echo "ℹ︎ WP-ORG-PLUGIN-DEPLOY VERSION: 2019051201"
echo "ℹ︎ WP-ORG-PLUGIN-DEPLOY VERSION: 2022070901"
if [[ -z "$CI" ]]; then
echo "𝘅︎ Script is only to be run by GitLab CI" 1>&2
exit 1
fi
# Allow deploy to be skipped if desired.
if [[ "1" == "$WP_ORG_DEPLOY_SKIP" ]]; then
echo "ℹ︎ WordPress.org deploy skipped due to WP_ORG_DEPLOY_SKIP variable" 1>&2
exit 0
fi
# Ensure certain environment variables are set
# IMPORTANT: while access to secrets is restricted in the GitLab UI,
# they are by necessity provided as plaintext in the context of this script,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment