153 lines
2.3 KiB
YAML
153 lines
2.3 KiB
YAML
---
|
|
######################
|
|
# sonarqube analysis #
|
|
######################
|
|
kind: pipeline
|
|
type: docker
|
|
name: sonarqube-analysis
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
trigger:
|
|
branch:
|
|
- master
|
|
event:
|
|
- push
|
|
|
|
# anchors
|
|
sq_secrets: &sq_secrets
|
|
sonar_host: 'https://sonarqube.44net.ch'
|
|
sonar_token:
|
|
from_secret: sq-44net-token
|
|
|
|
sq_analysis: &sq_analysis
|
|
image: 'cr.44net.ch/drone-plugins/sonarqube'
|
|
pull: if-not-exists
|
|
group: sonarqube
|
|
|
|
# build steps
|
|
steps:
|
|
- name: 'sonarqube: analyse code'
|
|
<<: *sq_analysis
|
|
settings:
|
|
<<: *sq_secrets
|
|
sources: .
|
|
exclusions: contrib/**
|
|
|
|
|
|
|
|
---
|
|
################
|
|
# docker build #
|
|
################
|
|
kind: pipeline
|
|
type: docker
|
|
name: docker-build-arm64
|
|
|
|
platform:
|
|
os: linux
|
|
arch: arm64
|
|
|
|
trigger:
|
|
event:
|
|
- tag
|
|
|
|
# anchors
|
|
cr_secrets: &cr_secrets
|
|
username:
|
|
from_secret: cr-dhub-username
|
|
password:
|
|
from_secret: cr-dhub-key
|
|
|
|
docker_build: &docker_build
|
|
image: plugins/docker
|
|
pull: if-not-exists
|
|
group: build
|
|
|
|
# build steps arm64
|
|
steps:
|
|
- name: 'build and publish docker image'
|
|
<<: *docker_build
|
|
settings:
|
|
repo: olofvndrhr/manga-dlp
|
|
context: docker
|
|
dockerfile: docker/Dockerfile.arm64
|
|
auto_tag: true
|
|
auto_tag_suffix: linux-arm64
|
|
<<: *cr_secrets
|
|
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: docker-build-amd64
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
trigger:
|
|
event:
|
|
- tag
|
|
|
|
# anchors
|
|
cr_secrets: &cr_secrets
|
|
username:
|
|
from_secret: cr-dhub-username
|
|
password:
|
|
from_secret: cr-dhub-key
|
|
|
|
docker_build: &docker_build
|
|
image: plugins/docker
|
|
pull: if-not-exists
|
|
group: build
|
|
|
|
# build steps amd64
|
|
steps:
|
|
- name: 'build and publish docker image'
|
|
<<: *docker_build
|
|
settings:
|
|
repo: olofvndrhr/manga-dlp
|
|
context: docker
|
|
dockerfile: docker/Dockerfile.amd64
|
|
auto_tag: true
|
|
auto_tag_suffix: linux-amd64
|
|
<<: *cr_secrets
|
|
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: docker-publish-manifest
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
trigger:
|
|
event:
|
|
- tag
|
|
|
|
# anchors
|
|
cr_secrets: &cr_secrets
|
|
username:
|
|
from_secret: cr-dhub-username
|
|
password:
|
|
from_secret: cr-dhub-key
|
|
|
|
# build steps
|
|
steps:
|
|
- name: 'publish manifest'
|
|
image: plugins/manifest
|
|
settings:
|
|
spec: docker/manifest.tmpl
|
|
auto_tag: true
|
|
ignore_missing: true
|
|
<<: *cr_secrets
|
|
|
|
depends_on:
|
|
- docker-build-amd64
|
|
- docker-build-arm64
|
|
|