adjust to new workflow
This commit is contained in:
@@ -3,25 +3,58 @@ stages:
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
DOCKER_TLS_CERTDIR: "/certs"
|
||||
DOCKER_TLS_CERTDIR: "/certs"
|
||||
|
||||
build:
|
||||
.build_template: &build_template
|
||||
image: docker:24.0.5
|
||||
stage: build
|
||||
only:
|
||||
- main
|
||||
services:
|
||||
- docker:24.0.5-dind
|
||||
script:
|
||||
- echo "$CI_REGISTRY_PASSWORD" | docker login registry.remo-liebmann.de -u reguser --password-stdin
|
||||
- docker build -t registry.remo-liebmann.de/hallofbrawl-homepage:latest .
|
||||
- docker push registry.remo-liebmann.de/hallofbrawl-homepage:latest
|
||||
- docker build --build-arg HUGO_ENV=$HUGO_ENV -t registry.remo-liebmann.de/hallofbrawl-homepage:$IMAGE_TAG .
|
||||
- docker push registry.remo-liebmann.de/hallofbrawl-homepage:$IMAGE_TAG
|
||||
|
||||
deploy:
|
||||
.deploy_template: &deploy_template
|
||||
image: alpine/curl
|
||||
stage: deploy
|
||||
script:
|
||||
- curl --insecure -X POST $PORTAINER_WEBHOOK
|
||||
|
||||
# -------------------------
|
||||
# PRODUCTION (main)
|
||||
# -------------------------
|
||||
|
||||
build_prod:
|
||||
<<: *build_template
|
||||
only:
|
||||
- main
|
||||
script:
|
||||
- curl --insecure -I -X POST https://192.168.12.21:9443/api/webhooks/ee5dbc0d-18e8-45d7-bcfd-b24d1f2c0ee6
|
||||
variables:
|
||||
IMAGE_TAG: prod
|
||||
HUGO_ENV: production
|
||||
|
||||
deploy_prod:
|
||||
<<: *deploy_template
|
||||
only:
|
||||
- main
|
||||
variables:
|
||||
PORTAINER_WEBHOOK: "https://192.168.12.21:9443/api/webhooks/ee5dbc0d-18e8-45d7-bcfd-b24d1f2c0ee6"
|
||||
|
||||
# -------------------------
|
||||
# DEVELOPMENT (development)
|
||||
# -------------------------
|
||||
|
||||
build_dev:
|
||||
<<: *build_template
|
||||
only:
|
||||
- development
|
||||
variables:
|
||||
IMAGE_TAG: dev
|
||||
HUGO_ENV: development
|
||||
|
||||
deploy_dev:
|
||||
<<: *deploy_template
|
||||
only:
|
||||
- development
|
||||
variables:
|
||||
PORTAINER_WEBHOOK: "https://192.168.12.21:9443/api/webhooks/DEV-WEBHOOK-ID"
|
||||
Reference in New Issue
Block a user