outposts: update pipeline

This commit is contained in:
Jens Langhammer 2021-01-16 21:49:30 +01:00
parent 72c6c0da9b
commit 81efc9a673
2 changed files with 15 additions and 14 deletions

View File

@ -27,10 +27,10 @@ stages:
sudo apt install swagger sudo apt install swagger
mkdir -p $(go env GOPATH) mkdir -p $(go env GOPATH)
swagger generate client -f ../swagger.yaml -A authentik -t pkg/ swagger generate client -f ../swagger.yaml -A authentik -t pkg/
workingDirectory: 'proxy/' workingDirectory: 'outpost/'
- task: PublishPipelineArtifact@1 - task: PublishPipelineArtifact@1
inputs: inputs:
targetPath: 'proxy/pkg/' targetPath: 'outpost/pkg/'
artifact: 'swagger_client' artifact: 'swagger_client'
publishLocation: 'pipeline' publishLocation: 'pipeline'
- stage: lint - stage: lint
@ -50,13 +50,13 @@ stages:
inputs: inputs:
buildType: 'current' buildType: 'current'
artifactName: 'swagger_client' artifactName: 'swagger_client'
path: "proxy/pkg/" path: "outpost/pkg/"
- task: CmdLine@2 - task: CmdLine@2
inputs: inputs:
script: | script: |
$(go list -f {{.Target}} golang.org/x/lint/golint) ./... $(go list -f {{.Target}} golang.org/x/lint/golint) ./...
workingDirectory: 'proxy/' workingDirectory: 'outpost/'
- stage: build_go - stage: proxy_build_go
jobs: jobs:
- job: build_go - job: build_go
pool: pool:
@ -69,14 +69,15 @@ stages:
inputs: inputs:
buildType: 'current' buildType: 'current'
artifactName: 'swagger_client' artifactName: 'swagger_client'
path: "proxy/pkg/" path: "outpost/pkg/"
- task: Go@0 - task: Go@0
inputs: inputs:
command: 'build' command: 'build'
workingDirectory: 'proxy/' arguments: './cmd/proxy'
- stage: build_docker workingDirectory: 'outpost/'
- stage: proxy_build_docker
jobs: jobs:
- job: build_proxy - job: build
pool: pool:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-latest'
steps: steps:
@ -87,7 +88,7 @@ stages:
inputs: inputs:
buildType: 'current' buildType: 'current'
artifactName: 'swagger_client' artifactName: 'swagger_client'
path: "proxy/pkg/" path: "outpost/pkg/"
- task: Bash@3 - task: Bash@3
inputs: inputs:
targetType: 'inline' targetType: 'inline'
@ -97,8 +98,8 @@ stages:
- task: Docker@2 - task: Docker@2
inputs: inputs:
containerRegistry: 'dockerhub' containerRegistry: 'dockerhub'
repository: 'beryju/authentik-proxy' repository: 'beryju/authentik-outpost'
command: 'buildAndPush' command: 'buildAndPush'
Dockerfile: 'proxy/Dockerfile' Dockerfile: 'outpost/proxy.Dockerfile'
buildContext: 'proxy/' buildContext: 'outpost/'
tags: "gh-${{ variables.branchName }}" tags: "gh-${{ variables.branchName }}"

View File

@ -4,7 +4,7 @@ WORKDIR /work
COPY . . COPY . .
RUN go build -o /work/proxy . RUN go build -o /work/proxy ./cmd/proxy
# Copy binary to alpine # Copy binary to alpine
FROM gcr.io/distroless/base-debian10:debug FROM gcr.io/distroless/base-debian10:debug