Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Jul 21, 2024
1 parent e832fb2 commit 28b1829
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/ci-cd-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ jobs:
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: gcloud config list account


check_workflow_uptodate:
Expand Down Expand Up @@ -118,6 +117,7 @@ jobs:
env:
ARTIFACT_NAME: rbenv-src
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}

- name: Extract Rbenv source
run: ./internal-scripts/ci-cd/check-version-numbers-need-changing/extract-rbenv-source.sh
Expand Down Expand Up @@ -822,6 +822,7 @@ jobs:
env:
ARTIFACT_NAME: docker-image-utility
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Load utility Docker image
run: ./internal-scripts/ci-cd/load-docker-image.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
Expand Down Expand Up @@ -889,6 +890,7 @@ jobs:
env:
ARTIFACT_NAME: docker-image-utility
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Load utility Docker image
run: ./internal-scripts/ci-cd/load-docker-image.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
Expand Down Expand Up @@ -963,13 +965,15 @@ jobs:
env:
ARTIFACT_NAME: rbenv-src
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}

- name: Download utility Docker image
run: ./internal-scripts/ci-cd/download-artifact.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
env:
ARTIFACT_NAME: docker-image-utility
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Load utility Docker image
run: ./internal-scripts/ci-cd/load-docker-image.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
Expand Down Expand Up @@ -1042,13 +1046,15 @@ jobs:
env:
ARTIFACT_NAME: rbenv-src
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}

- name: Download utility Docker image
run: ./internal-scripts/ci-cd/download-artifact.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
env:
ARTIFACT_NAME: docker-image-utility
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Load utility Docker image
run: ./internal-scripts/ci-cd/load-docker-image.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
Expand Down Expand Up @@ -1129,6 +1135,7 @@ jobs:
env:
ARTIFACT_NAME: gem-bundle
ARTIFACT_PATH: vendor/bundle
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Tar up gem bundle artifact
# Because actions/upload-archive is very slow when operating on directories
# with many files
Expand All @@ -1144,6 +1151,7 @@ jobs:
env:
ARTIFACT_NAME: rbenv-src
ARTIFACT_PATH: artifacts
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Rbenv source artifact to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -1158,6 +1166,7 @@ jobs:
ARTIFACT_NAME: 'docker-image-centos-8'
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Docker image artifact [centos-8] to Github
uses: actions/upload-artifact@v4
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Build Docker image centos-8;')
Expand All @@ -1171,6 +1180,7 @@ jobs:
ARTIFACT_NAME: 'docker-image-debian-10'
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Docker image artifact [debian-10] to Github
uses: actions/upload-artifact@v4
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Build Docker image debian-10;')
Expand All @@ -1184,6 +1194,7 @@ jobs:
ARTIFACT_NAME: 'docker-image-debian-11'
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Docker image artifact [debian-11] to Github
uses: actions/upload-artifact@v4
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Build Docker image debian-11;')
Expand All @@ -1197,6 +1208,7 @@ jobs:
ARTIFACT_NAME: 'docker-image-debian-12'
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Docker image artifact [debian-12] to Github
uses: actions/upload-artifact@v4
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Build Docker image debian-12;')
Expand All @@ -1210,6 +1222,7 @@ jobs:
ARTIFACT_NAME: 'docker-image-el-9'
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Docker image artifact [el-9] to Github
uses: actions/upload-artifact@v4
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Build Docker image el-9;')
Expand All @@ -1223,6 +1236,7 @@ jobs:
ARTIFACT_NAME: 'docker-image-ubuntu-20.04'
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Docker image artifact [ubuntu-20.04] to Github
uses: actions/upload-artifact@v4
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Build Docker image ubuntu-20.04;')
Expand All @@ -1236,6 +1250,7 @@ jobs:
ARTIFACT_NAME: 'docker-image-ubuntu-22.04'
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Docker image artifact [ubuntu-22.04] to Github
uses: actions/upload-artifact@v4
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Build Docker image ubuntu-22.04;')
Expand All @@ -1249,6 +1264,7 @@ jobs:
ARTIFACT_NAME: 'docker-image-ubuntu-24.04'
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Docker image artifact [ubuntu-24.04] to Github
uses: actions/upload-artifact@v4
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Build Docker image ubuntu-24.04;')
Expand All @@ -1262,6 +1278,7 @@ jobs:
ARTIFACT_NAME: 'docker-image-utility'
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Docker image artifact [utility] to Github
uses: actions/upload-artifact@v4
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Build Docker image utility;')
Expand All @@ -1276,6 +1293,7 @@ jobs:
ARTIFACT_NAME: ruby-src-3.3.4
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Ruby source artifact [3.3.4] to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -1287,6 +1305,7 @@ jobs:
ARTIFACT_NAME: ruby-src-3.2.4
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Ruby source artifact [3.2.4] to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -1298,6 +1317,7 @@ jobs:
ARTIFACT_NAME: ruby-src-3.1.6
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Ruby source artifact [3.1.6] to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -1309,6 +1329,7 @@ jobs:
ARTIFACT_NAME: ruby-src-3.0.7
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Ruby source artifact [3.0.7] to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -1321,6 +1342,7 @@ jobs:
ARTIFACT_NAME: common-deb
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive common DEB artifact to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -1333,6 +1355,7 @@ jobs:
ARTIFACT_NAME: common-rpm
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive common RPM artifact to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -1345,6 +1368,7 @@ jobs:
ARTIFACT_NAME: rbenv-deb
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Rbenv DEB artifact to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -1357,6 +1381,7 @@ jobs:
ARTIFACT_NAME: rbenv-rpm
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Rbenv RPM artifact to Github
uses: actions/upload-artifact@v4
with:
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/ci-cd-main.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ jobs:
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: gcloud config list account


