Skip to content

Commit

Permalink
Merge pull request #24 from ryanshoover/nojira-deploy-any-install
Browse files Browse the repository at this point in the history
Add ability to deploy to any install
  • Loading branch information
ryanshoover authored Apr 27, 2021
2 parents ffd3517 + 367496c commit f92623e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/commands/find_wpe_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ steps:
WPE_ENV="<< parameters.environment >>"
fi
# Set the destination according to the environment.
case "$WPE_ENV" in
master)
WPE_INSTALL="$WPE_PRODUCTION_INSTALL";;
Expand All @@ -32,5 +33,10 @@ steps:
WPE_INSTALL="$WPE_DEVELOPMENT_INSTALL";;
esac
# Match any deploy-install pattern and set the install as the destination.
if [[ "$CIRCLE_BRANCH" =~ deploy-[a-z][a-z0-9]{2,13} ]]; then
WPE_INSTALL="${CIRCLE_BRANCH/deploy-/}"
fi
echo "export WPE_INSTALL=$WPE_INSTALL" >> "$BASH_ENV"
source "$BASH_ENV"
10 changes: 10 additions & 0 deletions src/examples/wordpress-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ usage:
only:
- /feat-.*/

- wpengine/deploy_site:
name: deploy-site
requires:
- wpengine/lint
- wpengine/codeception
filters:
branches:
only:
- /deploy-.*/

regression:
jobs:
- wpengine/backstop_reference:
Expand Down

0 comments on commit f92623e

Please sign in to comment.