diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..1a02fbf4f --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,24 @@ +#### Link to ticket + +Please add a link to the ticket being addressed by this change. + +#### Description + +Please include a short description of the suggested change and the reasoning behind the approach you have chosen. + +#### Screenshot of the result + +If your change affects the user interface you should include a screenshot of the result with the pull request. + +#### Checklist + +- [ ] My code passes our test (all our tests). +- [ ] My code passes our static analysis suite. +- [ ] My code passes our continuous integration process. + +If your code does not pass all the requirements on the checklist you have to add a comment explaining why this change +should be exempt from the list. + +#### Additional comments or questions + +If you have any further comments or questions for the reviewer please add them here. diff --git a/.woodpecker/stg.yml b/.woodpecker/stg.yml new file mode 100644 index 000000000..d4e342fb0 --- /dev/null +++ b/.woodpecker/stg.yml @@ -0,0 +1,44 @@ +when: + - branch: release/* + event: push + +skip_clone: true + +labels: + zone: DMZ + +steps: + - name: Run staging site update + image: itkdev/ansible-plugin:1 + pull: true + settings: + id: + from_secret: id + secret: + from_secret: secret + host: + from_secret: stg_host + path: + from_secret: stg_path + user: + from_secret: user + actions: + - chmod +w web/sites/default + - chmod +w web/sites/default/settings.php + - git reset --hard + - git fetch origin ${CI_COMMIT_BRANCH} + - git checkout ${CI_COMMIT_BRANCH} + - git pull + - itkdev-docker-compose-server up -d --force-recreate + # Build theme + - itkdev-docker-compose-server run --rm node yarn install + - itkdev-docker-compose-server run --rm node yarn build + - itkdev-docker-compose-server run --rm node rm -rf node_modules + # Ensure everything is owned by deploy + - sudo chown -R deploy:deploy web + # Deploy site. + - itkdev-docker-compose-server exec phpfpm composer install --no-interaction + - itkdev-docker-compose-server exec phpfpm vendor/bin/drush --yes deploy + - itkdev-docker-compose-server exec phpfpm vendor/bin/drush --yes locale:update + - itkdev-docker-compose-server exec phpfpm vendor/bin/drush --yes locale:import --type=customized --override=none da /app/web/profiles/custom/os2loop/translations/translations.da.po + - itkdev-docker-compose-server exec phpfpm vendor/bin/drush --yes cache:rebuild diff --git a/CHANGELOG.md b/CHANGELOG.md index d13af952a..a05049dde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +- [PR-370](https://github.com/itk-dev/os2loop/pull/370) + Added woodpecker to test site deployment + ## [1.2.2] - [PR-369](https://github.com/itk-dev/os2loop/pull/369) Update drupal core 10.4.5 diff --git a/docker-compose.override.yml b/docker-compose.override.yml index e5ca86c89..3aa514ead 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,13 +1,13 @@ services: node: image: node:20 + working_dir: /app profiles: - dev networks: - app volumes: - .:/app:delegated - working_dir: /app phpfpm: environment: diff --git a/docker-compose.server.override.yml b/docker-compose.server.override.yml index c82c0f5ae..08aa7e5a3 100644 --- a/docker-compose.server.override.yml +++ b/docker-compose.server.override.yml @@ -8,3 +8,11 @@ services: environment: # Match PHP_MAX_EXECUTION_TIME above - NGINX_FASTCGI_READ_TIMEOUT=300 + + node: + image: node:20 + working_dir: /app + networks: + - app + volumes: + - ./web/profiles/custom/os2loop/themes/os2loop_theme:/app