2021-12-19 17:22:41 +01:00
|
|
|
---
|
|
|
|
######################
|
|
|
|
# sonarqube analysis #
|
|
|
|
######################
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: sonarqube-analysis
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
2022-05-09 21:07:37 +02:00
|
|
|
- master
|
2021-12-19 17:22:41 +01:00
|
|
|
event:
|
2022-05-09 21:07:37 +02:00
|
|
|
- push
|
2021-12-19 17:22:41 +01:00
|
|
|
|
|
|
|
# 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:
|
2022-05-09 21:07:37 +02:00
|
|
|
- name: 'sonarqube: analyse code'
|
|
|
|
<<: *sq_analysis
|
|
|
|
settings:
|
|
|
|
<<: *sq_secrets
|
|
|
|
sources: .
|
|
|
|
exclusions: contrib/**
|
2021-12-19 17:22:41 +01:00
|
|
|
|
2021-12-24 16:30:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
################
|
|
|
|
# docker build #
|
|
|
|
################
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: docker-build-arm64
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: arm64
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
2022-05-09 21:07:37 +02:00
|
|
|
- tag
|
2021-12-24 16:30:50 +01:00
|
|
|
|
|
|
|
# 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:
|
2022-05-09 21:07:37 +02:00
|
|
|
- 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
|
2021-12-24 16:30:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: docker-build-amd64
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
2022-05-09 21:07:37 +02:00
|
|
|
- tag
|
2021-12-24 16:30:50 +01:00
|
|
|
|
|
|
|
# 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:
|
2022-05-09 21:07:37 +02:00
|
|
|
- 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
|
2021-12-24 16:30:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: docker-publish-manifest
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
2022-05-09 21:07:37 +02:00
|
|
|
- tag
|
2021-12-24 16:30:50 +01:00
|
|
|
|
|
|
|
# anchors
|
|
|
|
cr_secrets: &cr_secrets
|
|
|
|
username:
|
|
|
|
from_secret: cr-dhub-username
|
|
|
|
password:
|
|
|
|
from_secret: cr-dhub-key
|
|
|
|
|
|
|
|
# build steps
|
|
|
|
steps:
|
2022-05-09 21:07:37 +02:00
|
|
|
- name: 'publish manifest'
|
|
|
|
image: plugins/manifest
|
|
|
|
settings:
|
|
|
|
spec: docker/manifest.tmpl
|
|
|
|
auto_tag: true
|
|
|
|
ignore_missing: true
|
|
|
|
<<: *cr_secrets
|
2021-12-24 16:30:50 +01:00
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- docker-build-amd64
|
|
|
|
- docker-build-arm64
|
|
|
|
|
2022-05-09 21:07:37 +02:00
|
|
|
#---
|
|
|
|
#################
|
|
|
|
## publish pypi #
|
|
|
|
#################
|
|
|
|
#kind: pipeline
|
|
|
|
#type: docker
|
|
|
|
#name: publish-pypi-package
|
|
|
|
#
|
|
|
|
#platform:
|
|
|
|
# os: linux
|
|
|
|
# arch: arm64
|
|
|
|
#
|
|
|
|
#trigger:
|
|
|
|
# event:
|
|
|
|
# - tag
|
|
|
|
#
|
|
|
|
## anchors
|
|
|
|
#pypi_secrets: &pypi_secrets
|
|
|
|
# username:
|
|
|
|
# from_secret: pypi-username
|
|
|
|
# password:
|
|
|
|
# from_secret: pypi-token
|
|
|
|
#
|
|
|
|
#pypi_plugin: &pypi_plugin
|
|
|
|
# image: plugins/pypi
|
|
|
|
# pull: if-not-exists
|
|
|
|
# group: build
|
|
|
|
#
|
|
|
|
## build steps arm64
|
|
|
|
#steps:
|
|
|
|
# - name: 'publish or update pypi package'
|
|
|
|
# <<: *pypi_plugin
|
|
|
|
# settings:
|
|
|
|
# # repository:
|
|
|
|
# setupfile: setup.py
|
|
|
|
# <<: *pypi_secrets
|