This repository has been archived on 2023-10-28. You can view files and clone it, but cannot push or open issues or pull requests.
pwt-0x01-ng/.drone.yml
surtur bb189cac7f
All checks were successful
continuous-integration/drone/push Build is passing
feat: add hadolint Dockerfile linting
commit 5acb4e2ba773d312c6b5159011ef415af53f8f71
Author: surtur <a_mirre@utb.cz>
Date:   Tue Jan 26 16:28:10 2021 +0100

    chore: rework ci pipeline logic

    * run {debug,release} builds after clone, then lint Dockerfile{,.dev}
      and finally run kaniko builds ({debug,release}) in parallel

commit 1e16f72eb4957b14c7fb316282d4cefae0811871
Author: surtur <a_mirre@utb.cz>
Date:   Tue Jan 26 16:19:50 2021 +0100

    feat: add hadolint Dockerfile linting

    to conform the linter and best practices:
    * add a FROM alias
    * quote variables (even though they're single-word and known in
      advance, might actually change it to ignore the warning)
2021-01-26 17:35:44 +01:00

64 lines
1.2 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: debug
pull: always
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
depends_on: [clone]
commands:
- dotnet restore
- dotnet build .
- name: release
pull: always
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
depends_on: [clone]
commands:
- dotnet restore
- 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: .