From 002edf9748dba03a8d9525304c9aea9fffd4cd1a Mon Sep 17 00:00:00 2001 From: Ivan Schaller Date: Fri, 13 May 2022 11:38:36 +0200 Subject: [PATCH] fix woodpecker configs and remove drone config --- .drone.yml | 221 -------------------------------- .woodpecker/build_docker.yml | 12 +- .woodpecker/publish_docker.yml | 14 +- .woodpecker/publish_release.yml | 10 +- .woodpecker/tests.yml | 2 - 5 files changed, 17 insertions(+), 242 deletions(-) delete mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 85655dd..0000000 --- a/.drone.yml +++ /dev/null @@ -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 diff --git a/.woodpecker/build_docker.yml b/.woodpecker/build_docker.yml index ad32e68..fd376c5 100644 --- a/.woodpecker/build_docker.yml +++ b/.woodpecker/build_docker.yml @@ -14,12 +14,12 @@ pipeline: when: branch: master event: pull_request - platform: linux/amd64 - image: plugins/docker - pull: if-not-exists + image: woodpeckerci/plugin-docker-buildx + pull: true settings: dry_run: true repo: olofvndrhr/manga-dlp + platforms: linux/amd64 context: docker dockerfile: docker/Dockerfile.amd64 auto_tag: true @@ -30,12 +30,12 @@ pipeline: when: branch: master event: pull_request - platform: linux/arm64 - image: plugins/docker - pull: if-not-exists + image: woodpeckerci/plugin-docker-buildx + pull: true settings: dry_run: true repo: olofvndrhr/manga-dlp + platforms: linux/arm64/v8 context: docker dockerfile: docker/Dockerfile.arm64 auto_tag: true diff --git a/.woodpecker/publish_docker.yml b/.woodpecker/publish_docker.yml index aeda8ad..c375ec6 100644 --- a/.woodpecker/publish_docker.yml +++ b/.woodpecker/publish_docker.yml @@ -14,11 +14,11 @@ pipeline: when: branch: master event: tag - platform: linux/amd64 - image: plugins/docker - pull: if-not-exists + image: woodpeckerci/plugin-docker-buildx + pull: true settings: repo: olofvndrhr/manga-dlp + platforms: linux/amd64 context: docker dockerfile: docker/Dockerfile.amd64 auto_tag: true @@ -33,11 +33,11 @@ pipeline: when: branch: master event: tag - platform: linux/arm64 - image: plugins/docker - pull: if-not-exists + image: woodpeckerci/plugin-docker-buildx + pull: true settings: repo: olofvndrhr/manga-dlp + platforms: linux/arm64/v8 context: docker dockerfile: docker/Dockerfile.arm64 auto_tag: true @@ -52,8 +52,8 @@ pipeline: when: branch: master event: tag - platform: linux/amd64 image: plugins/manifest + pull: true settings: spec: docker/manifest.tmpl auto_tag: true diff --git a/.woodpecker/publish_release.yml b/.woodpecker/publish_release.yml index da5077f..2fc8c9a 100644 --- a/.woodpecker/publish_release.yml +++ b/.woodpecker/publish_release.yml @@ -4,8 +4,6 @@ # branch: master # event: tag -platform: linux/amd64 - depends_on: - tests @@ -17,7 +15,7 @@ pipeline: branch: master event: tag image: 'cr.44net.ch/baseimages/debian-base' - pull: if-not-exists + pull: true commands: - tar -czf manga-dlp-${CI_COMMIT_TAG}.tar.gz --files-from=release-files.txt @@ -27,7 +25,7 @@ pipeline: branch: master event: tag image: 'cr.44net.ch/baseimages/debian-base' - pull: if-not-exists + pull: true commands: - bash 'release.sh' '--get-releasenotes' '${CI_COMMIT_TAG}' @@ -37,7 +35,7 @@ pipeline: branch: master event: tag image: plugins/gitea-release - pull: if-not-exists + pull: true settings: api_key: from_secret: gitea-olofvndrhr-token @@ -52,7 +50,7 @@ pipeline: branch: master event: tag image: plugins/github-release - pull: if-not-exists + pull: true settings: api_key: from_secret: github-olofvndrhr-token diff --git a/.woodpecker/tests.yml b/.woodpecker/tests.yml index 5f8c831..7dd7958 100644 --- a/.woodpecker/tests.yml +++ b/.woodpecker/tests.yml @@ -4,8 +4,6 @@ # branch: all # event: all -platform: linux/amd64 - pipeline: # check shell scripts with shfmt