Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Update satis for 1.0.0 (#11)
Browse files Browse the repository at this point in the history
* Improve the README.

* Update config for govcms 1.0.0.

* Satis config for govcms 1.0.0

* Update ahoy commands.
  • Loading branch information
Simon Hobbs authored and fubarhouse committed Jan 19, 2020
1 parent 0f37971 commit 40cdd85
Show file tree
Hide file tree
Showing 17 changed files with 9,331 additions and 3,482 deletions.
19 changes: 15 additions & 4 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ usage: CLI utilities
commands:

satis:
usage: ahoy satis ARGS
usage: Execute composer/satis via docker.
cmd: |
docker run --rm --init -it \
--volume $(pwd):/build \
--volume "${COMPOSER_HOME:-$HOME/.composer}:/composer" \
composer/satis "$@"
satis-build:
usage: ahoy satis packages.json build-dir
usage: Execute composer/satis passing in a json and a build dir.
cmd: |
docker run --rm --init -it \
--user $(id -u):$(id -g) \
Expand All @@ -22,29 +22,40 @@ commands:
--volume $(pwd):/build \
composer/satis /build/branding/branding.sh "/build/$2"
build-all-production:
build:
usage: Build everything in /app
cmd: |
ahoy build-stable
ahoy build-master
ahoy build-develop
ahoy build-whitelist
build-stable:
usage: Build satis.govcms.gov.au
cmd: |
ahoy satis-build satis-config/govcms-stable.json app
build-master:
usage: Build satis.govcms.gov.au/master
cmd: |
ahoy satis-build satis-config/govcms-master.json app/master
build-develop:
usage: Build satis.govcms.gov.au/develop
cmd: |
ahoy satis-build satis-config/govcms-develop.json app/develop
build-whitelist:
usage: Build satis.govcms.gov.au/whitelist
cmd: |
ahoy satis-build satis-config/govcms-whitelist.json app/whitelist
verify:
usage: Locally run the same tests that would run in circle.
cmd: |
SATIS_BUILD=app ./.circleci/build-scaffolds-against-all.sh
server:
usage: Make satis available on localhost:4142
cmd: |
PHP -S localhost:4141 -t app
PHP -S localhost:4142 -t app
40 changes: 27 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
# GovCMS Packagist

A packagist resource managed by GovCMS for use by Composer projects. This packagist
essentially only the packages required to build the GovCMS distribution.
All the modules available in this packagist have been reviewed and curated.
A packagist resource managed by GovCMS for use by Composer projects. This
packagist service only offers an essential set of packages required to build
the GovCMS distribution. All the modules available in this packagist have
been reviewed.

[![CircleCI](https://circleci.com/gh/govCMS/satis.svg?style=svg)](https://circleci.com/gh/govCMS/satis)

## Maintenance

Currently, updating is manual but could be automated with new GovCMS releases.

1. When there is a new version of govcms/govcms8 or govcms/require-dev, the
Satis needs rebuilding.
1. Satis should be rebuilt when there is a new version of govcms8
distribution, however there could other packages also triggering this need.

2. If it's a new version of the distribution, copy `satis-govcms-betaX.json`
to a new file. Review the file.
2. Check the version constrains in all the satis-config/govms-*.json files.
You may need to update the version of GovCMS.

3. Review the `ahoy build-production` command in `.ahoy.yml` and update file
references if needed.
3. Run `ahoy build`.

4. Run `ahoy build-production`. This will update the static satis files in /app
4. Run `ahoy verify` to duplicate tests that run in circle.

5. Commit changes, including /app
5. Commit changes, including /app which is the statis files that are hosted.

6. Git push. This will build GovCMS in Gitlab (see `.gitlab-ci.yml`).
6. Push or these changes to github.com/govcms/satis. This will trigger
quay.io to rebuild the image from the docker-compose.yml.

## Troubleshooting maintenance

Building the Satis can result in a building a Satis server that you can't use
to build GovCMS. In a recent example the govcms-stable.json (and others)
required `"fabpot/goutte": "3.2.3"` in order to ensure this slightly older
version was available for a fully resolved govcms build.

It will happen when trying to build GovCMS from the Satis which can be
tested with `ahoy verify`.

1. Take a note of the composer error, the packages referred to.
2. Build a normal GovCMS and compared the same packages.
3. You should identify a package version that Satis didn't get.
4. And this package explicitly to `config/govcms-*.json`.

## Benefits

Expand Down Expand Up @@ -164,7 +179,6 @@ composer to pick up sub-packages which are newer than what GovCMS distribution s
rearchitect with [drupal-composer/drupal-project](https://github.com/drupal-composer/drupal-project)
as your scaffold to get a more "custom vanilla" experience.


## Technical

This project is built on [composer/satis](https://github.com/composer/satis) using the
Expand Down
4 changes: 2 additions & 2 deletions app/develop/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit 40cdd85

Please sign in to comment.