feat(console): integrate frontend (#95)

* feat: console frontend

* chore(dependabot): cycle and npm

* chore: rename citadel to zitadel, remove generated files

* chore: delete go files

* chore(frontend): ci steps

* chore: remove docker and envoy files

* chore: remove docker file

* chore: working dir

* chore: run proto build

* add console start

* chore: restructure folders

* chore: remove gui build

* statikFs

* generate proto for console

* add statik import

* import

* chore: try statik

* chore: path

* chore: path

* chore: script in root

* chore: order build steps

* chore: go get

* chore: folder traversal

* chore: non empty test file

* chore: gitignore

* chore: gitignore

* chore: statik path

* chore: switch to failing FE build

* fix: build

* fix: project-grant-test

* fix: rm test

* add statik.go

* go mod tidy

* chore: place test, seperate test from build

* chore: lint all the world

* chore: ci the world instead

* chore: tune docker

* chore: undo container test

* chore: fix run

* chore: docker build

* chore: test docker build

* chore: go build flags

* finaly

* fix caos_local

* go mod

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
Co-authored-by: Max Peintner <max@caos.ch>
This commit is contained in:
Florian Forster
2020-05-13 14:41:43 +02:00
committed by GitHub
parent 9e32740eb8
commit 92a294f5c8
375 changed files with 97826 additions and 52 deletions

View File

@@ -10,24 +10,51 @@ env:
jobs:
angular: # TODO Implement proper build and cache and coverage upload
angular-test: # will be added later on
runs-on: ubuntu-18.04
defaults:
run:
working-directory: ./console
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- run: echo "hodor" > hodor.txt
# - run: npm ci
# - run: npm run lint
# - run: npm run prodbuild
# - run: npm test
- run: npm ci
#- run: npm test
- run: echo "replace me with real test"
angular-lint: # will be added later on
runs-on: ubuntu-18.04
defaults:
run:
working-directory: ./console
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci
- run: npm run lint
angular-build:
runs-on: ubuntu-18.04
defaults:
run:
working-directory: ./console
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci
- run: npm run prodbuild
- uses: actions/upload-artifact@v1
with:
name: angular
path: hodor.txt
go: # TODO Implement proper build and cache
path: console/dist/console
go-test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
@@ -35,37 +62,59 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
- run: go test -race -v -coverprofile=profile.cov ./...
- run: go build -o zitadel cmd/zitadel/main.go
- uses: actions/upload-artifact@v1
with:
name: go-coverage
path: profile.cov
- uses: actions/upload-artifact@v1
with:
name: go-binary
path: zitadel
- uses: codecov/codecov-action@v1
with:
file: ./profile.cov
name: codecov-go
container-prod: # Artifact paths need better place
go-lint:
runs-on: ubuntu-18.04
needs: [angular, go]
steps:
- name: Source checkout
uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/setup-go@v2-beta
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v2
- run: echo "replace me with real lint"
go-build:
runs-on: ubuntu-18.04
needs: [angular-build, angular-test, angular-lint, go-test] ### We need the artifact from the angular build and that's why we wait here
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2-beta
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/download-artifact@v1
with:
name: angular
path: .build/angular
path: console/dist/app
- run: go get github.com/rakyll/statik
- run: ./build/console/generate-static.sh
- run: cat pkg/console/statik/statik.go
- run: CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o zitadel cmd/zitadel/main.go
- uses: actions/upload-artifact@v1
with:
name: go-binary
path: zitadel
container-prod:
runs-on: ubuntu-18.04
needs: go-build
steps:
- name: Source checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v1
with:
name: go-binary
path: .build/go
- uses: docker/build-push-action@v1
with:
dockerfile: build/dockerfile-prod
dockerfile: build/docker/prod
username: ${{ github.actor }}
password: ${{ github.token }}
registry: ${{ env.REGISTRY }}
@@ -75,7 +124,7 @@ jobs:
container-vulnerability-scan:
runs-on: ubuntu-18.04
needs: [container-prod]
needs: container-prod
steps:
- name: Source checkout
uses: actions/checkout@v2
@@ -89,7 +138,7 @@ jobs:
- uses: anchore/scan-action@master
with:
image-reference: "${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE }}:${{ steps.vars.outputs.sha_short }}"
dockerfile-path: "./build/dockerfile-prod"
dockerfile-path: "./build/docker/prod"
fail-build: false
- name: anchore inline scan JSON results
run: for j in `ls ./anchore-reports/*.json`; do echo "---- ${j} ----"; cat ${j}; echo; done
@@ -98,9 +147,9 @@ jobs:
name: anchore-reports
path: ./anchore-reports/
container-test: # TODO Implement proper test
container-test:
runs-on: ubuntu-18.04
needs: [container-prod]
needs: container-prod
steps:
- name: Source checkout
uses: actions/checkout@v2
@@ -112,7 +161,7 @@ jobs:
- name: Docker Login
run: docker login $REGISTRY -u $GITHUB_ACTOR -p $GITHUB_TOKEN
- name: Docker Run Test
run: docker run $REGISTRY/$GITHUB_REPOSITORY/$IMAGE:${{ steps.vars.outputs.sha_short }} /bin/sh -c "ls -la ./app"
run: echo "replace me with real test"
release:
runs-on: ubuntu-18.04