2020-11-26 03:39:14 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2020-11-26 04:06:24 +01:00
|
|
|
name: test-build
|
2020-11-26 03:39:14 +01:00
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
2020-12-26 17:06:03 +01:00
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/master
|
|
|
|
- refs/heads/feature-*
|
|
|
|
- refs/pull/*/head
|
|
|
|
- refs/tags/*
|
2020-12-15 15:04:28 +01:00
|
|
|
|
2020-12-26 17:06:03 +01:00
|
|
|
steps:
|
2021-02-07 20:55:36 +01:00
|
|
|
- name: restore
|
2020-11-26 03:39:14 +01:00
|
|
|
pull: always
|
2020-12-15 15:04:28 +01:00
|
|
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
2021-02-07 20:55:36 +01:00
|
|
|
volumes:
|
2021-02-07 22:13:15 +01:00
|
|
|
- name: pkgcache
|
2021-02-07 20:55:36 +01:00
|
|
|
path: /root/.nuget/packages
|
2021-01-26 17:35:44 +01:00
|
|
|
depends_on: [clone]
|
2020-11-26 03:39:14 +01:00
|
|
|
commands:
|
|
|
|
- dotnet restore
|
2021-02-07 20:55:36 +01:00
|
|
|
|
2021-02-23 15:56:27 +01:00
|
|
|
- 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
|
|
|
|
|
2021-02-07 20:55:36 +01:00
|
|
|
- name: debug
|
|
|
|
pull: always
|
|
|
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
|
|
|
volumes:
|
2021-02-07 22:13:15 +01:00
|
|
|
- name: pkgcache
|
2021-02-07 20:55:36 +01:00
|
|
|
path: /root/.nuget/packages
|
|
|
|
depends_on: [restore]
|
|
|
|
commands:
|
2020-11-26 03:39:14 +01:00
|
|
|
- dotnet build .
|
|
|
|
|
2020-11-26 04:01:28 +01:00
|
|
|
- name: release
|
2020-11-26 03:59:08 +01:00
|
|
|
pull: always
|
2020-12-15 15:04:28 +01:00
|
|
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
2021-02-07 20:55:36 +01:00
|
|
|
volumes:
|
2021-02-07 22:13:15 +01:00
|
|
|
- name: pkgcache
|
2021-02-07 20:55:36 +01:00
|
|
|
path: /root/.nuget/packages
|
2021-02-23 15:56:27 +01:00
|
|
|
depends_on: [restore, webpack]
|
2020-11-26 03:45:34 +01:00
|
|
|
commands:
|
2020-12-05 22:34:45 +01:00
|
|
|
- dotnet publish -c Release -o out
|
2020-11-26 03:45:34 +01:00
|
|
|
|
2021-01-26 17:35:44 +01:00
|
|
|
- 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
|
|
|
|
|
2020-11-27 13:18:30 +01:00
|
|
|
- name: docker-release-build
|
|
|
|
pull: always
|
2020-11-27 19:00:06 +01:00
|
|
|
image: ghcr.io/finitum/drone-kaniko:0.7.0
|
2021-01-26 17:35:44 +01:00
|
|
|
depends_on: [release, hadolint release]
|
2020-11-27 13:23:33 +01:00
|
|
|
settings:
|
|
|
|
dockerfile: Dockerfile
|
2020-11-27 14:30:08 +01:00
|
|
|
context: .
|
2020-11-27 13:18:30 +01:00
|
|
|
|
|
|
|
- name: docker-debug-build
|
|
|
|
pull: always
|
2020-11-27 19:00:06 +01:00
|
|
|
image: ghcr.io/finitum/drone-kaniko:0.7.0
|
2021-01-26 17:35:44 +01:00
|
|
|
depends_on: [debug, hadolint debug]
|
2020-11-27 13:23:33 +01:00
|
|
|
settings:
|
|
|
|
dockerfile: Dockerfile.dev
|
2020-11-27 14:30:08 +01:00
|
|
|
context: .
|
2020-11-27 13:18:30 +01:00
|
|
|
|
2021-02-07 20:55:36 +01:00
|
|
|
volumes:
|
2021-02-07 22:13:15 +01:00
|
|
|
- name: pkgcache
|
2021-02-07 20:55:36 +01:00
|
|
|
temp: {}
|
|
|
|
|