AAE-39318 Break dependency on AWS S3 (#11300)

This commit is contained in:
Denys Vuika
2025-10-24 07:49:31 -04:00
committed by GitHub
parent 160b12993f
commit 8c9f6a0828
8 changed files with 39 additions and 58 deletions
@@ -9,12 +9,6 @@ inputs:
runs:
using: "composite"
steps:
- name: Before install
if: ${{ ! env.ACT }}
shell: bash
run: |
pip install --user --quiet awscli
- name: base vars
shell: bash
run: |
@@ -3,17 +3,27 @@ description: "Download build artifacts"
runs:
using: "composite"
steps:
- name: download and extract artifacts from s3
shell: bash
env:
REMOTE_PATH: "alfresco-ng2-components/build-cache/${{ github.run_id }}"
run: |
packages=( dist nxcache node_modules )
for i in "${packages[@]}"; do
time aws s3 cp --no-progress s3://${S3_BUILD_BUCKET_SHORT_NAME}/${REMOTE_PATH}/$i.tar.gz $i.tar.gz
du -h $i.tar.gz
time tar xzf $i.tar.gz
done
- name: Restore dist from cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: dist
key: dist-${{ github.run_id }}-${{ github.run_attempt }}
fail-on-cache-miss: true
- name: Restore nxcache from cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: nxcache
key: nxcache-${{ github.run_id }}-${{ github.run_attempt }}
fail-on-cache-miss: true
- name: Restore node_modules from cache
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: node_modules
key: node-modules-${{ github.run_id }}-${{ github.run_attempt }}
fail-on-cache-miss: true
- name: show files
shell: bash
run: |
@@ -24,4 +34,4 @@ runs:
echo "====NXCACHE===="
find nxcache -maxdepth 1 -type d
echo "====ADF===="
find node_modules/@alfresco/ -maxdepth 1 -type d
find node_modules/@alfresco/ -maxdepth 1 -type d
-13
View File
@@ -1,11 +1,6 @@
name: 'Setup'
description: 'Initialize cache, env var load'
inputs:
enable-cache:
description: 'enable caching'
required: false
type: boolean
default: 'true'
enable-node-modules-cache:
description: 'enable caching for node modules'
required: false
@@ -42,14 +37,6 @@ runs:
node_modules-${{ runner.os }}-build-${{ env.cache-name }}-
node_modules-${{ runner.os }}-build-
node_modules-${{ runner.os }}-
- name: pip cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
if: ${{ inputs.enable-cache == 'true' }}
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-
restore-keys: |
${{ runner.os }}
- name: load "NPM TAG"
uses: ./.github/actions/set-npm-tag
- name: before install script
@@ -4,16 +4,22 @@ description: "Upload build artifacts"
runs:
using: "composite"
steps:
- name: tar and upload artifacts
shell: bash
env:
REMOTE_PATH: "alfresco-ng2-components/build-cache/${{ github.run_id }}"
run: |
packages=( dist nxcache node_modules )
for i in "${packages[@]}"; do
time tar czf $i.tar.gz $i
du -h $i.tar.gz
time aws s3 cp --no-progress $i.tar.gz "s3://${S3_BUILD_BUCKET_SHORT_NAME}/${REMOTE_PATH}/$i.tar.gz"
done
- name: Save dist to cache
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: dist
key: dist-${{ github.run_id }}-${{ github.run_attempt }}
- name: Save nxcache to cache
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: nxcache
key: nxcache-${{ github.run_id }}-${{ github.run_attempt }}
- name: Save node_modules to cache
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: node_modules
key: node-modules-${{ github.run_id }}-${{ github.run_attempt }}