check_workflow_uptodate:
Expand Down Expand Up @@ -108,6 +107,7 @@ jobs:
env:
ARTIFACT_NAME: <%= rbenv_source_artifact_name %>
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}

- name: Extract Rbenv source
run: ./internal-scripts/ci-cd/check-version-numbers-need-changing/extract-rbenv-source.sh
Expand Down Expand Up @@ -357,6 +357,7 @@ jobs:
env:
ARTIFACT_NAME: <%= docker_image_artifact_name('utility') %>
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Load utility Docker image
run: ./internal-scripts/ci-cd/load-docker-image.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
Expand Down Expand Up @@ -424,6 +425,7 @@ jobs:
env:
ARTIFACT_NAME: <%= docker_image_artifact_name('utility') %>
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Load utility Docker image
run: ./internal-scripts/ci-cd/load-docker-image.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
Expand Down Expand Up @@ -498,13 +500,15 @@ jobs:
env:
ARTIFACT_NAME: <%= rbenv_source_artifact_name %>
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}

- name: Download utility Docker image
run: ./internal-scripts/ci-cd/download-artifact.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
env:
ARTIFACT_NAME: <%= docker_image_artifact_name('utility') %>
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Load utility Docker image
run: ./internal-scripts/ci-cd/load-docker-image.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
Expand Down Expand Up @@ -577,13 +581,15 @@ jobs:
env:
ARTIFACT_NAME: <%= rbenv_source_artifact_name %>
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}

- name: Download utility Docker image
run: ./internal-scripts/ci-cd/download-artifact.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
env:
ARTIFACT_NAME: <%= docker_image_artifact_name('utility') %>
ARTIFACT_PATH: .
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Load utility Docker image
run: ./internal-scripts/ci-cd/load-docker-image.sh
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Use locally-built Docker image utility;')
Expand Down Expand Up @@ -657,6 +663,7 @@ jobs:
env:
ARTIFACT_NAME: gem-bundle
ARTIFACT_PATH: vendor/bundle
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Tar up gem bundle artifact
# Because actions/upload-archive is very slow when operating on directories
# with many files
Expand All @@ -672,6 +679,7 @@ jobs:
env:
ARTIFACT_NAME: <%= rbenv_source_artifact_name %>
ARTIFACT_PATH: artifacts
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Rbenv source artifact to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -687,6 +695,7 @@ jobs:
ARTIFACT_NAME: '<%= docker_image_artifact_name(image[:id]) %>'
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Docker image artifact [<%= image[:id] %>] to Github
uses: actions/upload-artifact@v4
if: contains(needs.determine_necessary_jobs.outputs.necessary_jobs, ';Build Docker image <%= image[:id] %>;')
Expand All @@ -704,6 +713,7 @@ jobs:
ARTIFACT_NAME: <%= ruby_source_artifact_name(ruby_version) %>
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Ruby source artifact [<%= ruby_version %>] to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -718,6 +728,7 @@ jobs:
ARTIFACT_NAME: <%= common_deb_artifact_name %>
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive common DEB artifact to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -730,6 +741,7 @@ jobs:
ARTIFACT_NAME: <%= common_rpm_artifact_name %>
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive common RPM artifact to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -742,6 +754,7 @@ jobs:
ARTIFACT_NAME: <%= rbenv_deb_artifact_name %>
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Rbenv DEB artifact to Github
uses: actions/upload-artifact@v4
with:
Expand All @@ -754,6 +767,7 @@ jobs:
ARTIFACT_NAME: <%= rbenv_rpm_artifact_name %>
ARTIFACT_PATH: artifacts
CLEAR: true
CI_ARTIFACTS_BUCKET: ${{ vars.CI_ARTIFACTS_BUCKET }}
- name: Archive Rbenv RPM artifact to Github
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 28b1829

Please sign in to comment.