You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
barretthousen/.drone.yml

236 lines
6.9 KiB

kind: pipeline
type: kubernetes
name: Build Images
trigger:
event:
- push
steps:
- name: Build & Publish Catalog
image: plugins/kaniko
resources:
requests:
cpu: 2
memory: 1Gi
settings:
dockerfile: "./src/Dockerfile.prod-backend"
context: "./src"
target: production
registry: gitea.homelab-public
repo: git.vdhsn.com/barretthousen/service-catalog
enable_cache: true
cache_repo: git.vdhsn.com/barretthousen/ci-cache
skip_unused_stages: true
build_args:
- "service=catalog"
tags:
- ${DRONE_COMMIT_SHA}
custom_labels:
- com.barretthousen.service=catalog
- com.barretthousen.version=${DRONE_COMMIT_SHA}
- com.barretthousen.git-ref=${DRONE_COMMIT_SHA}
- com.barretthousen.build-date=${DRONE_BUILD_STARTED}
- com.barrethousen.builder=${DRONE_COMMIT_AUTHOR}
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
- name: Build & Publish Runner
image: plugins/kaniko
resources:
requests:
cpu: 2
memory: 1Gi
settings:
dockerfile: "./src/Dockerfile.prod-backend"
context: "./src"
target: production
registry: gitea.homelab-public
repo: git.vdhsn.com/barretthousen/service-runner
enable_cache: true
cache_repo: git.vdhsn.com/barretthousen/ci-cache
skip_unused_stages: true
build_args:
- "service=runner"
tags:
- ${DRONE_COMMIT_SHA}
custom_labels:
- com.barretthousen.service=runner
- com.barretthousen.version=${DRONE_COMMIT_SHA}
- com.barretthousen.git-ref=${DRONE_COMMIT_SHA}
- com.barretthousen.build-date=${DRONE_BUILD_STARTED}
- com.barrethousen.builder=${DRONE_COMMIT_AUTHOR}
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
- name: Build & Publish Auth
image: plugins/kaniko
resources:
requests:
cpu: 2
memory: 1Gi
settings:
dockerfile: "./src/Dockerfile.prod-backend"
context: "./src"
target: production
registry: gitea.homelab-public
repo: git.vdhsn.com/barretthousen/service-auth
enable_cache: true
cache_repo: git.vdhsn.com/barretthousen/ci-cache
skip_unused_stages: true
build_args:
- "service=auth"
tags:
- ${DRONE_COMMIT_SHA}
custom_labels:
- com.barretthousen.service=auth
- com.barretthousen.version=${DRONE_COMMIT_SHA}
- com.barretthousen.git-ref=${DRONE_COMMIT_SHA}
- com.barretthousen.build-date=${DRONE_BUILD_STARTED}
- com.barrethousen.builder=${DRONE_COMMIT_AUTHOR}
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
- name: Build & Publish Proxy Admin
image: plugins/kaniko
resources:
requests:
cpu: 2
memory: 1Gi
settings:
dockerfile: "./src/Dockerfile.prod-backend"
context: "./src"
target: production
registry: gitea.homelab-public
repo: git.vdhsn.com/barretthousen/service-proxy-admin
enable_cache: true
cache_repo: git.vdhsn.com/barretthousen/ci-cache
skip_unused_stages: true
build_args:
- "service=proxy-admin"
tags:
- ${DRONE_COMMIT_SHA}
custom_labels:
- com.barretthousen.service=proxy-admin
- com.barretthousen.version=${DRONE_COMMIT_SHA}
- com.barretthousen.git-ref=${DRONE_COMMIT_SHA}
- com.barretthousen.build-date=${DRONE_BUILD_STARTED}
- com.barrethousen.builder=${DRONE_COMMIT_AUTHOR}
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
- name: Build & Publish Proxy Web
image: plugins/kaniko
resources:
requests:
cpu: 2
memory: 1Gi
settings:
dockerfile: "./src/Dockerfile.prod-backend"
context: "./src"
target: production
registry: gitea.homelab-public
repo: git.vdhsn.com/barretthousen/service-proxy-web
enable_cache: true
cache_repo: git.vdhsn.com/barretthousen/ci-cache
skip_unused_stages: true
build_args:
- "service=proxy-web"
tags:
- ${DRONE_COMMIT_SHA}
custom_labels:
- com.barretthousen.service=proxy-web
- com.barretthousen.version=${DRONE_COMMIT_SHA}
- com.barretthousen.git-ref=${DRONE_COMMIT_SHA}
- com.barretthousen.build-date=${DRONE_BUILD_STARTED}
- com.barrethousen.builder=${DRONE_COMMIT_AUTHOR}
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
- name: Build & Publish Web Client
image: plugins/kaniko
resources:
requests:
cpu: 2
memory: 1Gi
settings:
dockerfile: "./src/Dockerfile.frontend"
context: "./src/web-client"
target: production
registry: gitea.homelab-public
repo: git.vdhsn.com/barretthousen/service-proxy-web
enable_cache: true
cache_repo: git.vdhsn.com/barretthousen/ci-cache
skip_unused_stages: true
build_args:
- "service=proxy-web"
tags:
- ${DRONE_COMMIT_SHA}
custom_labels:
- com.barretthousen.service=proxy-web
- com.barretthousen.version=${DRONE_COMMIT_SHA}
- com.barretthousen.git-ref=${DRONE_COMMIT_SHA}
- com.barretthousen.build-date=${DRONE_BUILD_STARTED}
- com.barrethousen.builder=${DRONE_COMMIT_AUTHOR}
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
- name: Build & Publish Admin Client
image: plugins/kaniko
resources:
requests:
cpu: 2
memory: 1Gi
settings:
dockerfile: "./src/Dockerfile.frontend"
context: "./src/admin-client"
target: production
registry: gitea.homelab-public
repo: git.vdhsn.com/barretthousen/client-admin-client
enable_cache: true
cache_repo: git.vdhsn.com/barretthousen/ci-cache
skip_unused_stages: true
build_args:
- "service=admin-client"
tags:
- ${DRONE_COMMIT_SHA}
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
- name: discord notification
image: appleboy/drone-discord
environment:
DISCORD_WEBHOOK_ID:
from_secret: DISCORD_WEBHOOK_ID
DISCORD_WEBHOOK_TOKEN:
from_secret: DISCORD_WEBHOOK_TOKEN
settings:
username: Drone CI
message: Barretthousen Image Builds Complete
webhook_id:
from_secret: DISCORD_WEBHOOK_ID
webhook_token:
from_secret: DISCORD_WEBHOOK_TOKEN
depends_on:
- Build & Publish Catalog
- Build & Publish Runner
- Build & Publish Auth
- Build & Publish Proxy Admin
- Build & Publish Proxy Web
- Build & Publish Web Client
- Build & Publish Admin Client