CEC-1402 Merge to production (#148)

* Fix template function (#105)

* CEC-638 Add EK test ECU (#106)

* CEC-638 Add EK ECU

* Update test

* CEC-638 Should be EKS (#107)

* Should be EKS

* Update snapshot

* CEC-624 Display update status info and ECU (#108)

* Diplay ECU name in update status (#110)

Optimize car update status progress control
Remove car update status page test
Replace with individual component tests

* Handle case ECU is not in message (#111)

* Refresh button label (#112)

* Update ECU refresh button label

* Update snapshot

* remove

* CEC-660 Fix release notes field (#113)

* CEC-775 Manifest details component (#114)

* CEC-775 Manifest details component

* Code smells

* Fix build warning

* CEC-1050 New manifest format (#117)

* CEC-1050 Manifest changes

* Fix delete bug

* Add approve update button

* Code smell

* Remove update approval

* CEC-464 can filters forms (#118)

* can filters forms and lists

* unit tests

* updating warnings and tests

* merge develop

* fixed snapshots

* update jest mocks

* updating tests

* CEC-1050 Self download indicator (#119)

* CEC-1160 Fix package warnings (#121)

* CEC-1160 Last dependabot fix (#122)

* CEC-1058 fleet forms (#123)

* working fleets page

* unit tests

* snapshots

* updating messages and snapshots

* updating extraneous snaps

* Update codeowners (#125)

* CEC-1167 ota admin portal (#127)

* Add test coverage script

* Remove unnecessary check

* CEC-1167 unit test and code coverage

* included sonar job

* updated the workflow

* updated sonar properties

* updated sonar properties

* updated sonar properties

* updated sonar properties

* updated sonar properties

* updated sonar properties

* updated sonar properties

* updated sonar properties

Co-authored-by: jwu-fisker <jwu@fiskerinc.com>

* CEC-1167 implementing ths coverage thresold (#128)

* CEC-1216 Remove unused components (#129)

* CEC-1216 Remove unused components

* Remove import

* CEC-1183/CEC-1201 fleet vehicles forms (#130)

* working fleet vehicles forms

* snapshots and api tests

* CEC-1182 fleet filter forms (#131)

* forms for fleet can filters

* unit tests for fleet filters

* removing warnings

* updating regex

* CEC-532 Display manifest file properties (#133)

* CEC-532 Display update file properties

* npm audit fix

* CEC-1317 npm update (#134)

* CEC-1320 Update for memory regions (#135)

* CEC-1320 Update for memory regions

* Clean up

* CEC-1256/CEC-1330 data logger for vehicles/fleets and details tabs for vehicles/fleets (#136)

* forms for fleet can filters

* unit tests for fleet filters

* removing warnings

* updating regex

* added fleet details page

* fleet pages

* smoothed out bugs

* fleets done

* working update, delete vehicles

* finished mocks, still need snapshots and context tests

* contexts done

* snapshot tests

* updating code smells

* smells

* CEC-1256/CEC-1330 fixing filters length function (#137)

* fixing filters length function

* adding filters testing

* code smell

* code smells

* bug

* CEC-1387 superset integration and removal of grafana (#138)

* replace grafana with superset

* updating snapshots

* CEC-1316 azure migration (#140)

* test portal azure

* :doh:

* runner

* WIP

* values

* letsencrypt + docker cache

* stg/prd

* portal things

* cleanup

* split build/deploy + temp stage deploy

* :doh:

* try this

* and prod

* this works for now, can improve later

* no need to specify azure anymore

Co-authored-by: Drew Taylor <69828061+drew-fisker@users.noreply.github.com>

* CEC-1369 Fix display of update error (#139)

* CEC-1369 Fix display of update error

* Update snapshot

* CEC-749 Generate cert UI (#141)

* Add Create Certificate page

* Tests

* Update permission check

* Use Azure

* CEC-1387 updating superset dns names (#142)

* updating superset dns names

* updating snapshots

* Fix (#143)

* CEC-749 Fix types (#144)

* Merge branch 'develop'

Co-authored-by: Drew Taylor <69828061+drew-fisker@users.noreply.github.com>
Co-authored-by: venkats09 <97122017+venkats09@users.noreply.github.com>
Co-authored-by: Rafi Greenberg <72412693+rafi-fisker@users.noreply.github.com>
This commit is contained in:
John Wu
2022-04-19 15:51:36 -07:00
committed by GitHub
parent 97b215ec35
commit d4134141a4
158 changed files with 23912 additions and 14284 deletions

9
.github/CODEOWNERS vendored
View File

@@ -1,8 +1,7 @@
# default codeowners
* jwu@fiskerinc.com dtaylor@fiskerinc.com ggetsin@fiskerinc.com bbaker@fiskerinc.com
* @Fisker-Inc/cloud
# devops
.github rgreenberg@fiskerinc.com jwu@fiskerinc.com dtaylor@fiskerinc.com ggetsin@fiskerinc.com bbaker@fiskerinc.com
Jenkinsfile rgreenberg@fiskerinc.com jwu@fiskerinc.com dtaylor@fiskerinc.com ggetsin@fiskerinc.com bbaker@fiskerinc.com
k8s rgreenberg@fiskerinc.com jwu@fiskerinc.com dtaylor@fiskerinc.com ggetsin@fiskerinc.com bbaker@fiskerinc.com
Dockerfile rgreenberg@fiskerinc.com jwu@fiskerinc.com dtaylor@fiskerinc.com ggetsin@fiskerinc.com bbaker@fiskerinc.com
.github @Fisker-Inc/devops @Fisker-Inc/cloud
k8s @Fisker-Inc/devops @Fisker-Inc/cloud
Dockerfile @Fisker-Inc/devops @Fisker-Inc/cloud

View File

@@ -5,34 +5,42 @@ on:
- main
- "release/**"
- "hotfix/**"
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_CHANNEL: "#cloud-builds"
SLACK_FOOTER: ""
SLACK_USERNAME: GitHub Actions
SLACK_ICON: "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"
TAG: ${{ github.sha }}
PROJECT: ota-admin-portal
REGISTRY: fiskercloud.azurecr.io
jobs:
deploy:
name: Deploy
runs-on: self-hosted
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_CHANNEL: "#cloud-builds"
SLACK_FOOTER: ""
SLACK_USERNAME: GitHub Actions
SLACK_ICON: "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"
TAG: ${{ github.sha }}
PROJECT: ota-admin-portal
build:
runs-on: ubuntu-latest
outputs:
build-env: ${{ steps.set-env.outputs.build-env }}
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
- name: Azure Login
uses: azure/login@v1
with:
aws-region: us-west-2
- name: Create ECR Repo
run: aws ecr create-repository --region us-west-2 --repository-name ${PROJECT} || true
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Docker login
uses: azure/docker-login@v1
with:
login-server: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Set Env
id: set-env
run: |
case ${GITHUB_REF} in
refs/heads/develop)
@@ -47,26 +55,33 @@ jobs:
ENVIRONMENT=dev;;
esac
echo "ENVIRONMENT=${ENVIRONMENT}" >> $GITHUB_ENV
echo "::set-output name=build-env::${ENVIRONMENT}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
build-args: ENVIRONMENT=${{ env.ENVIRONMENT }}
push: true
tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.PROJECT }}:${{ env.TAG}}-${{ env.ENVIRONMENT }}
cache-from: type=registry,ref=${{ steps.login-ecr.outputs.registry }}/${{ env.PROJECT }}:${{ env.TAG}}-${{ env.ENVIRONMENT }}
cache-to: type=inline
- name: Notify deploy
uses: rtCamp/action-slack-notify@v2
tags: ${{ env.REGISTRY }}/${{ env.PROJECT }}:${{ env.TAG }}-${{ env.ENVIRONMENT }}
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
needs: build
runs-on: [self-hosted, azure]
env:
ENVIRONMENT: ${{ needs.build.outputs.build-env }}
steps:
- uses: rtCamp/action-slack-notify@v2
env:
MSG_MINIMAL: true
SLACK_MESSAGE: "Deploying to ${{ env.ENVIRONMENT }}... :partydeploy:"
SLACK_MESSAGE: "Deploying ${{ env.PROJECT }} to ${{ env.ENVIRONMENT }}... :partydeploy:"
- name: Deploy
id: deploy
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |-
helm upgrade \
--kube-context $ENVIRONMENT \
@@ -74,17 +89,17 @@ jobs:
--set image.name=$PROJECT \
--set image.tag=$TAG-$ENVIRONMENT \
--wait -i -f k8s/values-$ENVIRONMENT.yaml $PROJECT k8s/
- name: Notify if success
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2
env:
MSG_MINIMAL: true
SLACK_MESSAGE: "Successfully deployed to ${{ env.ENVIRONMENT }}! :gopher_party:"
SLACK_MESSAGE: "Successfully deployed ${{ env.PROJECT }} to ${{ env.ENVIRONMENT }}! :gopher_party:"
- name: Notify if failure
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "Something failed! :this-is-fine:"
SLACK_MESSAGE: "Something failed! :this-is-fine:"

View File

@@ -8,6 +8,9 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
@@ -15,6 +18,12 @@ jobs:
cache: "npm"
- run: npm install
- run: npm run build --if-present
- run: npm test
- run: npm test -- --coverage --coverageDirectory='coverage' --watchAll=false
env:
CI: true
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}