Skip to content

Commit

Permalink
Add sites:webmaster:reset-moduletest
Browse files Browse the repository at this point in the history
While syncing all moduletests sites is handy, just syncing one is also
a common occurrence. So add `sites:webmaster:reset-moduletest` and
make `sites:webmaster:reset-moduletests` use it.
  • Loading branch information
xendk committed Nov 28, 2024
1 parent ee3cbcb commit df678a5
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions infrastructure/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,19 @@ tasks:
- lagoon ssh --project {{.TARGET_PROJECT}} --environment {{.TARGET_ENV}} -C "drush -y rsync @lagoon.{{.SOURCE_PROJECT}}-{{.SOURCE_ENV}}:%files @self:%files -- --omit-dir-times --no-perms --no-group --no-owner --no-times --chmod=ugo=rwX --delete; drush -y sql-sync @lagoon.{{.SOURCE_PROJECT}}-{{.SOURCE_ENV}} @self --create-db; exit;"
- lagoon deploy latest --project {{.TARGET_PROJECT}} --environment {{.TARGET_ENV}} --force

sites:webmaster:reset-moduletest:
desc: Reset webmaster moduletest
deps: [lagoon:cli:config]
vars:
PROJECT: "{{.PROJECT}}"
cmds:
- task: site:environment:sync
vars:
TARGET_PROJECT: "{{.PROJECT}}"
TARGET_ENV: "moduletest"
SOURCE_PROJECT: "{{.PROJECT}}"
SOURCE_ENV: "main"

sites:webmaster:reset-moduletests:
desc: Reset all webmaster moduletests
deps: [lagoon:cli:config]
Expand All @@ -1108,12 +1121,9 @@ tasks:
sh: yq '... comments="" | .sites | with_entries(select(.value | has("plan"))) | keys | .[]' {{.dir_env}}/sites.yaml
cmds:
- for: { var: webmasters }
task: site:environment:sync
task: sites:webmaster:reset-moduletest
vars:
TARGET_PROJECT: "{{.ITEM}}"
TARGET_ENV: "moduletest"
SOURCE_PROJECT: "{{.ITEM}}"
SOURCE_ENV: "main"
PROJECT: "{{.ITEM}}"

sites:check-caa:
desc: |
Expand Down

0 comments on commit df678a5

Please sign in to comment.