--- ###################### # 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: '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 - 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-changelog' '${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