From 8c9f6a082814816b6dd063619e67b18e8a48eec9 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 24 Oct 2025 12:49:31 +0100 Subject: [PATCH] AAE-39318 Break dependency on AWS S3 (#11300) --- .github/actions/before-install/action.yml | 6 ---- .../action.yml | 34 ++++++++++++------- .github/actions/setup/action.yml | 13 ------- .../action.yml | 28 +++++++++------ .github/workflows/git-tag.yml | 3 -- .github/workflows/pull-request.yml | 3 -- .github/workflows/release-branch.yml | 5 --- .github/workflows/release.yml | 5 --- 8 files changed, 39 insertions(+), 58 deletions(-) diff --git a/.github/actions/before-install/action.yml b/.github/actions/before-install/action.yml index c2197103b4..29d8d86413 100644 --- a/.github/actions/before-install/action.yml +++ b/.github/actions/before-install/action.yml @@ -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: | diff --git a/.github/actions/download-node-modules-and-artifacts/action.yml b/.github/actions/download-node-modules-and-artifacts/action.yml index a61404aa3a..c67b9179d7 100644 --- a/.github/actions/download-node-modules-and-artifacts/action.yml +++ b/.github/actions/download-node-modules-and-artifacts/action.yml @@ -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 \ No newline at end of file + find node_modules/@alfresco/ -maxdepth 1 -type d diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 4679d6e6a1..5525adb002 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -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 diff --git a/.github/actions/upload-node-modules-and-artifacts/action.yml b/.github/actions/upload-node-modules-and-artifacts/action.yml index f482168d41..48f5dafecb 100644 --- a/.github/actions/upload-node-modules-and-artifacts/action.yml +++ b/.github/actions/upload-node-modules-and-artifacts/action.yml @@ -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 }} diff --git a/.github/workflows/git-tag.yml b/.github/workflows/git-tag.yml index a0e4811540..1aeaa525c3 100644 --- a/.github/workflows/git-tag.yml +++ b/.github/workflows/git-tag.yml @@ -17,12 +17,9 @@ on: env: BASE_REF: ${{ github.base_ref }} HEAD_REF: ${{ github.head_ref }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} GH_COMMIT: ${{ github.sha }} GH_BUILD_NUMBER: ${{ github.run_id }} LOG_LEVEL: "ERROR" - S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }} NODE_OPTIONS: "--max-old-space-size=5120" NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }} NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 94b6af2b2b..a019008079 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -33,12 +33,9 @@ concurrency: env: BASE_REF: ${{ github.base_ref }} HEAD_REF: ${{ github.head_ref }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} GH_COMMIT: ${{ github.sha }} GH_BUILD_NUMBER: ${{ github.run_id }} LOG_LEVEL: "ERROR" - S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }} NODE_OPTIONS: "--max-old-space-size=5120" jobs: diff --git a/.github/workflows/release-branch.yml b/.github/workflows/release-branch.yml index 27f884bfbf..065270120a 100644 --- a/.github/workflows/release-branch.yml +++ b/.github/workflows/release-branch.yml @@ -13,12 +13,9 @@ on: env: BASE_REF: ${{ github.base_ref }} HEAD_REF: ${{ github.head_ref }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} GH_COMMIT: ${{ github.sha }} GH_BUILD_NUMBER: ${{ github.run_id }} LOG_LEVEL: "ERROR" - S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }} NODE_OPTIONS: "--max-old-space-size=5120" GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} @@ -40,7 +37,6 @@ jobs: fetch-depth: 0 - uses: ./.github/actions/setup with: - enable-cache: false enable-node-modules-cache: false - name: install run: | @@ -63,7 +59,6 @@ jobs: fetch-depth: 0 - uses: ./.github/actions/setup with: - enable-cache: false enable-node-modules-cache: false - id: set-dryrun uses: ./.github/actions/enable-dryrun diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f11c22cb67..1b90e78d5b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,12 +23,9 @@ concurrency: env: BASE_REF: ${{ github.base_ref }} HEAD_REF: ${{ github.head_ref }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} GH_COMMIT: ${{ github.sha }} GH_BUILD_NUMBER: ${{ github.run_id }} LOG_LEVEL: "ERROR" - S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }} NODE_OPTIONS: "--max-old-space-size=5120" GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} @@ -45,7 +42,6 @@ jobs: fetch-depth: 0 - uses: ./.github/actions/setup with: - enable-cache: false enable-node-modules-cache: false - name: install run: | @@ -71,7 +67,6 @@ jobs: fetch-depth: 0 - uses: ./.github/actions/setup with: - enable-cache: false enable-node-modules-cache: false - id: set-dryrun uses: ./.github/actions/enable-dryrun