90 lines
1.7 KiB
YAML
90 lines
1.7 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: test-build
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/heads/feature-*
|
|
- refs/pull/*/head
|
|
- refs/tags/*
|
|
|
|
steps:
|
|
- name: restore
|
|
pull: always
|
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
|
volumes:
|
|
- name: pkgcache
|
|
path: /root/.nuget/packages
|
|
depends_on: [clone]
|
|
commands:
|
|
- dotnet restore
|
|
|
|
- name: webpack
|
|
pull: always
|
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
|
depends_on: [clone]
|
|
commands:
|
|
- apk add --no-cache make git nodejs npm
|
|
- make webpack
|
|
|
|
- name: debug
|
|
pull: always
|
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
|
volumes:
|
|
- name: pkgcache
|
|
path: /root/.nuget/packages
|
|
depends_on: [restore]
|
|
commands:
|
|
- dotnet build .
|
|
|
|
- name: release
|
|
pull: always
|
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
|
volumes:
|
|
- name: pkgcache
|
|
path: /root/.nuget/packages
|
|
depends_on: [restore, webpack]
|
|
commands:
|
|
- dotnet publish -c Release -o out
|
|
|
|
- name: hadolint release
|
|
image: hadolint/hadolint:latest
|
|
depends_on: [clone]
|
|
commands:
|
|
- hadolint --version
|
|
- hadolint Dockerfile
|
|
|
|
- name: hadolint debug
|
|
image: hadolint/hadolint:latest
|
|
depends_on: [clone]
|
|
commands:
|
|
- hadolint --version
|
|
- hadolint Dockerfile.dev
|
|
|
|
- name: docker-release-build
|
|
pull: always
|
|
image: ghcr.io/finitum/drone-kaniko:0.7.0
|
|
depends_on: [release, hadolint release]
|
|
settings:
|
|
dockerfile: Dockerfile
|
|
context: .
|
|
|
|
- name: docker-debug-build
|
|
pull: always
|
|
image: ghcr.io/finitum/drone-kaniko:0.7.0
|
|
depends_on: [debug, hadolint debug]
|
|
settings:
|
|
dockerfile: Dockerfile.dev
|
|
context: .
|
|
|
|
volumes:
|
|
- name: pkgcache
|
|
temp: {}
|
|
|