Skip to content

Commit

Permalink
Changes following review
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-cox committed Apr 26, 2024
1 parent e3143f6 commit 3ec34e1
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/actions/lint/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ runs:

- name: Run linters
shell: bash
run: yarn lint
run: yarn lint
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ runs:

- name: Install packages
shell: bash
run: yarn install:locked
run: yarn install:ci
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ on:
- master
- 'release-*'
- '*-dev'
# - TODO RC remove
- richard-drone-dashboard-pr

jobs:
build-validation:
name: Validate Code
uses: ./.github/workflows/build-dash-validation.yaml
uses: ./.github/workflows/build-test.yaml
build:
name: Build and Upload
uses: ./.github/workflows/build-dash-build-and-upload.yaml
uses: ./.github/workflows/build-and-upload.yaml
needs:
- build-validation
permissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
jobs:
build-validation:
name: Validate Code
uses: ./.github/workflows/build-dash-validation.yaml
uses: ./.github/workflows/build-test.yaml
build:
name: Build and Upload
uses: ./.github/workflows/build-dash-build-and-upload.yaml
uses: ./.github/workflows/build-and-upload.yaml
needs:
- build-validation
permissions:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Validation steps required before a build occurs. Not designed to replace the CI test workflow
name: Build Validation
name: Build Test

on:
# This tells GH that the workflow is reusable
workflow_call:

jobs:
Expand All @@ -15,7 +16,7 @@ jobs:
- name: Run tests
uses: ./.github/actions/unit-tests

i18n-lint:
i18n:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docusaurus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
cache: yarn

- name: Install dependencies
run: cd docusaurus/ && yarn install:locked
run: cd docusaurus/ && yarn install:ci
- name: Build website
run: cd docusaurus/ && yarn build

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-rancher-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
scope: '@rancher'

- name: Install
run: yarn install:locked
run: yarn install:ci

- name: Lint
run: yarn lint:lib
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/build-dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ echo Creating release directory
mkdir $RELEASE_DIR

echo Installing dependencies
yarn install:locked
yarn install:ci

echo Building
COMMIT=$GITHUB_SHA VERSION=$GITHUB_REF_NAME OUTPUT_DIR="$ARTIFACT_LOCATION" ROUTER_BASE="$ROUTER_BASE" RANCHER_ENV=$RANCHER_ENV API=$API RESOURCE_BASE=$RESOURCE_BASE EXCLUDES_PKG=$EXCLUDES_PKG EXCLUDE_OPERATOR_PKG=$EXCLUDE_OPERATOR_PKG yarn run build --spa
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"install:locked": "yarn install --frozen-lockfile"
"install:ci": "yarn install --frozen-lockfile"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.22",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lint-l10n": "./node_modules/.bin/yamllint ./shell/assets/translations",
"test": "NODE_OPTIONS=--max_old_space_size=8192 jest --watch",
"test:ci": "NODE_OPTIONS=--max_old_space_size=8192 jest --collectCoverage --silent",
"install:locked": "yarn install --frozen-lockfile",
"install:ci": "yarn install --frozen-lockfile",
"dev": "bash -c 'source ./scripts/version && NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve'",
"mem-dev": "bash -c 'source ./scripts/version && NODE_ENV=dev node --max-old-space-size=8192 ./node_modules/.bin/vue-cli-service serve'",
"docker:local:start": "docker run -d --restart=unless-stopped -p 80:80 -p 443:443 -e CATTLE_BOOTSTRAP_PASSWORD=password -e CATTLE_PASSWORD_MIN_LENGTH=3 --name cypress --privileged rancher/rancher:v2.9-head",
Expand Down
4 changes: 3 additions & 1 deletion scripts/build-embedded
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ find $OUTPUT_DIR -type d -empty -depth -exec rmdir {} \;

TARBALL=${DIR}.tar.gz
TARBALL_FILE_PATH=dist/${TARBALL}
echo "BUILD_EMBEDED_TGZ=${TARBALL_FILE_PATH}" >> "$GITHUB_OUTPUT"

ENV_OUTPUT="${GITHUB_OUTPUT:-"temp-env"}"
echo "BUILD_EMBEDED_TGZ=${TARBALL_FILE_PATH}" >> "$ENV_OUTPUT"

echo "Compressing to ${TARBALL}..."
tar -czf ${TARBALL_FILE_PATH} $OUTPUT_DIR/
Expand Down
6 changes: 4 additions & 2 deletions scripts/build-hosted
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ BASE=${BASE:-https://releases.rancher.com/dashboard/${DIR}}
echo "Building for ${BASE}..."

OUTPUT_DIR=dist/${DIR}
echo "BUILD_HOSTED_DIR=${OUTPUT_DIR}" >> "$GITHUB_OUTPUT"
echo "BUILD_HOSTED_LOCATION=${DIR}" >> "$GITHUB_OUTPUT"

ENV_OUTPUT="${GITHUB_OUTPUT:-"temp-env"}"
echo "BUILD_HOSTED_DIR=${OUTPUT_DIR}" >> "$ENV_OUTPUT"
echo "BUILD_HOSTED_LOCATION=${DIR}" >> "$ENV_OUTPUT"

COMMIT=${COMMIT} VERSION=${VERSION} OUTPUT_DIR=${OUTPUT_DIR} ROUTER_BASE="/dashboard/" RESOURCE_BASE="${BASE}" yarn run build

0 comments on commit 3ec34e1

Please sign in to comment.