forked from rancher/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
238 additions
and
106 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Pandaria Build Dashboard (Branch) | ||
on: | ||
push: | ||
branches: | ||
- 'release-*-cn*' | ||
|
||
jobs: | ||
build-validation: | ||
name: Build Test | ||
uses: ./.github/workflows/build-test-pandaria.yaml | ||
build: | ||
name: Build and Upload | ||
uses: ./.github/workflows/build-and-upload-pandaria.yaml | ||
needs: | ||
- build-validation | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
with: | ||
CI_BRANCH: ${{github.ref_name}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Pandaria Build Dashboard and Upload | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
CI_BRANCH: | ||
required: false | ||
type: string | ||
CI_BUILD_TAG: | ||
required: false | ||
type: string | ||
|
||
env: | ||
CI_BUILD_TAG: ${{inputs.CI_BUILD_TAG}} | ||
CI_BRANCH: ${{inputs.CI_BRANCH}} | ||
GIT_REPO: ${{github.repository}} | ||
GIT_COMMIT: ${{github.sha}} | ||
REPO: ${{github.event.repository.name || ''}} | ||
|
||
jobs: | ||
build-and-upload-hosted: | ||
name: Build & Upload Hosted | ||
runs-on: repo-dashboard-runner-k8s | ||
container: ubuntu:22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
# Note - Cannot use the setup action here as it uses a different yarn install arg | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
||
# Build a directory containing the dashboard that can be used with ui-dashboard-index | ||
- id: build-hosted | ||
name: Build Hosted | ||
run: ./scripts/build-hosted | ||
|
||
- id: upload-gate | ||
name: Upload Gate (superceded by a newer build?) | ||
run: ./scripts/build-upload-gate | ||
|
||
- name: Setup AWS CLI | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ap-southeast-2 | ||
|
||
- name: Upload build | ||
run: | | ||
aws s3 sync --delete --acl public-read ${{steps.build-hosted.outputs.BUILD_HOSTED_DIR}} s3://pandaria-dashboard-ui/dashboard/${{ steps.build-hosted.outputs.BUILD_HOSTED_LOCATION }} | ||
build-and-upload-embedded: | ||
name: Build & Upload Embedded | ||
runs-on: repo-dashboard-runner-k8s | ||
container: ubuntu:22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
# Note - Cannot use the setup action here as it uses a different yarn install arg | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
||
# Build a tar that will be picked up by rancher builds and embedded into it | ||
- id: build-embedded | ||
name: Build Embedded | ||
run: ./scripts/build-embedded | ||
env: | ||
EMBED_PKG: https://releases.rancher.com/harvester-ui/plugin/harvester-1.0.3.tar.gz | ||
- name: Setup AWS CLI | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ap-southeast-2 | ||
|
||
- name: Upload tar | ||
run: | | ||
aws s3 cp ${{steps.build-embedded.outputs.BUILD_EMBEDED_TGZ}} s3://pandaria-dashboard-ui/${{env.CI_BRANCH}}/ | ||
8 changes: 4 additions & 4 deletions
8
...rkflows/build-and-upload-release-2-8.yaml → ...ws/build-and-upload-release-pandaria.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Validation steps required before a build occurs. Not designed to replace the CI test workflow | ||
name: Build Test | ||
|
||
on: | ||
# This tells GH that the workflow is reusable | ||
workflow_call: | ||
|
||
jobs: | ||
unit-test: | ||
runs-on: repo-dashboard-runner-k8s | ||
container: ubuntu:22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Run tests | ||
uses: ./.github/actions/unit-tests | ||
|
||
i18n: | ||
runs-on: repo-dashboard-runner-k8s | ||
container: ubuntu:22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Run i18n lint | ||
uses: ./.github/actions/i18n-lint | ||
|
||
lint: | ||
runs-on: repo-dashboard-runner-k8s | ||
container: ubuntu:22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Run lint | ||
uses: ./.github/actions/lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Pandaria Tests | ||
on: | ||
push: | ||
branches: | ||
- 'release-*-cn*' | ||
pull_request: | ||
branches: | ||
- 'release-*-cn*' | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Environment to run tests against' | ||
type: environment | ||
required: true | ||
|
||
env: | ||
# Build the dashboard to use in tests. When set to false it will grab `latest` from CDN (useful for running e2e tests quickly) | ||
BUILD_DASHBOARD: true | ||
|
||
|
||
jobs: | ||
unit-test: | ||
runs-on: repo-dashboard-runner-k8s | ||
container: ubuntu:22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Run tests | ||
uses: ./.github/actions/unit-tests | ||
|
||
- name: Collect Coverage | ||
run: | | ||
mkdir -p coverage-artifacts/coverage | ||
cp coverage/unit/coverage-final.json coverage-artifacts/coverage/coverage-unit.json | ||
cp -r coverage/unit/ coverage-artifacts/coverage/unit/ | ||
- name: Upload coverage | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{github.run_number}}-${{github.run_attempt}}-coverage | ||
path: coverage-artifacts/**/* | ||
|
||
i18n: | ||
runs-on: repo-dashboard-runner-k8s | ||
container: ubuntu:22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Run i18n lint | ||
uses: ./.github/actions/i18n-lint | ||
|
||
check-i18n: | ||
runs-on: repo-dashboard-runner-k8s | ||
container: ubuntu:22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Install packages | ||
run: yarn install:ci | ||
|
||
- name: Run i18n string check | ||
run: | | ||
# Falure won't fail the job (remove -x when all current issues are fixed) | ||
./scripts/check-i18n -s -x | ||
lint: | ||
runs-on: repo-dashboard-runner-k8s | ||
container: ubuntu:22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Run tests | ||
uses: ./.github/actions/lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters