WIP
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Henrik HerHde Huettemann 2024-06-20 16:39:03 +02:00
parent 6f43db433d
commit c842611ff1
Signed by: HueHe
GPG key ID: 68FE5FEEBF1EAF5B
3 changed files with 80 additions and 31 deletions

View file

@ -1,31 +0,0 @@
steps:
build-main:
when:
- event: push
branch: main
image: woodpeckerci/plugin-docker-buildx:4.0.0@sha256:9d24b71c37d7a958d79252e608c4d1a04b02f2e74d4e26003b43e0830038bde0
pull: true
settings:
platforms: linux/amd64
registry: ${CI_FORGE_URL}
username: WoodpeckerCI
password:
from_secret: gitea_token
repo: git.verdigado.com/${CI_REPO,,}
tag: 'latest'
build-branch:
when:
- event: push
branch:
exclude: ['main']
image: woodpeckerci/plugin-docker-buildx:4.0.0@sha256:9d24b71c37d7a958d79252e608c4d1a04b02f2e74d4e26003b43e0830038bde0
pull: true
settings:
platforms: linux/amd64
registry: ${CI_FORGE_URL}
username: WoodpeckerCI
password:
from_secret: gitea_token
repo: git.verdigado.com/${CI_REPO,,}
tag: ${CI_COMMIT_BRANCH}

44
.woodpecker/.build.yaml Normal file
View file

@ -0,0 +1,44 @@
steps:
build-main:
when:
- event: push
branch: main
image: woodpeckerci/plugin-docker-buildx:4.0.0@sha256:9d24b71c37d7a958d79252e608c4d1a04b02f2e74d4e26003b43e0830038bde0
pull: true
settings:
platforms: linux/amd64
registry: ${CI_FORGE_URL}
username: WoodpeckerCI
password:
from_secret: gitea_token
repo: git.verdigado.com/${CI_REPO,,}
tags:
- 'latest'
- ${CI_COMMIT_SHA}
# build-branch:
# when:
# - event: push
# branch:
# exclude: ['main']
# image: woodpeckerci/plugin-docker-buildx:4.0.0@sha256:9d24b71c37d7a958d79252e608c4d1a04b02f2e74d4e26003b43e0830038bde0
# pull: true
# settings:
# platforms: linux/amd64
# registry: ${CI_FORGE_URL}
# username: WoodpeckerCI
# password:
# from_secret: gitea_token
# repo: git.verdigado.com/${CI_REPO,,}
# tags:
# - ${CI_COMMIT_BRANCH}
# - ${CI_COMMIT_SHA}
sleep:
when:
event: push
# depends_on:
# - build-branch
image: alpine
commands:
- sleep 60

36
.woodpecker/.test.yaml Normal file
View file

@ -0,0 +1,36 @@
skip_clone: true
when:
- event: push
depends_on:
- build.sleep
variables:
- &image 'git.verdigado.com/verdigado-images/container-pre-commit:${CI_COMMIT_SHA}'
steps:
salt clone:
image: woodpeckerci/plugin-git
settings:
remote: https://git.verdigado.com/verdigado-Privileged/Salt.git
path: salt
sha: ''
ref: refs/heads/master
branch: master
debug:
image: alpine
environment:
test: *image
commands:
- 'echo image: *image'
- 'echo $test'
salt pre-commit:
image: *image
environment:
- SKIP=no-commit-to-branch # Ignore "don't commit to protected branch" check
commands:
- cd salt
- pre-commit run --all-files