Skip to content

Commit

Permalink
[1.8.x] Remove docker image branch tags (#1189)
Browse files Browse the repository at this point in the history
This was a blocker for builds on branches with slashes. We also don't need it that much, as branch following will be implemented in #1155 by fetching the branch sha and using that for image pulls.

(cherry picked from commit de7e7f1)
  • Loading branch information
aequitas authored and mxsasha committed Nov 16, 2023
1 parent b0704c9 commit 0e466e5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,9 @@ jobs:
# and tag with PR source branch (eg: feature-x)
tags: |
${{ env.registry }}/${{ matrix.image }}:${{ steps.get_version.outputs.internetnl_version }}
${{ env.registry }}/${{ matrix.image }}:branch-${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name}}
# use latest build from main, or image previously build by this PR for caching
cache-from: |
${{ env.registry }}/${{ matrix.image }}:main
${{ env.registry }}/${{ matrix.image }}:branch-${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name}}
# push images to registry
push: true
# makes build images better usable as cache by allowing individual layers to be pulled from cache
Expand Down Expand Up @@ -225,15 +223,6 @@ jobs:
env -i RELEASE="\$RELEASE" docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env pull && \\
env -i RELEASE="\$RELEASE" docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env up --remove-orphans --wait --no-build
To deploy the latest build in this PR's branch to a existing deployment run the following update commands:
export BRANCH="${{ github.head_ref }}" && \\
export RELEASE="branch-${{ github.head_ref }}" && \\
cd /opt/Internet.nl/ && \\
curl -sSfO --output-dir docker https://raw.githubusercontent.com/internetstandards/Internet.nl/\$BRANCH/docker/defaults.env && \\
curl -sSfO --output-dir docker https://raw.githubusercontent.com/internetstandards/Internet.nl/\$BRANCH/docker/docker-compose.yml && \\
env -i RELEASE="\$RELEASE" docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env pull && \\
env -i RELEASE="\$RELEASE" docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env up --remove-orphans --wait --no-build
EOF
- name: Release deployment docs
Expand Down
10 changes: 0 additions & 10 deletions documentation/Docker-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,6 @@ If you want to update to a tagged version release, e.g. `v1.8.0`, use the follow
env -i RELEASE=$RELEASE docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env pull && \
env -i RELEASE=$RELEASE docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env up --remove-orphans --wait --no-build

To update to the latest build of the Pull Request branch use:

BRANCH=feature-x
RELEASE=branch-feature-x && \
cd /opt/Internet.nl/ && \
curl -sSfO --output-dir docker https://raw.githubusercontent.com/internetstandards/Internet.nl/${BRANCH }/docker/defaults.env && \
curl -sSfO --output-dir docker https://raw.githubusercontent.com/internetstandards/Internet.nl/${BRANCH }/docker/docker-compose.yml && \
env -i RELEASE=$RELEASE docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env pull && \
env -i RELEASE=$RELEASE docker compose --env-file=docker/defaults.env --env-file=docker/host.env --env-file=docker/local.env up --remove-orphans --wait --no-build

The `pull` command might sometimes fail with a timeout error. In that case just retry until it's working. Or check [Github Status](https://www.githubstatus.com) to see if Github is down again.

## Downgrading/rollback
Expand Down

0 comments on commit 0e466e5

Please sign in to comment.