2023-03-13 12:24:23 +00:00
|
|
|
pipeline:
|
|
|
|
generate_docker_tag:
|
|
|
|
image: golang
|
|
|
|
commands:
|
|
|
|
- echo -n "${CI_COMMIT_BRANCH//\//-}-${CI_COMMIT_SHA:0:8}, latest" > .tags
|
2023-03-14 06:09:30 +00:00
|
|
|
when:
|
2023-03-16 07:22:36 +00:00
|
|
|
path: [ "frontend/**", "backend/**", "proxy/**" ]
|
2023-03-14 06:09:30 +00:00
|
|
|
event: push
|
2023-03-13 12:24:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
# -------------------------------------- Backend --------------------------------------
|
|
|
|
build_backend:
|
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
|
|
settings:
|
|
|
|
repo:
|
|
|
|
from_secret: repository_backend
|
|
|
|
username:
|
|
|
|
from_secret: registry_username
|
|
|
|
password:
|
|
|
|
from_secret: registry_password
|
|
|
|
registry:
|
|
|
|
from_secret: registry
|
2023-03-13 14:25:15 +00:00
|
|
|
dockerfile: Dockerfile.Backend
|
2023-03-13 12:24:23 +00:00
|
|
|
platforms: linux/amd64
|
2023-03-14 06:09:30 +00:00
|
|
|
when:
|
|
|
|
path: "backend/**"
|
|
|
|
event: push
|
2023-03-13 12:24:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
# -------------------------------------- Frontend --------------------------------------
|
|
|
|
build_frontend:
|
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
|
|
settings:
|
|
|
|
repo:
|
|
|
|
from_secret: repository_frontend
|
|
|
|
username:
|
|
|
|
from_secret: registry_username
|
|
|
|
password:
|
|
|
|
from_secret: registry_password
|
|
|
|
registry:
|
|
|
|
from_secret: registry
|
2023-03-13 14:25:15 +00:00
|
|
|
dockerfile: Dockerfile.Frontend
|
2023-03-13 12:24:23 +00:00
|
|
|
platforms: linux/amd64
|
2023-03-14 06:09:30 +00:00
|
|
|
when:
|
|
|
|
path: "frontend/**"
|
|
|
|
event: push
|
2023-03-13 12:24:23 +00:00
|
|
|
|
2023-03-16 07:22:36 +00:00
|
|
|
# -------------------------------------- Frontend --------------------------------------
|
|
|
|
build_proxy:
|
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
|
|
settings:
|
|
|
|
repo:
|
|
|
|
from_secret: repository_proxy
|
|
|
|
username:
|
|
|
|
from_secret: registry_username
|
|
|
|
password:
|
|
|
|
from_secret: registry_password
|
|
|
|
registry:
|
|
|
|
from_secret: registry
|
|
|
|
dockerfile: Dockerfile.Proxy
|
|
|
|
platforms: linux/amd64
|
|
|
|
when:
|
|
|
|
path: "proxy/**"
|
|
|
|
event: push
|
|
|
|
|
2023-03-13 12:24:23 +00:00
|
|
|
branches: main
|