Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Angular and dependencies #26

Merged
merged 35 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a8627ee
INFM-208 Upgrade Angular from v4 to v15
oleanders Feb 15, 2023
0f5bac7
INFM-209 Initial Github Actions
oleanders Feb 15, 2023
a691fcc
INFM-209 ...missing indents
oleanders Feb 15, 2023
b4b1a69
INFM-209 ...CD
oleanders Feb 15, 2023
645f083
Merge branch 'INFM-208-upgrade' of https://github.com/FINTLabs/fint-i…
oleanders Feb 15, 2023
46224aa
Merge with master
oleanders Feb 15, 2023
c8e3776
INFM-209 ...better luck next time?
oleanders Feb 15, 2023
9180c39
INFM-209 ...remove Jenkins
oleanders Feb 15, 2023
18f4237
..mkdirp was lost
oleanders Feb 15, 2023
e43039c
INFM-209 ...deploy to beta
oleanders Feb 15, 2023
7978a30
INFM-209 ...with variables
oleanders Feb 15, 2023
d5c521e
...indent
oleanders Feb 15, 2023
59d888b
INFM-209 ...
oleanders Feb 15, 2023
eb6c9d0
INFM-209 ...
oleanders Feb 15, 2023
40008fb
INFM-209 ...
oleanders Feb 15, 2023
c304ad0
INFM-209 ...
oleanders Feb 15, 2023
969e891
..duplicate meta
oleanders Feb 20, 2023
4dd3505
..indent
oleanders Feb 20, 2023
26a902b
..tasks.json is back
oleanders Feb 20, 2023
ace1657
..removed comments
oleanders Feb 20, 2023
0840c36
throttleTime is back
oleanders Mar 6, 2023
03d3656
icons is back
oleanders Mar 6, 2023
770cbd6
throttleTime is back
oleanders Mar 6, 2023
9048750
build for production
oleanders Mar 6, 2023
08a297d
fixing small issues in class-view
oleanders Aug 17, 2023
499b61f
Click on element is back
oleanders Aug 21, 2023
525263d
Lets drag elements
oleanders Dec 21, 2023
d405909
Drag 2.0
oleanders Dec 22, 2023
c9a9add
Increase memory and cpu
oleanders Dec 22, 2023
9d5c673
Relation finder is back
oleanders Dec 22, 2023
4eb19ed
No need for console.log
oleanders Dec 22, 2023
c96e0eb
Updated color schemes
oleanders Dec 22, 2023
6adb2f5
Lets Kustomize 🪄
oleanders Dec 28, 2023
a892ed5
INFM-287 Skriftstørrelse
oleanders Jan 11, 2024
74227f5
INFM-211 Increase cpu prod
oleanders Jan 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions .angular-cli.json

This file was deleted.

102 changes: 102 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: CD

on: push

jobs:

build-and-publish:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.meta.outputs.tags }}
env:
DOCKER_BUILDKIT: 1

steps:
- uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch,suffix=-{{sha}}
type=ref,event=pr,suffix=-{{sha}}
type=sha,prefix={{date 'YYYY-MM-DD-'}},enable={{is_default_branch}}
type=raw,value=latest,enable={{is_default_branch}}

