The containers start with the version being deployed (Closes#6). ~/netork/.env is now written after the pull and before the first up -d, instead of after the image check. The services read that file through env_file, so they used to carry the previous deploy's NETORK_VERSION. A failed pull still leaves .env untouched. If the swap itself fails, .env names the tag whose compose files and images are already on the host. The README's step list follows the new order.
Which branches a feature-<branch> tag comes from (NetOrk/netork#208). fix/<name> branches are published as feature-fix-<name>, because the registry keeps only feature-* branch tags. The version check is unchanged and already accepts that form. The comment, the refusal message and the README now say how branch names map to tags.
Tests: tests/test_deploy_env_before_up.py runs the .env step for real against a fake host and checks what .env says at every up -d. tests/test_deploy_versions.py covers the accepted and refused tags. The positional check in test_deploy_script_fails_loudly.py now asserts "after the pull, before the first up -d". pytest, shellcheck and ruff are green.
Two deploy-side changes.
**The containers start with the version being deployed (Closes #6).**
`~/netork/.env` is now written after the pull and before the first `up -d`, instead of after the image check. The services read that file through `env_file`, so they used to carry the previous deploy's `NETORK_VERSION`. A failed pull still leaves `.env` untouched. If the swap itself fails, `.env` names the tag whose compose files and images are already on the host. The README's step list follows the new order.
**Which branches a `feature-<branch>` tag comes from (NetOrk/netork#208).**
`fix/<name>` branches are published as `feature-fix-<name>`, because the registry keeps only `feature-*` branch tags. The version check is unchanged and already accepts that form. The comment, the refusal message and the README now say how branch names map to tags.
Tests: `tests/test_deploy_env_before_up.py` runs the `.env` step for real against a fake host and checks what `.env` says at every `up -d`. `tests/test_deploy_versions.py` covers the accepted and refused tags. The positional check in `test_deploy_script_fails_loudly.py` now asserts "after the pull, before the first `up -d`". pytest, shellcheck and ruff are green.
The services read ~/netork/.env through env_file, so whatever it says
when `up -d` creates a container ends up in that container's
environment. The settings were recorded only after the swap, so every
container carried the previous deploy's NETORK_VERSION: the image was
right, `docker exec <api> env` was not.
Record them once the pull has brought the images onto the host and
before the first `up -d`. A failed pull still leaves .env alone. If the
swap fails afterwards, .env names the tag whose compose files and
images are already on the host, which is what a hand-typed
`docker compose up -d` there should start.
Also say which branches a feature-<branch> tag comes from: feature/<name>
and feat/<name> become feature-<name>, and fix/<name> now becomes
feature-fix-<name> (NetOrk/netork#208), because the registry keeps only
feature-* branch tags. The accepted forms do not change; the comment, the
refusal message and the README now say so, and a test holds that
feature-fix-<name> passes and a bare fix-<name> does not.
Closes#6
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Two deploy-side changes.
The containers start with the version being deployed (Closes #6).
~/netork/.envis now written after the pull and before the firstup -d, instead of after the image check. The services read that file throughenv_file, so they used to carry the previous deploy'sNETORK_VERSION. A failed pull still leaves.envuntouched. If the swap itself fails,.envnames the tag whose compose files and images are already on the host. The README's step list follows the new order.Which branches a
feature-<branch>tag comes from (NetOrk/netork#208).fix/<name>branches are published asfeature-fix-<name>, because the registry keeps onlyfeature-*branch tags. The version check is unchanged and already accepts that form. The comment, the refusal message and the README now say how branch names map to tags.Tests:
tests/test_deploy_env_before_up.pyruns the.envstep for real against a fake host and checks what.envsays at everyup -d.tests/test_deploy_versions.pycovers the accepted and refused tags. The positional check intest_deploy_script_fails_loudly.pynow asserts "after the pull, before the firstup -d". pytest, shellcheck and ruff are green.