fix woodpecker configs and remove drone config
This commit is contained in:
parent
929e0a63a7
commit
002edf9748
5 changed files with 17 additions and 242 deletions
221
.drone.yml
221
.drone.yml
|
@ -1,221 +0,0 @@
|
||||||
---
|
|
||||||
######################
|
|
||||||
# sonarqube analysis #
|
|
||||||
######################
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: sonarqube-analysis
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
# test python code and upload analysis to sonarqube
|
|
||||||
steps:
|
|
||||||
- name: 'check shell scripts with shfmt'
|
|
||||||
image: 'cr.44net.ch/drone-plugins/test'
|
|
||||||
pull: if-not-exists
|
|
||||||
commands:
|
|
||||||
- shfmt -d -i 4 -bn -ci -sr .
|
|
||||||
|
|
||||||
- name: 'check python scripts with black'
|
|
||||||
image: 'cr.44net.ch/drone-plugins/test'
|
|
||||||
pull: if-not-exists
|
|
||||||
commands:
|
|
||||||
- black --check --diff --color .
|
|
||||||
|
|
||||||
- name: 'test code and generate coverage report'
|
|
||||||
image: 'cr.44net.ch/drone-plugins/test'
|
|
||||||
pull: if-not-exists
|
|
||||||
commands:
|
|
||||||
- pip install -r requirements.txt
|
|
||||||
- coverage erase
|
|
||||||
- coverage run -m pytest --verbose --exitfirst
|
|
||||||
- coverage xml -i
|
|
||||||
|
|
||||||
- name: 'sonarqube: analyse code'
|
|
||||||
image: 'cr.44net.ch/drone-plugins/sonarqube'
|
|
||||||
pull: if-not-exists
|
|
||||||
settings:
|
|
||||||
sonar_host: 'https://sonarqube.44net.ch'
|
|
||||||
sonar_token:
|
|
||||||
from_secret: sq-44net-token
|
|
||||||
usingProperties: true
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
################
|
|
||||||
# docker build #
|
|
||||||
################
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: docker-build-amd64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
# build steps amd64
|
|
||||||
steps:
|
|
||||||
- name: 'build and publish docker image'
|
|
||||||
image: plugins/docker
|
|
||||||
pull: if-not-exists
|
|
||||||
settings:
|
|
||||||
repo: olofvndrhr/manga-dlp
|
|
||||||
context: docker
|
|
||||||
dockerfile: docker/Dockerfile.amd64
|
|
||||||
auto_tag: true
|
|
||||||
auto_tag_suffix: linux-amd64
|
|
||||||
username:
|
|
||||||
from_secret: cr-dhub-username
|
|
||||||
password:
|
|
||||||
from_secret: cr-dhub-key
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: docker-build-arm64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: arm64
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
# build steps arm64
|
|
||||||
steps:
|
|
||||||
- name: 'build and publish docker image'
|
|
||||||
image: plugins/docker
|
|
||||||
pull: if-not-exists
|
|
||||||
settings:
|
|
||||||
repo: olofvndrhr/manga-dlp
|
|
||||||
context: docker
|
|
||||||
dockerfile: docker/Dockerfile.arm64
|
|
||||||
auto_tag: true
|
|
||||||
auto_tag_suffix: linux-arm64
|
|
||||||
username:
|
|
||||||
from_secret: cr-dhub-username
|
|
||||||
password:
|
|
||||||
from_secret: cr-dhub-key
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: docker-publish-manifest
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
# build steps
|
|
||||||
steps:
|
|
||||||
- name: 'publish manifest'
|
|
||||||
image: plugins/manifest
|
|
||||||
settings:
|
|
||||||
spec: docker/manifest.tmpl
|
|
||||||
auto_tag: true
|
|
||||||
ignore_missing: true
|
|
||||||
username:
|
|
||||||
from_secret: cr-dhub-username
|
|
||||||
password:
|
|
||||||
from_secret: cr-dhub-key
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- docker-build-amd64
|
|
||||||
- docker-build-arm64
|
|
||||||
|
|
||||||
---
|
|
||||||
###############
|
|
||||||
# git release #
|
|
||||||
###############
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: git-release
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
# publish release on gitea and github
|
|
||||||
steps:
|
|
||||||
- name: 'create release tar'
|
|
||||||
image: 'cr.44net.ch/baseimages/debian-base'
|
|
||||||
pull: if-not-exists
|
|
||||||
commands:
|
|
||||||
- tar -czf manga-dlp-${DRONE_TAG}.tar.gz --files-from=release-files.txt
|
|
||||||
|
|
||||||
- name: 'create release-notes'
|
|
||||||
image: 'cr.44net.ch/baseimages/debian-base'
|
|
||||||
pull: if-not-exists
|
|
||||||
commands:
|
|
||||||
- bash 'release.sh' '--get-releasenotes' '${DRONE_TAG}'
|
|
||||||
|
|
||||||
- name: 'publish gitea release'
|
|
||||||
image: plugins/gitea-release
|
|
||||||
pull: if-not-exists
|
|
||||||
settings:
|
|
||||||
api_key:
|
|
||||||
from_secret: gitea-token
|
|
||||||
base_url: https://git.44net.ch
|
|
||||||
files: manga-dlp-${DRONE_TAG}.tar.gz
|
|
||||||
title: 'manga-dlp release: ${DRONE_TAG}'
|
|
||||||
note: RELEASENOTES.md
|
|
||||||
|
|
||||||
- name: 'publish github release'
|
|
||||||
image: plugins/github-release
|
|
||||||
pull: if-not-exists
|
|
||||||
settings:
|
|
||||||
api_key:
|
|
||||||
from_secret: github-token
|
|
||||||
files: manga-dlp-${DRONE_TAG}.tar.gz
|
|
||||||
title: 'manga-dlp release: ${DRONE_TAG}'
|
|
||||||
note: RELEASENOTES.md
|
|
||||||
|
|
||||||
#---
|
|
||||||
#################
|
|
||||||
## publish pypi #
|
|
||||||
#################
|
|
||||||
#kind: pipeline
|
|
||||||
#type: docker
|
|
||||||
#name: publish-pypi-package
|
|
||||||
#
|
|
||||||
#platform:
|
|
||||||
# os: linux
|
|
||||||
# arch: amd64
|
|
||||||
#
|
|
||||||
#trigger:
|
|
||||||
# event:
|
|
||||||
# - tag
|
|
||||||
#
|
|
||||||
## publish package on pypi
|
|
||||||
#steps:
|
|
||||||
# - name: 'publish or update pypi package'
|
|
||||||
# image: plugins/pypi
|
|
||||||
# pull: if-not-exists
|
|
||||||
# settings:
|
|
||||||
# #repository:
|
|
||||||
# setupfile: setup.py
|
|
||||||
# username:
|
|
||||||
# from_secret: pypi-username
|
|
||||||
# password:
|
|
||||||
# from_secret: pypi-token
|
|
|
@ -14,12 +14,12 @@ pipeline:
|
||||||
when:
|
when:
|
||||||
branch: master
|
branch: master
|
||||||
event: pull_request
|
event: pull_request
|
||||||
platform: linux/amd64
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
image: plugins/docker
|
pull: true
|
||||||
pull: if-not-exists
|
|
||||||
settings:
|
settings:
|
||||||
dry_run: true
|
dry_run: true
|
||||||
repo: olofvndrhr/manga-dlp
|
repo: olofvndrhr/manga-dlp
|
||||||
|
platforms: linux/amd64
|
||||||
context: docker
|
context: docker
|
||||||
dockerfile: docker/Dockerfile.amd64
|
dockerfile: docker/Dockerfile.amd64
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
|
@ -30,12 +30,12 @@ pipeline:
|
||||||
when:
|
when:
|
||||||
branch: master
|
branch: master
|
||||||
event: pull_request
|
event: pull_request
|
||||||
platform: linux/arm64
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
image: plugins/docker
|
pull: true
|
||||||
pull: if-not-exists
|
|
||||||
settings:
|
settings:
|
||||||
dry_run: true
|
dry_run: true
|
||||||
repo: olofvndrhr/manga-dlp
|
repo: olofvndrhr/manga-dlp
|
||||||
|
platforms: linux/arm64/v8
|
||||||
context: docker
|
context: docker
|
||||||
dockerfile: docker/Dockerfile.arm64
|
dockerfile: docker/Dockerfile.arm64
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
|
|
|
@ -14,11 +14,11 @@ pipeline:
|
||||||
when:
|
when:
|
||||||
branch: master
|
branch: master
|
||||||
event: tag
|
event: tag
|
||||||
platform: linux/amd64
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
image: plugins/docker
|
pull: true
|
||||||
pull: if-not-exists
|
|
||||||
settings:
|
settings:
|
||||||
repo: olofvndrhr/manga-dlp
|
repo: olofvndrhr/manga-dlp
|
||||||
|
platforms: linux/amd64
|
||||||
context: docker
|
context: docker
|
||||||
dockerfile: docker/Dockerfile.amd64
|
dockerfile: docker/Dockerfile.amd64
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
|
@ -33,11 +33,11 @@ pipeline:
|
||||||
when:
|
when:
|
||||||
branch: master
|
branch: master
|
||||||
event: tag
|
event: tag
|
||||||
platform: linux/arm64
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
image: plugins/docker
|
pull: true
|
||||||
pull: if-not-exists
|
|
||||||
settings:
|
settings:
|
||||||
repo: olofvndrhr/manga-dlp
|
repo: olofvndrhr/manga-dlp
|
||||||
|
platforms: linux/arm64/v8
|
||||||
context: docker
|
context: docker
|
||||||
dockerfile: docker/Dockerfile.arm64
|
dockerfile: docker/Dockerfile.arm64
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
|
@ -52,8 +52,8 @@ pipeline:
|
||||||
when:
|
when:
|
||||||
branch: master
|
branch: master
|
||||||
event: tag
|
event: tag
|
||||||
platform: linux/amd64
|
|
||||||
image: plugins/manifest
|
image: plugins/manifest
|
||||||
|
pull: true
|
||||||
settings:
|
settings:
|
||||||
spec: docker/manifest.tmpl
|
spec: docker/manifest.tmpl
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
# branch: master
|
# branch: master
|
||||||
# event: tag
|
# event: tag
|
||||||
|
|
||||||
platform: linux/amd64
|
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- tests
|
- tests
|
||||||
|
|
||||||
|
@ -17,7 +15,7 @@ pipeline:
|
||||||
branch: master
|
branch: master
|
||||||
event: tag
|
event: tag
|
||||||
image: 'cr.44net.ch/baseimages/debian-base'
|
image: 'cr.44net.ch/baseimages/debian-base'
|
||||||
pull: if-not-exists
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- tar -czf manga-dlp-${CI_COMMIT_TAG}.tar.gz --files-from=release-files.txt
|
- tar -czf manga-dlp-${CI_COMMIT_TAG}.tar.gz --files-from=release-files.txt
|
||||||
|
|
||||||
|
@ -27,7 +25,7 @@ pipeline:
|
||||||
branch: master
|
branch: master
|
||||||
event: tag
|
event: tag
|
||||||
image: 'cr.44net.ch/baseimages/debian-base'
|
image: 'cr.44net.ch/baseimages/debian-base'
|
||||||
pull: if-not-exists
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- bash 'release.sh' '--get-releasenotes' '${CI_COMMIT_TAG}'
|
- bash 'release.sh' '--get-releasenotes' '${CI_COMMIT_TAG}'
|
||||||
|
|
||||||
|
@ -37,7 +35,7 @@ pipeline:
|
||||||
branch: master
|
branch: master
|
||||||
event: tag
|
event: tag
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
pull: if-not-exists
|
pull: true
|
||||||
settings:
|
settings:
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: gitea-olofvndrhr-token
|
from_secret: gitea-olofvndrhr-token
|
||||||
|
@ -52,7 +50,7 @@ pipeline:
|
||||||
branch: master
|
branch: master
|
||||||
event: tag
|
event: tag
|
||||||
image: plugins/github-release
|
image: plugins/github-release
|
||||||
pull: if-not-exists
|
pull: true
|
||||||
settings:
|
settings:
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: github-olofvndrhr-token
|
from_secret: github-olofvndrhr-token
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
# branch: all
|
# branch: all
|
||||||
# event: all
|
# event: all
|
||||||
|
|
||||||
platform: linux/amd64
|
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
|
|
||||||
# check shell scripts with shfmt
|
# check shell scripts with shfmt
|
||||||
|
|
Loading…
Reference in a new issue