Refactor Docker (#254)
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Refactor docker to use makefile build commands Reviewed-on: #254 Co-authored-by: Rhys Lloyd <krakow20@gmail.com> Co-committed-by: Rhys Lloyd <krakow20@gmail.com>
This commit was merged in pull request #254.
This commit is contained in:
109
.drone.yml
109
.drone.yml
@@ -7,7 +7,43 @@ platform:
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: api
|
||||
- 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
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- staging
|
||||
|
||||
- name: build-validator
|
||||
image: clux/muslrust:1.86.0-stable
|
||||
commands:
|
||||
- make build-validator
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- staging
|
||||
|
||||
- name: build-frontend
|
||||
image: oven/bun:1.2.8
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install make
|
||||
- make build-frontend
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- staging
|
||||
|
||||
- name: image-backend
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.itzana.me
|
||||
@@ -19,8 +55,10 @@ steps:
|
||||
from_secret: REGISTRY_USER
|
||||
password:
|
||||
from_secret: REGISTRY_PASS
|
||||
dockerfile: Containerfile
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
depends_on:
|
||||
- build-backend
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
@@ -28,7 +66,7 @@ steps:
|
||||
event:
|
||||
- push
|
||||
|
||||
- name: frontend
|
||||
- name: image-frontend
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.itzana.me
|
||||
@@ -42,6 +80,8 @@ steps:
|
||||
from_secret: REGISTRY_PASS
|
||||
dockerfile: web/Containerfile
|
||||
context: web
|
||||
depends_on:
|
||||
- build-frontend
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
@@ -49,7 +89,7 @@ steps:
|
||||
event:
|
||||
- push
|
||||
|
||||
- name: validator
|
||||
- name: image-validator
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.itzana.me
|
||||
@@ -63,6 +103,8 @@ steps:
|
||||
from_secret: REGISTRY_PASS
|
||||
dockerfile: validation/Containerfile
|
||||
context: validation
|
||||
depends_on:
|
||||
- build-validator
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
@@ -83,9 +125,9 @@ steps:
|
||||
PASSWORD:
|
||||
from_secret: ARGO_PASS
|
||||
depends_on:
|
||||
- api
|
||||
- frontend
|
||||
- validator
|
||||
- image-backend
|
||||
- image-frontend
|
||||
- image-validator
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
@@ -94,64 +136,19 @@ steps:
|
||||
- push
|
||||
|
||||
# pr dry run
|
||||
- name: api-pr
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.itzana.me
|
||||
repo: registry.itzana.me/strafesnet/maptest-validator
|
||||
tags:
|
||||
- ${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
||||
- ${DRONE_BRANCH}
|
||||
dockerfile: Containerfile
|
||||
context: .
|
||||
dry_run: true
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
|
||||
- name: frontend-pr
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.itzana.me
|
||||
repo: registry.itzana.me/strafesnet/maptest-validator
|
||||
tags:
|
||||
- ${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
||||
- ${DRONE_BRANCH}
|
||||
dockerfile: web/Containerfile
|
||||
context: web
|
||||
dry_run: true
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
|
||||
- name: validator-pr
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.itzana.me
|
||||
repo: registry.itzana.me/strafesnet/maptest-validator
|
||||
tags:
|
||||
- ${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
||||
- ${DRONE_BRANCH}
|
||||
dockerfile: validation/Containerfile
|
||||
context: validation
|
||||
dry_run: true
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
|
||||
- name: build-pr
|
||||
image: alpine
|
||||
commands:
|
||||
- echo "Success!"
|
||||
depends_on:
|
||||
- api-pr
|
||||
- frontend-pr
|
||||
- validator-pr
|
||||
- build-backend
|
||||
- build-validator
|
||||
- build-frontend
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
---
|
||||
kind: signature
|
||||
hmac: 11e6d7f1eb839d3798fdcb642ca5523c011bd14c1f3a0343a9c3106bab9ef142
|
||||
hmac: 9880a1bb4725c81e38b5d185bbfccaf70ddf8021299557d1815f78e78817c5e6
|
||||
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user