mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
AAE-39318 Break dependency on AWS S3 (#11300)
This commit is contained in:
@@ -9,12 +9,6 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Before install
|
|
||||||
if: ${{ ! env.ACT }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
pip install --user --quiet awscli
|
|
||||||
|
|
||||||
- name: base vars
|
- name: base vars
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -3,17 +3,27 @@ description: "Download build artifacts"
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: download and extract artifacts from s3
|
- name: Restore dist from cache
|
||||||
shell: bash
|
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||||
env:
|
with:
|
||||||
REMOTE_PATH: "alfresco-ng2-components/build-cache/${{ github.run_id }}"
|
path: dist
|
||||||
run: |
|
key: dist-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
packages=( dist nxcache node_modules )
|
fail-on-cache-miss: true
|
||||||
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
|
- name: Restore nxcache from cache
|
||||||
du -h $i.tar.gz
|
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||||
time tar xzf $i.tar.gz
|
with:
|
||||||
done
|
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
|
- name: show files
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
name: 'Setup'
|
name: 'Setup'
|
||||||
description: 'Initialize cache, env var load'
|
description: 'Initialize cache, env var load'
|
||||||
inputs:
|
inputs:
|
||||||
enable-cache:
|
|
||||||
description: 'enable caching'
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
default: 'true'
|
|
||||||
enable-node-modules-cache:
|
enable-node-modules-cache:
|
||||||
description: 'enable caching for node modules'
|
description: 'enable caching for node modules'
|
||||||
required: false
|
required: false
|
||||||
@@ -42,14 +37,6 @@ runs:
|
|||||||
node_modules-${{ runner.os }}-build-${{ env.cache-name }}-
|
node_modules-${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
node_modules-${{ runner.os }}-build-
|
node_modules-${{ runner.os }}-build-
|
||||||
node_modules-${{ runner.os }}-
|
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"
|
- name: load "NPM TAG"
|
||||||
uses: ./.github/actions/set-npm-tag
|
uses: ./.github/actions/set-npm-tag
|
||||||
- name: before install script
|
- name: before install script
|
||||||
|
|||||||
@@ -4,16 +4,22 @@ description: "Upload build artifacts"
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: tar and upload artifacts
|
- name: Save dist to cache
|
||||||
shell: bash
|
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||||
env:
|
with:
|
||||||
REMOTE_PATH: "alfresco-ng2-components/build-cache/${{ github.run_id }}"
|
path: dist
|
||||||
run: |
|
key: dist-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
packages=( dist nxcache node_modules )
|
|
||||||
for i in "${packages[@]}"; do
|
- name: Save nxcache to cache
|
||||||
time tar czf $i.tar.gz $i
|
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||||
du -h $i.tar.gz
|
with:
|
||||||
time aws s3 cp --no-progress $i.tar.gz "s3://${S3_BUILD_BUCKET_SHORT_NAME}/${REMOTE_PATH}/$i.tar.gz"
|
path: nxcache
|
||||||
done
|
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 }}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,12 +17,9 @@ on:
|
|||||||
env:
|
env:
|
||||||
BASE_REF: ${{ github.base_ref }}
|
BASE_REF: ${{ github.base_ref }}
|
||||||
HEAD_REF: ${{ github.head_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_COMMIT: ${{ github.sha }}
|
||||||
GH_BUILD_NUMBER: ${{ github.run_id }}
|
GH_BUILD_NUMBER: ${{ github.run_id }}
|
||||||
LOG_LEVEL: "ERROR"
|
LOG_LEVEL: "ERROR"
|
||||||
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
|
|
||||||
NODE_OPTIONS: "--max-old-space-size=5120"
|
NODE_OPTIONS: "--max-old-space-size=5120"
|
||||||
NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }}
|
NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }}
|
||||||
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
|
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
|
||||||
|
|||||||
@@ -33,12 +33,9 @@ concurrency:
|
|||||||
env:
|
env:
|
||||||
BASE_REF: ${{ github.base_ref }}
|
BASE_REF: ${{ github.base_ref }}
|
||||||
HEAD_REF: ${{ github.head_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_COMMIT: ${{ github.sha }}
|
||||||
GH_BUILD_NUMBER: ${{ github.run_id }}
|
GH_BUILD_NUMBER: ${{ github.run_id }}
|
||||||
LOG_LEVEL: "ERROR"
|
LOG_LEVEL: "ERROR"
|
||||||
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
|
|
||||||
NODE_OPTIONS: "--max-old-space-size=5120"
|
NODE_OPTIONS: "--max-old-space-size=5120"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -13,12 +13,9 @@ on:
|
|||||||
env:
|
env:
|
||||||
BASE_REF: ${{ github.base_ref }}
|
BASE_REF: ${{ github.base_ref }}
|
||||||
HEAD_REF: ${{ github.head_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_COMMIT: ${{ github.sha }}
|
||||||
GH_BUILD_NUMBER: ${{ github.run_id }}
|
GH_BUILD_NUMBER: ${{ github.run_id }}
|
||||||
LOG_LEVEL: "ERROR"
|
LOG_LEVEL: "ERROR"
|
||||||
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
|
|
||||||
NODE_OPTIONS: "--max-old-space-size=5120"
|
NODE_OPTIONS: "--max-old-space-size=5120"
|
||||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||||
|
|
||||||
@@ -40,7 +37,6 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
enable-cache: false
|
|
||||||
enable-node-modules-cache: false
|
enable-node-modules-cache: false
|
||||||
- name: install
|
- name: install
|
||||||
run: |
|
run: |
|
||||||
@@ -63,7 +59,6 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
enable-cache: false
|
|
||||||
enable-node-modules-cache: false
|
enable-node-modules-cache: false
|
||||||
- id: set-dryrun
|
- id: set-dryrun
|
||||||
uses: ./.github/actions/enable-dryrun
|
uses: ./.github/actions/enable-dryrun
|
||||||
|
|||||||
@@ -23,12 +23,9 @@ concurrency:
|
|||||||
env:
|
env:
|
||||||
BASE_REF: ${{ github.base_ref }}
|
BASE_REF: ${{ github.base_ref }}
|
||||||
HEAD_REF: ${{ github.head_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_COMMIT: ${{ github.sha }}
|
||||||
GH_BUILD_NUMBER: ${{ github.run_id }}
|
GH_BUILD_NUMBER: ${{ github.run_id }}
|
||||||
LOG_LEVEL: "ERROR"
|
LOG_LEVEL: "ERROR"
|
||||||
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
|
|
||||||
NODE_OPTIONS: "--max-old-space-size=5120"
|
NODE_OPTIONS: "--max-old-space-size=5120"
|
||||||
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||||
|
|
||||||
@@ -45,7 +42,6 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
enable-cache: false
|
|
||||||
enable-node-modules-cache: false
|
enable-node-modules-cache: false
|
||||||
- name: install
|
- name: install
|
||||||
run: |
|
run: |
|
||||||
@@ -71,7 +67,6 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
enable-cache: false
|
|
||||||
enable-node-modules-cache: false
|
enable-node-modules-cache: false
|
||||||
- id: set-dryrun
|
- id: set-dryrun
|
||||||
uses: ./.github/actions/enable-dryrun
|
uses: ./.github/actions/enable-dryrun
|
||||||
|
|||||||
Reference in New Issue
Block a user