DockerImages/.woodpecker.yml

86 lines
2.6 KiB
YAML
Raw Normal View History

steps:
- name: build-alpine-python
2024-10-07 23:34:38 -04:00
image: crazymax/docker
2024-10-07 22:48:44 -04:00
when:
- event: [ push, pull_request, tag, release ]
- path:
2024-10-07 22:58:39 -04:00
include: [ 'DockerImages/Alpine/Python/Dockerfile' ]
2024-10-07 23:34:38 -04:00
environment:
USERNAME:
2024-10-07 22:48:44 -04:00
from_secret: REGISTRY_USERNAME
2024-10-07 23:34:38 -04:00
TOKEN:
2024-10-07 22:48:44 -04:00
from_secret: DOCKER_TOKEN
2024-10-07 23:34:38 -04:00
commands:
- cd Alpine/Python
- docker login -u $USERNAME -p $TOKEN git.vertinext.com
- docker build -t git.vertinext.com/roryejinn/Alpine_Python:latest .
- docker push git.vertinext.com/roryejinn/Alpine_Python:latest
2024-10-07 22:48:44 -04:00
- name: build-alpine-muddler
image: alpine
2024-10-07 22:48:44 -04:00
when:
- event: [ push, pull_request, tag, release ]
- path:
2024-10-07 22:58:39 -04:00
include: [ 'DockerImages/Alpine/Muddler/Dockerfile' ]
2024-10-07 23:34:38 -04:00
environment:
USERNAME:
2024-10-07 22:48:44 -04:00
from_secret: REGISTRY_USERNAME
2024-10-07 23:34:38 -04:00
TOKEN:
2024-10-07 22:48:44 -04:00
from_secret: DOCKER_TOKEN
2024-10-07 23:34:38 -04:00
commands:
- cd Alpine/Muddler
- docker login -u $USERNAME -p $TOKEN git.vertinext.com
- docker build -t git.vertinext.com/roryejinn/Alpine_Muddler:latest .
- docker push git.vertinext.com/roryejinn/Alpine_Python:latest
2024-10-07 22:48:44 -04:00
- name: build-alpine-web
image: alpine
2024-10-07 22:48:44 -04:00
when:
- event: [ push, pull_request, tag, release ]
- path:
2024-10-07 22:58:39 -04:00
include: [ 'DockerImages/Alphine/Web/Dockerfile' ]
2024-10-07 23:34:38 -04:00
environment:
USERNAME:
2024-10-07 22:48:44 -04:00
from_secret: REGISTRY_USERNAME
2024-10-07 23:34:38 -04:00
TOKEN:
2024-10-07 22:48:44 -04:00
from_secret: DOCKER_TOKEN
2024-10-07 23:34:38 -04:00
commands:
- cd Alpine/Python
- docker login -u $USERNAME -p $TOKEN git.vertinext.com
- docker build -t git.vertinext.com/roryejinn/Alpine_Web:latest .
- docker push git.vertinext.com/roryejinn/Alpine_Web:latest
2024-10-07 22:48:44 -04:00
- name: notify-on-failure
image: alpine
2024-10-07 22:48:44 -04:00
when:
- status: [ failure ]
2024-10-07 23:34:38 -04:00
environment:
TOKEN:
from_secret: GOTIFY_TOKEN
2024-10-07 22:48:44 -04:00
commands:
- apk add curl
2024-10-07 22:56:55 -04:00
- >-
2024-10-07 23:34:38 -04:00
curl -H "Authorization: Bearer $TOKEN"
2024-10-07 22:56:55 -04:00
-H "Title: ${CI} - ${CI_REPO_NAME}"
-H "Tag: warning"
-H "Actions: http, Open Build, ${CI_PIPLINE_URL}, clear=true"
-d "Failed to build docker images."
gotify.vertinext.com/woodpecker
2024-10-07 22:48:44 -04:00
- name: notify-on-success
image: alpine
2024-10-07 22:48:44 -04:00
when:
- status: [ success ]
2024-10-07 23:34:38 -04:00
environment:
TOKEN:
from_secret: GOTIFY_TOKEN
2024-10-07 22:48:44 -04:00
commands:
- apk add curl
2024-10-07 22:56:55 -04:00
- >-
2024-10-07 23:34:38 -04:00
curl -H "Authorization: Bearer $TOKEN"
2024-10-07 22:56:55 -04:00
-H "Title: ${CI} - ${CI_REPO_NAME}"
-H "Tag: package"
-H "Actions: http, Open Build, ${CI_PIPLINE_URL}, clear=true"
-d "Docker images rebuilt and pushed to the container repository."
gotify.vertinext.com/woodpecker