mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[AAE-11882] demoshell fix; pipeline bugfix (#8093)
* demoshell regr fix; s3 cache on s3; setup chrome; e2e headless fix
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
name: "pull-request"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
dry-run-release:
|
||||
description: 'enable dry-run on artifact push'
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
@@ -49,7 +56,14 @@ env:
|
||||
SMART_RUNNER_PATH: ".protractor-smartrunner"
|
||||
S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
|
||||
S3_BUILD_BUCKET: ${{ secrets.S3_BUILD_BUCKET }}
|
||||
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
|
||||
NODE_OPTIONS: "--max-old-space-size=5120"
|
||||
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
|
||||
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
|
||||
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
|
||||
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
|
||||
DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
|
||||
|
||||
jobs:
|
||||
main:
|
||||
# long timeout required when cache has to be recreated
|
||||
@@ -72,7 +86,7 @@ jobs:
|
||||
- run: nx affected:build $NX_CALCULATION_FLAGS --prod
|
||||
- run: nx build demoshell --configuration production
|
||||
- run: nx run stories:build-storybook --configuration ci
|
||||
- uses: ./.github/actions/upload-build-artifacts
|
||||
- uses: ./.github/actions/upload-cache-and-artifacts
|
||||
|
||||
playwright:
|
||||
timeout-minutes: 20
|
||||
@@ -85,20 +99,13 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # Fetch all history for all
|
||||
- uses: ./.github/actions/setup
|
||||
- name: clean
|
||||
run: |
|
||||
rm -rf nxcache
|
||||
rm -rf dist
|
||||
- uses: ./.github/actions/download-build-artifacts
|
||||
- name: build adf cli
|
||||
run: |
|
||||
nx build cli
|
||||
- uses: ./.github/actions/download-cache-and-artifacts
|
||||
- name: Process Cloud Storybook Playwright
|
||||
run: |
|
||||
npx playwright install chromium
|
||||
sudo sysctl -w fs.inotify.max_user_watches=524288
|
||||
npx playwright test --config='e2e-playwright/playwright.config.ts' || exit 1
|
||||
- uses: ./.github/actions/upload-build-artifacts
|
||||
- uses: ./.github/actions/upload-cache-and-artifacts
|
||||
|
||||
e2e:
|
||||
timeout-minutes: 90
|
||||
@@ -142,7 +149,7 @@ jobs:
|
||||
auth: "BASIC"
|
||||
check-cs-env: "true"
|
||||
- description: "Content: Upload and Versioning"
|
||||
test-id: "content-services browser"
|
||||
test-id: "content-services"
|
||||
folder: "content-services/upload"
|
||||
provider: "ECM"
|
||||
auth: "BASIC"
|
||||
@@ -230,11 +237,10 @@ jobs:
|
||||
- uses: ./.github/actions/setup
|
||||
with:
|
||||
enable-cache: "true"
|
||||
- name: clean
|
||||
run: |
|
||||
rm -rf nxcache
|
||||
rm -rf dist
|
||||
- uses: ./.github/actions/download-build-artifacts
|
||||
enable-node-modules-cache: "true"
|
||||
- uses: ./.github/actions/download-cache-and-artifacts
|
||||
- name: setup chrome
|
||||
uses: ./.github/actions/setup-chrome
|
||||
- name: e2e
|
||||
uses: ./.github/actions/e2e
|
||||
with:
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
name: "release"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
dry-run-release:
|
||||
description: 'enable dry-run on artifact push'
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
pull_request:
|
||||
types: [closed]
|
||||
branches:
|
||||
@@ -10,6 +17,8 @@ on:
|
||||
- master-patch*
|
||||
|
||||
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 }}
|
||||
GITHUB_BRANCH: ${{ github.ref_name }}
|
||||
@@ -17,7 +26,7 @@ env:
|
||||
TRAVIS_COMMIT: ${{ github.sha }}
|
||||
BUILD_ID: ${{ github.run_id }}
|
||||
TRAVIS_RUN_NUMBER: ${{ github.run_attempt }}
|
||||
TRAVIS_BUILD_NUMBER: github-run-${{ github.run_id }}
|
||||
TRAVIS_BUILD_NUMBER: ${{ github.run_id }}
|
||||
JOB_ID: ${{ github.run_id }}
|
||||
PROXY_HOST_BPM: ${{ secrets.E2E_HOST }}
|
||||
E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }}
|
||||
@@ -44,20 +53,23 @@ env:
|
||||
PASSWORD_SUPER_ADMIN_ADF: ${{ secrets.PASSWORD_SUPER_ADMIN_ADF }}
|
||||
HR_USER: ${{ secrets.HR_USER }}
|
||||
HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
|
||||
NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }}
|
||||
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
|
||||
SMART_RUNNER_PATH: ".protractor-smartrunner"
|
||||
S3_DBP_PATH: ${{ secrets.S3_DBP_PATH }}
|
||||
S3_BUILD_BUCKET: ${{ secrets.S3_BUILD_BUCKET }}
|
||||
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
|
||||
NODE_OPTIONS: "--max-old-space-size=5120"
|
||||
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
|
||||
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
|
||||
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
|
||||
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
|
||||
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
|
||||
DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
|
||||
NODE_OPTIONS: "--max-old-space-size=5120"
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
setup:
|
||||
timeout-minutes: 20
|
||||
if: github.event.pull_request.merged == true
|
||||
name: "Build Components"
|
||||
if: github.event.pull_request.merged || ${{ inputs.dry-run-release }}
|
||||
name: "Setup"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -65,20 +77,17 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/setup
|
||||
- run: npm -v
|
||||
- name: install
|
||||
run: |
|
||||
npm ci
|
||||
nx run cli:bundle
|
||||
nx run testing:bundle
|
||||
- run: npx nx affected --target=lint $NX_CALCULATION_FLAGS
|
||||
- run: nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell"
|
||||
- uses: ./.github/actions/upload-build-artifacts
|
||||
- uses: ./.github/actions/upload-cache-and-artifacts
|
||||
|
||||
release-demoshell:
|
||||
needs: [release-npm]
|
||||
needs: [setup]
|
||||
timeout-minutes: 15
|
||||
if: github.event.pull_request.merged == true
|
||||
if: github.event.pull_request.merged || ${{ inputs.dry-run-release }}
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -86,48 +95,51 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- run: git fetch --all
|
||||
- id: set-dryrun
|
||||
uses: ./.github/actions/enable-dryrun
|
||||
with:
|
||||
dry-run-flag: ${{ inputs.dry-run-release }}
|
||||
- uses: ./.github/actions/setup
|
||||
with:
|
||||
enable-cache: false
|
||||
- name: install nx and cli
|
||||
run: |
|
||||
npm ci
|
||||
nx run cli:bundle
|
||||
- name: push Demoshell docker image
|
||||
enable-cache: false
|
||||
enable-node-modules-cache: false
|
||||
- uses: ./.github/actions/download-cache-and-artifacts
|
||||
- name: release Demoshell docker
|
||||
run: |
|
||||
nx build demoshell --configuration production
|
||||
. ./scripts/travis/release/docker-tag.sh
|
||||
echo $TAGS
|
||||
./scripts/travis/release/release-demoshell-docker.sh
|
||||
./scripts/travis/release/release-demoshell-docker.sh ${{ steps.set-dryrun.outputs.dryrun }}
|
||||
|
||||
release-storybook:
|
||||
needs: [release-npm]
|
||||
needs: [setup]
|
||||
timeout-minutes: 15
|
||||
if: github.event.pull_request.merged == true
|
||||
if: github.event.pull_request.merged || ${{ inputs.dry-run-release }}
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 1
|
||||
- run: git fetch --all
|
||||
- id: set-dryrun
|
||||
uses: ./.github/actions/enable-dryrun
|
||||
with:
|
||||
dry-run-flag: ${{ inputs.dry-run-release }}
|
||||
- uses: ./.github/actions/setup
|
||||
with:
|
||||
enable-cache: false
|
||||
- name: install nx and cli
|
||||
run: |
|
||||
npm ci
|
||||
nx run cli:bundle
|
||||
- name: push Storybook docker image
|
||||
enable-node-modules-cache: false
|
||||
- uses: ./.github/actions/download-cache-and-artifacts
|
||||
- name: release Storybook docker
|
||||
run: |
|
||||
nx run stories:build-storybook --configuration ci
|
||||
. ./scripts/travis/release/docker-tag.sh
|
||||
echo $TAGS
|
||||
./scripts/travis/release/release-storybook-docker.sh
|
||||
. ./scripts/travis/release/docker-tag.sh
|
||||
./scripts/travis/release/release-storybook-docker.sh ${{ steps.set-dryrun.outputs.dryrun }}
|
||||
|
||||
release-npm:
|
||||
needs: [build]
|
||||
needs: [setup]
|
||||
timeout-minutes: 15
|
||||
if: github.event.pull_request.merged == true
|
||||
if: github.event.pull_request.merged == true || ${{ inputs.dry-run-release }}
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -137,23 +149,25 @@ jobs:
|
||||
- uses: ./.github/actions/setup
|
||||
with:
|
||||
enable-cache: false
|
||||
- name: install nx and cli
|
||||
run: |
|
||||
npm ci
|
||||
nx run cli:bundle
|
||||
- name: nx build
|
||||
enable-node-modules-cache: false
|
||||
- id: set-dryrun
|
||||
uses: ./.github/actions/enable-dryrun
|
||||
with:
|
||||
dry-run-flag: ${{ inputs.dry-run-release }}
|
||||
- uses: ./.github/actions/download-cache-and-artifacts
|
||||
- name: build libraries
|
||||
run: |
|
||||
set -u;
|
||||
./scripts/travis/build/bumpversion.sh
|
||||
nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell"
|
||||
nx affected $NX_CALCULATION_FLAGS --target=pretheme
|
||||
- name: release
|
||||
run: ./scripts/travis/release/release-npm.sh
|
||||
- name: release libraries
|
||||
run: ./scripts/travis/release/release-npm.sh ${{ steps.set-dryrun.outputs.dryrun }}
|
||||
|
||||
npm-check-bundle:
|
||||
needs: [release-npm]
|
||||
timeout-minutes: 15
|
||||
if: github.event.pull_request.merged == true
|
||||
if: github.event.pull_request.merged == true || ${{ inputs.dry-run-release }}
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
Reference in New Issue
Block a user