- name: Log in to the Container registry
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
push: ${{ github.actor != 'dependabot[bot]' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

deploy-to-aks:
name: ${{ matrix.cluster }}
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
needs: build-and-publish
strategy:
fail-fast: false
matrix:
cluster: [ aks-beta-fint-2021-11-23, aks-api-fint-2022-02-08 ]
include:
- cluster: aks-beta-fint-2021-11-23
deploy-every-branch: true

steps:
- uses: actions/checkout@v4

- name: Get environment
id: environment
run: |
echo "name=$(cut -d\- -f2 <<< ${{ matrix.cluster }})" >> $GITHUB_OUTPUT

- name: Bake manifests with Kustomize
id: bake
uses: azure/k8s-bake@v2
with:
renderEngine: 'kustomize'
kustomizationPath: 'kustomize/overlays/${{ steps.environment.outputs.name }}'

- name: Login to Azure
uses: azure/login@v1
with:
creds: "${{ secrets[format('AKS_{0}_FINT_GITHUB', steps.environment.outputs.name)] }}"

- name: Set the target cluster
uses: azure/aks-set-context@v3
with:
cluster-name: ${{ matrix.cluster }}
resource-group: rg-aks-${{ steps.environment.outputs.name }}
admin: true

- if: github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && matrix.deploy-every-branch != true
run: |
{
echo "## Dry run - not a real deploy"
echo "To deploy, merge to ${{ github.event.repository.default_branch }}."
} >> $GITHUB_STEP_SUMMARY

- name: Get namespace from config file
id: namespace
run: |
namespace=$(yq '.metadata.namespace' ${{ steps.bake.outputs.manifestsBundle }} | head -n 1 | sed 's/^null$/default/')
echo "name=$namespace" >> $GITHUB_OUTPUT

- name: Deploy to Kubernetes
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || matrix.deploy-every-branch == true
uses: azure/k8s-deploy@v4
with:
action: deploy
manifests: ${{ steps.bake.outputs.manifestsBundle }}
images: ${{ matrix.use-image-from-overlay && 'none:none' || needs.build-and-publish.outputs.tags }}
namespace: ${{ steps.namespace.outputs.name }}
28 changes: 28 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches-ignore:
- master

permissions:
packages: read
contents: read

jobs:

main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'

- name: Build
run: |
yarn install
yarn build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ Thumbs.db
/log/
*.log*
/out/
.angular/
5 changes: 1 addition & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
"name": "Server",
"preLaunchTask": "server:build",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "node_modules\\.bin\\nodemon",
"windows": {
"runtimeExecutable": "node_modules\\.bin\\nodemon.cmd"
},
"runtimeExecutable": "npx nodemon",
"runtimeArgs": [
"--debug=5858"
],
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
######################
### STAGE 1: Build ###
FROM node:8-alpine as builder
FROM node:14-alpine as builder

WORKDIR /usr/src/app
COPY . /usr/src/app
Expand All @@ -9,7 +9,7 @@ RUN rm -rf ./node_modules && yarn install && yarn build

######################
### STAGE 2: Setup ###
FROM node:8-alpine
FROM node:14-alpine

WORKDIR /usr/src/app
COPY package.json /usr/src/app
Expand Down
24 changes: 0 additions & 24 deletions Jenkinsfile

This file was deleted.

138 changes: 138 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"fint-informasjonsmodell": {
"root": "",
"sourceRoot": "client",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/public",
"index": "client/index.html",
"main": "client/main.ts",
"tsConfig": "client/tsconfig.app.json",
"polyfills": "client/polyfills.ts",
"optimization": false,
"assets": [
"client/assets",
"client/favicon.ico"
],
"styles": [
"client/styles.scss",
"node_modules/font-awesome/css/font-awesome.css"
],
"scripts": [],
"stylePreprocessorOptions": {
"includePaths": [
"node_modules/",
"client/styles"
]
}
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "client/environments/environment.ts",
"with": "client/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "fint-informasjonsmodell:build"
},
"configurations": {
"production": {
"browserTarget": "fint-informasjonsmodell:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "fint-informasjonsmodell:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "client/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "client/polyfills.ts",
"tsConfig": "client/tsconfig.spec.json",
"scripts": [],
"styles": [
"client/styles.scss",
"node_modules/font-awesome/css/font-awesome.css"
],
"assets": [
"client/assets",
"client/favicon.ico"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"client/tsconfig.app.json",
"client/tsconfig.spec.json"
],
"exclude": []
}
}
}
},
"fint-informasjonsmodell-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "fint-informasjonsmodell:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": []
}
}
}
}
},
"defaultProject": "fint-informasjonsmodell",
"schematics": {
"@schematics/angular:component": {
"prefix": "app"
},
"@schematics/angular:directive": {
"prefix": "app"
}
},
"cli": {
"analytics": false
}
}
Loading