some ci changes for faster builds/tests

This commit is contained in:
Ivan Schaller 2022-07-21 21:37:52 +02:00
parent 49f3309e36
commit 3aaa22b549
9 changed files with 158 additions and 90 deletions

View file

@ -1,71 +0,0 @@
###################################
# build and publish docker images #
###################################
# branch: master
# event: tag
depends_on:
- tests
clone:
git:
when:
#branch: master
event: tag
image: woodpeckerci/plugin-git
pipeline:
# build and publish docker image for amd64 - x86
build-amd64:
when:
#branch: master
event: tag
image: woodpeckerci/plugin-docker-buildx
pull: true
settings:
repo: olofvndrhr/manga-dlp
platforms: linux/amd64
dockerfile: docker/Dockerfile.amd64
auto_tag: true
auto_tag_suffix: linux-amd64
build_args: BUILD_VERSION=${CI_COMMIT_TAG}
username:
from_secret: cr-dhub-username
password:
from_secret: cr-dhub-key
# build and publish docker image for arm64
build-arm64:
when:
#branch: master
event: tag
image: woodpeckerci/plugin-docker-buildx
pull: true
settings:
repo: olofvndrhr/manga-dlp
platforms: linux/arm64
dockerfile: docker/Dockerfile.arm64
auto_tag: true
auto_tag_suffix: linux-arm64
build_args: BUILD_VERSION=${CI_COMMIT_TAG}
username:
from_secret: cr-dhub-username
password:
from_secret: cr-dhub-key
# publish docker manifest for automatic multi arch pulls
publish-manifest:
when:
#branch: master
event: tag
image: plugins/manifest
pull: true
settings:
spec: docker/manifest.tmpl
auto_tag: true
ignore_missing: true
username:
from_secret: cr-dhub-username
password:
from_secret: cr-dhub-key

View file

@ -0,0 +1,38 @@
#########################################
# build and publish docker images amd64 #
#########################################
# branch: master
# event: tag
platform: linux/amd64
depends_on:
- tests
clone:
git:
when:
#branch: master
event: tag
image: woodpeckerci/plugin-git
pipeline:
# build and publish docker image for amd64 - x86
build-amd64:
when:
#branch: master
event: tag
image: woodpeckerci/plugin-docker-buildx
pull: true
settings:
repo: olofvndrhr/manga-dlp
platforms: linux/amd64
dockerfile: docker/Dockerfile.amd64
auto_tag: true
auto_tag_suffix: linux-amd64
build_args: BUILD_VERSION=${CI_COMMIT_TAG}
username:
from_secret: cr-dhub-username
password:
from_secret: cr-dhub-key

View file

@ -0,0 +1,38 @@
#########################################
# build and publish docker images arm64 #
#########################################
# branch: master
# event: tag
platform: linux/arm64
depends_on:
- tests
clone:
git:
when:
#branch: master
event: tag
image: woodpeckerci/plugin-git
pipeline:
# build and publish docker image for arm64
build-arm64:
when:
#branch: master
event: tag
image: woodpeckerci/plugin-docker-buildx
pull: true
settings:
repo: olofvndrhr/manga-dlp
platforms: linux/arm64
dockerfile: docker/Dockerfile.arm64
auto_tag: true
auto_tag_suffix: linux-arm64
build_args: BUILD_VERSION=${CI_COMMIT_TAG}
username:
from_secret: cr-dhub-username
password:
from_secret: cr-dhub-key

View file

@ -0,0 +1,36 @@
###########################
# publish docker manifest #
###########################
# branch: master
# event: tag
platform: linux/amd64
depends_on:
- publish_docker_amd64
- publish_docker_arm64
clone:
git:
when:
#branch: master
event: tag
image: woodpeckerci/plugin-git
pipeline:
# publish docker manifest for automatic multi arch pulls
publish-manifest:
when:
#branch: master
event: tag
image: plugins/manifest
pull: true
settings:
spec: docker/manifest.tmpl
auto_tag: true
ignore_missing: true
username:
from_secret: cr-dhub-username
password:
from_secret: cr-dhub-key

View file

@ -1,9 +1,11 @@
############################ ##################################
# test build docker images # # test build docker images amd64 #
############################ ##################################
# branch: master # branch: master
# event: pull_request # event: pull_request
platform: linux/amd64
depends_on: depends_on:
- tests - tests
@ -31,19 +33,3 @@ pipeline:
auto_tag: true auto_tag: true
auto_tag_suffix: linux-amd64-test auto_tag_suffix: linux-amd64-test
build_args: BUILD_VERSION=2.1.11 build_args: BUILD_VERSION=2.1.11
# build docker image for arm64
test-build-arm64:
when:
branch: master
event: pull_request
image: woodpeckerci/plugin-docker-buildx
pull: true
settings:
dry_run: true
repo: olofvndrhr/manga-dlp
platforms: linux/arm64
dockerfile: docker/Dockerfile.arm64
auto_tag: true
auto_tag_suffix: linux-arm64-test
build_args: BUILD_VERSION=2.1.11

View file

@ -0,0 +1,35 @@
##################################
# test build docker images arm64 #
##################################
# branch: master
# event: pull_request
platform: linux/arm64
depends_on:
- tests
clone:
git:
when:
branch: master
event: pull_request
image: woodpeckerci/plugin-git
pipeline:
# build docker image for arm64
test-build-arm64:
when:
branch: master
event: pull_request
image: woodpeckerci/plugin-docker-buildx
pull: true
settings:
dry_run: true
repo: olofvndrhr/manga-dlp
platforms: linux/arm64
dockerfile: docker/Dockerfile.arm64
auto_tag: true
auto_tag_suffix: linux-arm64-test
build_args: BUILD_VERSION=2.1.11

View file

@ -4,6 +4,8 @@
# branch: master # branch: master
# event: pull_request # event: pull_request
platform: linux/amd64
depends_on: depends_on:
- tests - tests

View file

@ -4,6 +4,8 @@
# branch: master # branch: master
# event: pull_request # event: pull_request
platform: linux/arm64
depends_on: depends_on:
- tests - tests

View file

@ -4,6 +4,8 @@
# branch: all # branch: all
# event: all # event: all
platform: linux/amd64
clone: clone:
git: git:
image: woodpeckerci/plugin-git image: woodpeckerci/plugin-git