mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-6543] switch from aws to gha cache (#3582)
* switch to gha cache * save cache * use exact path * improve cache key * cleanup * cleanup * remove npm registry var * remove codeowners
This commit is contained in:
@@ -1,32 +1,6 @@
|
||||
name: "Before e2e"
|
||||
description: "Before e2e"
|
||||
|
||||
inputs:
|
||||
from:
|
||||
description: 'path to download the artifact'
|
||||
required: true
|
||||
type: string
|
||||
to:
|
||||
description: 'path to save artifact to'
|
||||
required: true
|
||||
type: string
|
||||
id:
|
||||
description: 'test suite id'
|
||||
required: true
|
||||
type: number
|
||||
aws-access-key-id:
|
||||
description: 'aws access key id'
|
||||
required: true
|
||||
type: string
|
||||
aws-secret-access-key:
|
||||
description: 'aws secret access key'
|
||||
required: true
|
||||
type: string
|
||||
aws-region:
|
||||
description: 'aws region'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -34,15 +8,6 @@ runs:
|
||||
shell: bash
|
||||
run: ./node_modules/@alfresco/adf-cli/bin/adf-cli check-cs-env --host $BASE_URL -u $ADMIN_EMAIL -p $ADMIN_PASSWORD || exit 1
|
||||
|
||||
- name: Download artifacts
|
||||
uses: ./.github/actions/download-job-artifact
|
||||
with:
|
||||
artifact: ${{ inputs.from }}
|
||||
output: ${{ inputs.to }}
|
||||
aws-access-key-id: ${{ inputs.aws-access-key-id }}
|
||||
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
|
||||
aws-region: ${{ inputs.aws-region }}
|
||||
|
||||
- name: Install google chrome
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
@@ -6,24 +6,6 @@ runs:
|
||||
steps:
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- name: setup S3 caching
|
||||
shell: bash
|
||||
run: |
|
||||
S3_DBP_PATH="s3://alfresco-travis-builds/aca"
|
||||
|
||||
if [ "${{ github.event_name }}" == "push" ]; then
|
||||
S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/$BRANCH_NAME"
|
||||
elif [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/$BRANCH_NAME"
|
||||
echo "BASE_HASH=origin/$BRANCH_NAME" >> $GITHUB_ENV
|
||||
elif [ "${{ github.event_name }}" == "schedule" ]; then
|
||||
S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/cron"
|
||||
else
|
||||
S3_DBP_ROOT_FOLDER="$S3_DBP_PATH/api"
|
||||
fi
|
||||
|
||||
echo "S3_DBP_FOLDER="$S3_DBP_ROOT_FOLDER/${{ github.run_id }}"" >> $GITHUB_ENV
|
||||
|
||||
- name: ADF linking
|
||||
if: ${{ github.event_name == 'pull_request'}}
|
||||
uses: ./.github/actions/adf-linking
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
name: "Download build artifacts"
|
||||
description: "Download build artifacts"
|
||||
|
||||
inputs:
|
||||
artifact:
|
||||
description: 'path to the s3 artifact (tar.bz2) to download and extract'
|
||||
required: true
|
||||
type: string
|
||||
output:
|
||||
description: 'directory to extract the archive to'
|
||||
required: true
|
||||
type: string
|
||||
aws-access-key-id:
|
||||
description: 'aws access key id'
|
||||
required: true
|
||||
type: string
|
||||
aws-secret-access-key:
|
||||
description: 'aws secret access key'
|
||||
required: true
|
||||
type: string
|
||||
aws-region:
|
||||
description: 'aws region'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v2
|
||||
with:
|
||||
aws-access-key-id: ${{ inputs.aws-access-key-id }}
|
||||
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
|
||||
aws-region: ${{ inputs.aws-region }}
|
||||
|
||||
- name: Download build artifacts from s3
|
||||
shell: bash
|
||||
run: |
|
||||
test ! -d ${{ inputs.output }} && mkdir -p ${{ inputs.output }}
|
||||
aws s3 cp ${{ inputs.artifact }} ./s3-artifact.tmp
|
||||
echo 'artifact download done'
|
||||
tar -xvf ./s3-artifact.tmp -C ${{ inputs.output }} >&/dev/null
|
||||
echo 'tar the artifact done'
|
||||
rm ./s3-artifact.tmp
|
||||
echo 'remove tmp file'
|
||||
@@ -10,10 +10,6 @@ inputs:
|
||||
description: 'Github token'
|
||||
required: true
|
||||
type: string
|
||||
npm_registry_address:
|
||||
description: 'NPM registry address'
|
||||
required: true
|
||||
type: string
|
||||
npm_registry_token:
|
||||
description: 'NPM registry token'
|
||||
required: true
|
||||
@@ -59,7 +55,7 @@ runs:
|
||||
name: setup NPM registry
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
registry-url: 'https://${{ inputs.npm_registry_address }}'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
scope: '@alfresco'
|
||||
|
||||
- name: Publish to NPM registry
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
name: "Upload build artifacts"
|
||||
description: "Upload build artifacts"
|
||||
|
||||
inputs:
|
||||
artifact:
|
||||
description: 'path to the artifact to archieve (tar.bz2) and upload (like ./dist)'
|
||||
required: true
|
||||
type: string
|
||||
output:
|
||||
description: 'the S3 object to copy it to, like: s3://bucket-name/folder/whatever.tar.bz2'
|
||||
required: true
|
||||
type: string
|
||||
aws-access-key-id:
|
||||
description: 'aws access key id'
|
||||
required: true
|
||||
type: string
|
||||
aws-secret-access-key:
|
||||
description: 'aws secret access key'
|
||||
required: true
|
||||
type: string
|
||||
aws-region:
|
||||
description: 'aws region'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v2
|
||||
with:
|
||||
aws-access-key-id: ${{ inputs.aws-access-key-id }}
|
||||
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
|
||||
aws-region: ${{ inputs.aws-region }}
|
||||
|
||||
- name: Upload build artifacts to s3
|
||||
shell: bash
|
||||
run: |
|
||||
tar cvfj ./s3-artifact.tmp -C ${{ inputs.artifact }} `ls ${{ inputs.artifact }}`
|
||||
aws s3 cp ./s3-artifact.tmp ${{ inputs.output }}
|
||||
rm ./s3-artifact.tmp
|
||||
Reference in New Issue
Block a user