Skip to content

Commit

Permalink
Only sync the job's images (#1425)
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek authored Sep 12, 2024
1 parent fcdc187 commit c0fdcdf
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 48 deletions.
74 changes: 37 additions & 37 deletions .github/promote-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,40 @@
# We use a regex rule: Any tag that starts with 'CURRENT_YEAR-CURRENT_MONTH'.
"europe-docker.pkg.dev/gitpod-artifacts/docker-dev":
images-by-tag-regex:
workspace-base: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-c: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-clojure: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-elixir: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-full: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-full-vnc: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-go: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-nix: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-node: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-node-lts: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-node-18: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-node-20: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-node-22: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-python: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-python-3.8: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-python-3.9: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-python-3.10: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-python-3.11: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-python-3.12: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-ruby-3: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-ruby-3.1: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-ruby-3.2: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-ruby-3.3: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-rust: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-dotnet: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-dotnet-6: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-dotnet-8: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-postgres: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-mysql: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-mongodb: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-java-11: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-java-17: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-java-21: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-yugabytedb: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-yugabytedb-preview: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-gitpod-dev: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-bun: "CURRENT_YEAR-CURRENT_MONTH.*"
workspace-base: "TIMESTAMP_TAG"
workspace-c: "TIMESTAMP_TAG"
workspace-clojure: "TIMESTAMP_TAG"
workspace-elixir: "TIMESTAMP_TAG"
workspace-full: "TIMESTAMP_TAG"
workspace-full-vnc: "TIMESTAMP_TAG"
workspace-go: "TIMESTAMP_TAG"
workspace-nix: "TIMESTAMP_TAG"
workspace-node: "TIMESTAMP_TAG"
workspace-node-lts: "TIMESTAMP_TAG"
workspace-node-18: "TIMESTAMP_TAG"
workspace-node-20: "TIMESTAMP_TAG"
workspace-node-22: "TIMESTAMP_TAG"
workspace-python: "TIMESTAMP_TAG"
workspace-python-3.8: "TIMESTAMP_TAG"
workspace-python-3.9: "TIMESTAMP_TAG"
workspace-python-3.10: "TIMESTAMP_TAG"
workspace-python-3.11: "TIMESTAMP_TAG"
workspace-python-3.12: "TIMESTAMP_TAG"
workspace-ruby-3: "TIMESTAMP_TAG"
workspace-ruby-3.1: "TIMESTAMP_TAG"
workspace-ruby-3.2: "TIMESTAMP_TAG"
workspace-ruby-3.3: "TIMESTAMP_TAG"
workspace-rust: "TIMESTAMP_TAG"
workspace-dotnet: "TIMESTAMP_TAG"
workspace-dotnet-6: "TIMESTAMP_TAG"
workspace-dotnet-8: "TIMESTAMP_TAG"
workspace-postgres: "TIMESTAMP_TAG"
workspace-mysql: "TIMESTAMP_TAG"
workspace-mongodb: "TIMESTAMP_TAG"
workspace-java-11: "TIMESTAMP_TAG"
workspace-java-17: "TIMESTAMP_TAG"
workspace-java-21: "TIMESTAMP_TAG"
workspace-yugabytedb: "TIMESTAMP_TAG"
workspace-yugabytedb-preview: "TIMESTAMP_TAG"
workspace-gitpod-dev: "TIMESTAMP_TAG"
workspace-bun: "TIMESTAMP_TAG"
5 changes: 0 additions & 5 deletions .github/workflows/dockerhub-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ jobs:
env:
SKOPEO_AUTH_DIR: ${{env.SKOPEO_AUTH_DIR}}
run: |
# limit what we promote to latest for the current year only
current_year=$(date +%Y)
current_month=""
sed -i "s/CURRENT_YEAR/$current_year/g; s/CURRENT_MONTH/$current_month/g" "${GITHUB_WORKSPACE}/.github/promote-images.yml"
IMAGES=$(cat .github/promote-images.yml | yq '."europe-docker.pkg.dev/gitpod-artifacts/docker-dev"."images-by-tag-regex"|keys[]' -r)
for IMAGE in $IMAGES;
do
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ jobs:
run: |
curl -sSL "https://github.com/gitpod-io/dazzle/releases/download/v${DAZZLE_VERSION}/dazzle_${DAZZLE_VERSION}_Linux_x86_64.tar.gz" | sudo tar -xvz -C /usr/local/bin
- name: 🕰️ Create timestamp tag
id: create-timestamp-tag
run: |
echo "TIMESTAMP_TAG=$(date '+%Y-%m-%d-%H-%M-%S')" >> $GITHUB_ENV
- name: 🔆 Install skopeo
env:
SKOPEO_VERSION: ${{env.SKOPEO_VERSION}}
Expand All @@ -80,7 +85,7 @@ jobs:
# limit what we push as time stamped images to images built in the current year and month only
current_year=$(date +%Y)
current_month=$(date +%m)
sed -i "s/CURRENT_YEAR/$current_year/g; s/CURRENT_MONTH/$current_month/g" "${GITHUB_WORKSPACE}/.github/promote-images.yml"
sed -i "s/TIMESTAMP_TAG/$TIMESTAMP_TAG/g" "${GITHUB_WORKSPACE}/.github/promote-images.yml"
cp "${GITHUB_WORKSPACE}/.github/promote-images.yml" "${SKOPEO_SYNC_FILES}"
# Build a fake skopeo script to run a container
Expand Down Expand Up @@ -149,11 +154,6 @@ jobs:
run: |
dazzle combine "${GAR_IMAGE_REGISTRY}/gitpod-artifacts/docker-dev/workspace-base-images" --all
- name: 🕰️ Create timestamp tag
id: create-timestamp-tag
run: |
echo "TIMESTAMP_TAG=$(date '+%Y-%m-%d-%H-%M-%S')" >> $GITHUB_ENV
- name: 🔧 Setup copy tools
run: |
# this installs yq 3
Expand Down

0 comments on commit c0fdcdf

Please sign in to comment.