ci: always use makefile
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
f9ce41229d
commit
626006725e
|
@ -30,7 +30,7 @@ jobs:
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: prepare ts api client
|
- name: prepare ts api client
|
||||||
run: |
|
run: |
|
||||||
docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli generate -i /local/schema.yml -g typescript-fetch -o /local/web/api --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0
|
make gen-web
|
||||||
- name: Building Docker Image
|
- name: Building Docker Image
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -51,18 +51,8 @@ jobs:
|
||||||
go-version: "^1.15"
|
go-version: "^1.15"
|
||||||
- name: prepare go api client
|
- name: prepare go api client
|
||||||
run: |
|
run: |
|
||||||
|
make gen-outpost
|
||||||
cd outpost
|
cd outpost
|
||||||
cp ../schema.yml .
|
|
||||||
docker run \
|
|
||||||
--rm -v $(pwd):/local \
|
|
||||||
openapitools/openapi-generator-cli generate \
|
|
||||||
--git-host goauthentik.io \
|
|
||||||
--git-repo-id outpost \
|
|
||||||
--git-user-id api \
|
|
||||||
-i /local/schema.yml \
|
|
||||||
-g go \
|
|
||||||
-o /local/api \
|
|
||||||
--additional-properties=packageName=api,enumClassPrefix=true
|
|
||||||
go build -v ./cmd/proxy/server.go
|
go build -v ./cmd/proxy/server.go
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1.1.0
|
uses: docker/setup-qemu-action@v1.1.0
|
||||||
|
@ -100,18 +90,8 @@ jobs:
|
||||||
go-version: "^1.15"
|
go-version: "^1.15"
|
||||||
- name: prepare go api client
|
- name: prepare go api client
|
||||||
run: |
|
run: |
|
||||||
|
make gen-outpost
|
||||||
cd outpost
|
cd outpost
|
||||||
cp ../schema.yml .
|
|
||||||
docker run \
|
|
||||||
--rm -v $(pwd):/local \
|
|
||||||
openapitools/openapi-generator-cli generate \
|
|
||||||
--git-host goauthentik.io \
|
|
||||||
--git-repo-id outpost \
|
|
||||||
--git-user-id api \
|
|
||||||
-i /local/schema.yml \
|
|
||||||
-g go \
|
|
||||||
-o /local/api \
|
|
||||||
--additional-properties=packageName=api,enumClassPrefix=true
|
|
||||||
go build -v ./cmd/ldap/server.go
|
go build -v ./cmd/ldap/server.go
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1.1.0
|
uses: docker/setup-qemu-action@v1.1.0
|
||||||
|
|
|
@ -13,7 +13,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: prepare ts api client
|
- name: prepare ts api client
|
||||||
run: |
|
run: |
|
||||||
docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli generate -i /local/schema.yml -g typescript-fetch -o /local/web/api --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0
|
make gen-web
|
||||||
- name: Pre-release test
|
- name: Pre-release test
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y pwgen
|
sudo apt-get install -y pwgen
|
||||||
|
|
|
@ -298,7 +298,7 @@ stages:
|
||||||
displayName: Build static files for e2e
|
displayName: Build static files for e2e
|
||||||
inputs:
|
inputs:
|
||||||
script: |
|
script: |
|
||||||
docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli generate -i /local/schema.yml -g typescript-fetch -o /local/web/api --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0
|
make gen-web
|
||||||
sudo chmod 777 -R web/api/
|
sudo chmod 777 -R web/api/
|
||||||
cd web
|
cd web
|
||||||
cd api && npm i && cd ..
|
cd api && npm i && cd ..
|
||||||
|
@ -386,9 +386,9 @@ stages:
|
||||||
- task: CmdLine@2
|
- task: CmdLine@2
|
||||||
inputs:
|
inputs:
|
||||||
script: bash <(curl -s https://codecov.io/bash)
|
script: bash <(curl -s https://codecov.io/bash)
|
||||||
- stage: generate
|
- stage: Build
|
||||||
jobs:
|
jobs:
|
||||||
- job: swagger_generate
|
- job: build_server
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-latest'
|
vmImage: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
|
@ -398,24 +398,7 @@ stages:
|
||||||
displayName: 'Install Node.js'
|
displayName: 'Install Node.js'
|
||||||
- task: CmdLine@2
|
- task: CmdLine@2
|
||||||
inputs:
|
inputs:
|
||||||
script: |
|
script: make gen-web
|
||||||
docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli generate -i /local/schema.yml -g typescript-fetch -o /local/web/api --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
inputs:
|
|
||||||
targetPath: 'web/api/'
|
|
||||||
artifact: 'ts_swagger_client'
|
|
||||||
publishLocation: 'pipeline'
|
|
||||||
- stage: Build
|
|
||||||
jobs:
|
|
||||||
- job: build_server
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-latest'
|
|
||||||
steps:
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
inputs:
|
|
||||||
buildType: 'current'
|
|
||||||
artifactName: 'ts_swagger_client'
|
|
||||||
path: "web/api/"
|
|
||||||
- task: Bash@3
|
- task: Bash@3
|
||||||
inputs:
|
inputs:
|
||||||
targetType: 'inline'
|
targetType: 'inline'
|
||||||
|
|
|
@ -24,19 +24,7 @@ stages:
|
||||||
version: '1.16.3'
|
version: '1.16.3'
|
||||||
- task: CmdLine@2
|
- task: CmdLine@2
|
||||||
inputs:
|
inputs:
|
||||||
script: |
|
script: make gen-outpost
|
||||||
cp ../schema.yml .
|
|
||||||
docker run \
|
|
||||||
--rm -v $(pwd):/local \
|
|
||||||
openapitools/openapi-generator-cli generate \
|
|
||||||
--git-host goauthentik.io \
|
|
||||||
--git-repo-id outpost \
|
|
||||||
--git-user-id api \
|
|
||||||
-i /local/schema.yml \
|
|
||||||
-g go \
|
|
||||||
-o /local/api \
|
|
||||||
--additional-properties=packageName=api,enumClassPrefix=true
|
|
||||||
workingDirectory: 'outpost/'
|
|
||||||
- task: PublishPipelineArtifact@1
|
- task: PublishPipelineArtifact@1
|
||||||
inputs:
|
inputs:
|
||||||
targetPath: 'outpost/api/'
|
targetPath: 'outpost/api/'
|
||||||
|
|
|
@ -19,8 +19,7 @@ stages:
|
||||||
displayName: 'Install Node.js'
|
displayName: 'Install Node.js'
|
||||||
- task: CmdLine@2
|
- task: CmdLine@2
|
||||||
inputs:
|
inputs:
|
||||||
script: |
|
script: make gen-web
|
||||||
docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli generate -i /local/schema.yml -g typescript-fetch -o /local/web/api --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0
|
|
||||||
- task: PublishPipelineArtifact@1
|
- task: PublishPipelineArtifact@1
|
||||||
inputs:
|
inputs:
|
||||||
targetPath: 'web/api/'
|
targetPath: 'web/api/'
|
||||||
|
|
|
@ -36,18 +36,12 @@ Run `make gen` to run all unittests and generated an updated swagger document fo
|
||||||
|
|
||||||
By default, no transpiled bundle of the frontend is included. To build the UI, you need Node 12 or newer.
|
By default, no transpiled bundle of the frontend is included. To build the UI, you need Node 12 or newer.
|
||||||
|
|
||||||
The Frontend also uses a generated API client to talk with the backend. To generate this client, you can use the [openapitools/openapi-generator-cli](https://github.com/OpenAPITools/openapi-generator) CLI tool.
|
The Frontend also uses a generated API client to talk with the backend. To generate this client, [openapitools/openapi-generator-cli](https://github.com/OpenAPITools/openapi-generator) is used.
|
||||||
|
|
||||||
If you want to generate the client without installing anything, run this command:
|
If you want to generate the client without installing anything, run this command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker run \
|
make gen-web
|
||||||
--rm -v $(pwd):/local \
|
|
||||||
openapitools/openapi-generator-cli generate \
|
|
||||||
-i /local/schema.yml \
|
|
||||||
-g typescript-fetch \
|
|
||||||
-o /local/web/api \
|
|
||||||
--additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0
|
|
||||||
```
|
```
|
||||||
|
|
||||||
To build the UI, run these commands:
|
To build the UI, run these commands:
|
||||||
|
|
Reference in New Issue