Some checks failed
continuous-integration/drone/push Build encountered an error
123 lines
3.1 KiB
YAML
123 lines
3.1 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: build-backend
|
|
image: golang:1.24.0
|
|
environment:
|
|
GIT_USER:
|
|
from_secret: GIT_USER
|
|
GIT_PASS:
|
|
from_secret: GIT_PASS
|
|
commands:
|
|
- echo "machine git.itzana.me login $${GIT_USER} password $${GIT_PASS}" > ~/.netrc
|
|
- chmod 600 ~/.netrc
|
|
- make build-backend
|
|
|
|
- name: build-validator
|
|
image: muslrust:1.86.0
|
|
commands:
|
|
- make build-validator
|
|
|
|
- name: build-web
|
|
image: bun:1.2.8
|
|
commands:
|
|
- make build-web
|
|
|
|
- name: image-backend
|
|
image: plugins/docker
|
|
settings:
|
|
registry: registry.itzana.me
|
|
repo: registry.itzana.me/strafesnet/maptest-api
|
|
tags:
|
|
- ${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
|
- ${DRONE_BRANCH}
|
|
username:
|
|
from_secret: REGISTRY_USER
|
|
password:
|
|
from_secret: REGISTRY_PASS
|
|
dockerfile: Dockerfile
|
|
context: .
|
|
depends_on:
|
|
- build-backend
|
|
|
|
- name: image-frontend
|
|
image: plugins/docker
|
|
settings:
|
|
registry: registry.itzana.me
|
|
repo: registry.itzana.me/strafesnet/maptest-frontend
|
|
tags:
|
|
- ${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
|
- ${DRONE_BRANCH}
|
|
username:
|
|
from_secret: REGISTRY_USER
|
|
password:
|
|
from_secret: REGISTRY_PASS
|
|
dockerfile: web/Containerfile
|
|
context: web
|
|
depends_on:
|
|
- build-frontend
|
|
|
|
- name: image-validator
|
|
image: plugins/docker
|
|
settings:
|
|
registry: registry.itzana.me
|
|
repo: registry.itzana.me/strafesnet/maptest-validator
|
|
tags:
|
|
- ${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
|
- ${DRONE_BRANCH}
|
|
username:
|
|
from_secret: REGISTRY_USER
|
|
password:
|
|
from_secret: REGISTRY_PASS
|
|
dockerfile: validation/Containerfile
|
|
context: validation
|
|
depends_on:
|
|
- build-validator
|
|
|
|
- name: deploy
|
|
image: argoproj/argocd:latest
|
|
commands:
|
|
- argocd login --grpc-web cd.stricity.com --username $USERNAME --password $PASSWORD
|
|
- argocd app --grpc-web set ${DRONE_BRANCH}-maps-service --kustomize-image registry.itzana.me/strafesnet/maptest-api:${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
|
- argocd app --grpc-web set ${DRONE_BRANCH}-maps-service --kustomize-image registry.itzana.me/strafesnet/maptest-frontend:${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
|
- argocd app --grpc-web set ${DRONE_BRANCH}-maps-service --kustomize-image registry.itzana.me/strafesnet/maptest-validator:${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
|
environment:
|
|
USERNAME:
|
|
from_secret: ARGO_USER
|
|
PASSWORD:
|
|
from_secret: ARGO_PASS
|
|
depends_on:
|
|
- image-backend
|
|
- image-frontend
|
|
- image-validator
|
|
when:
|
|
branch:
|
|
- master
|
|
- staging
|
|
event:
|
|
- push
|
|
|
|
# pr dry run
|
|
- name: build-pr
|
|
image: alpine
|
|
commands:
|
|
- echo "Success!"
|
|
depends_on:
|
|
- build-backend
|
|
- build-validator
|
|
- build-web
|
|
when:
|
|
event:
|
|
- pull_request
|
|
---
|
|
kind: signature
|
|
hmac: 9d45e7e2eeed92974ab938b0b50e3565593927bc427fb6be8daed867403c536c
|
|
|
|
...
|