Skip to content

Commit

Permalink
Merge pull request #409 from AuScope/master
Browse files Browse the repository at this point in the history
Release v6.5.2
  • Loading branch information
jia020 authored Jun 24, 2024
2 parents 4a4c9ff + 236f857 commit c655a45
Show file tree
Hide file tree
Showing 115 changed files with 10,522 additions and 7,571 deletions.
29 changes: 21 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": ["*.ts"],
"files": [
"*.ts"
],
"parserOptions": {
"project": ["tsconfig.json", "e2e/tsconfig.json"],
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/recommended--extra",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
Expand All @@ -20,7 +26,10 @@
{
"prefix": "app",
"style": "kebab-case",
"type": ["element", "attribute"]
"type": [
"element",
"attribute"
]
}
],
"@angular-eslint/directive-selector": [
Expand All @@ -31,7 +40,7 @@
"type": "attribute"
}
],
"@typescript-eslint/no-explicit-any": "off", //Too Many, needed to turn off
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"prefer-const": "warn",
Expand All @@ -42,8 +51,12 @@
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Azure Static Web Apps Dev CI/CD
name: Deploy to Dev AuScope portal auportal-dev.geoanalytics.group

on:
push:
Expand All @@ -15,10 +15,10 @@ jobs:
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- uses: jsdaniell/[email protected].2
- uses: jsdaniell/[email protected].3
with:
name: "context.json"
json: '{"portalBaseUrl":"${{ vars.AZURE_PORTAL_API_URL_DEV }}","hostUrl":"${{ vars.AZURE_PORTAL_URL_DEV }}","authBaseUrl":"${{ vars.AZURE_PORTAL_URL_DEV }}/api/"}'
Expand All @@ -35,7 +35,10 @@ jobs:
app_location: "/" # App source code path
api_location: "" # Api source code path - optional
output_location: "dist/" # Built app content directory - optional
app_build_command: "npm run build-dev"
###### End of Repository/Build Configurations ######
env:
SKIP_DEPLOY_ON_MISSING_SECRETS: true

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
Expand All @@ -48,3 +51,5 @@ jobs:
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_DUNE_0C657411E }}
action: "close"
env:
SKIP_DEPLOY_ON_MISSING_SECRETS: true
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
name: Azure Static Web Apps Production CI/CD
name: Deploy to Production AuScope portal portal.auscope.org.au

on:
push:
branches:
# this will be prod so set filters here to control when a release is pushed to the prod static web app
- Release-6.4.0
- Release
# changes committed to the Release branch will be deployed to production AuScope portal.
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
# and here
- Release-6.4.0
- Release

jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- uses: jsdaniell/[email protected].2
- uses: jsdaniell/[email protected].3
with:
name: "context.json"
json: '{"portalBaseUrl":"${{ vars.AZURE_PORTAL_API_URL_PROD }}","hostUrl":"${{ vars.AZURE_PORTAL_URL_PROD }}","authBaseUrl":"${{ vars.AZURE_PORTAL_URL_PROD }}/api/", "googleAnalyticsKey": "${{ secrets.PROD_GOOGLE_ANALYTICS_KEY }}" }'
Expand All @@ -37,6 +36,7 @@ jobs:
app_location: "/" # App source code path
api_location: "" # Api source code path - optional
output_location: "dist/" # Built app content directory - optional
app_build_command: "npm run build-prod"
###### End of Repository/Build Configurations ######

close_pull_request_job:
Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/build-dev.yml

This file was deleted.

34 changes: 23 additions & 11 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build package and archive
name: Build and archive

on:
push:
Expand All @@ -9,18 +9,30 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list

- name: npm install and npm run CI commands
run: |
npm i
Expand Down
77 changes: 0 additions & 77 deletions .github/workflows/build-prod-release.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ testem.log
# System Files
.DS_Store
Thumbs.db

/.nx
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

User Interface component for the [AuScope Discovery Portal](http://portal.auscope.org.au/)

This project was generated with the [Angular CLI](https://github.com/angular/angular-cli). It is now on version 15 of Angular. For best results compile with Angular 15, node 18 and npm 9.
This project was generated with the [Angular CLI](https://github.com/angular/angular-cli). It is now on version 17 of Angular. For best results compile with Angular 17, node 18.20 and npm 10.5

## Prerequisites

Install node v18 https://nodejs.org/en/download/
Install npm v9 `npm install -g npm@9`
install the Angular CLI v15 `npm install -g @angular/cli@15`
Install node v18.20 https://nodejs.org/en/download/
Install npm v10.5 `npm install -g npm@10`
install the Angular CLI v17 `npm install -g @angular/cli@17`

## Development server

Expand Down
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"src/styles.scss",
"node_modules/rickshaw/rickshaw.min.css",
"src/extension/css/extensions.css",
"node_modules/nouislider/distribute/nouislider.min.css",
"node_modules/nouislider/dist/nouislider.min.css",
"src/extension/css/d3.css",
"node_modules/@ng-select/ng-select/themes/default.theme.css",
"./node_modules/cesium/Build/Cesium/Widgets/widgets.css"
Expand Down Expand Up @@ -136,7 +136,7 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "project:build"
"buildTarget": "project:build"
}
},
"test": {
Expand Down
Loading

0 comments on commit c655a45

Please sign in to comment.