woodpecker-email/.woodpecker.yml

62 lines
1.5 KiB
YAML
Raw Normal View History

2023-01-03 21:32:53 +01:00
pipeline:
tests:
image: golang:1.18
commands:
2023-01-03 22:30:23 +01:00
- test -n "$CI_COMMIT_TAG" && sed "s/{app_version}/$CI_COMMIT_TAG/g" -i main.go || true
2023-01-03 22:32:23 +01:00
- test -n "$CI_COMMIT_SHA" && sed "s/{app_version}/${CI_COMMIT_SHA:0:7}/g" -i main.go || true
2023-01-03 21:32:53 +01:00
- make test
build_push_latest_gitnet:
image: plugins/docker
secrets: [registry_user, registry_password]
settings:
registry: gitnet.fr
repo: gitnet.fr/${CI_REPO}
tags: latest
username:
from_secret: registry_user
password:
from_secret: registry_password
when:
event: [push]
2023-01-03 21:32:53 +01:00
build_push_tag_gitnet:
image: plugins/docker
secrets: [registry_user, registry_password]
settings:
registry: gitnet.fr
repo: gitnet.fr/${CI_REPO}
tags: ${CI_COMMIT_TAG}
username:
from_secret: registry_user
password:
from_secret: registry_password
when:
event: [tag]
build_push_latest_dhub:
image: plugins/docker
secrets: [registry_user, registry_docker_password]
settings:
repo: ${CI_REPO}
tags: latest
username:
from_secret: registry_user
password:
from_secret: registry_docker_password
when:
event: [push]
build_push_tag_dhub:
image: plugins/docker
secrets: [registry_user, registry_docker_password]
settings:
repo: ${CI_REPO}
tags: ${CI_COMMIT_TAG}
username:
from_secret: registry_user
password:
from_secret: registry_docker_password
when:
event: [tag]