|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: CI Test Pipeline
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Unit Tests and Linters
|
|
|
|
image: python:3.11-bullseye
|
|
|
|
# Todo add command for lint checks
|
|
|
|
commands:
|
|
|
|
- bash -xc './scripts/run_linters.sh'
|
|
|
|
- bash -xc './scripts/run_unit_tests.sh'
|
|
|
|
group: test-lint
|
|
|
|
- name: Lint Chart
|
|
|
|
image: pelotech/drone-helm3
|
|
|
|
settings:
|
|
|
|
mode: lint
|
|
|
|
chart: ./charts/speech-collect
|
|
|
|
group: test-lint
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
- push
|
|
|
|
|
|
|
|
# Secrets used to pull private images
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: Build Production Image
|
|
|
|
steps:
|
|
|
|
- name: Build Speech Collect Container Image
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
username: automate
|
|
|
|
password:
|
|
|
|
from_secret: automate_password
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
registry: registry.runcible.io
|
|
|
|
repo: registry.runcible.io/speech-collect
|
|
|
|
tags:
|
|
|
|
- ${DRONE_COMMIT_SHA}
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: Deploy Dev
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Deploy Development
|
|
|
|
image: pelotech/drone-helm3
|
|
|
|
settings:
|
|
|
|
kube_service_account: automate
|
|
|
|
namespace: speech-collect-dev
|
|
|
|
helm_command: upgrade
|
|
|
|
values_files: ./.environments/dev-values.yaml
|
|
|
|
chart: ./charts/speech-collect
|
|
|
|
release: sc-dev
|
|
|
|
api_server:
|
|
|
|
from_secret: dev_api_server
|
|
|
|
kubernetes_token:
|
|
|
|
from_secret: dev_kubernetes_token
|
|
|
|
kube_certificate:
|
|
|
|
from_secret: dev_kubernetes_ca
|
|
|
|
# Self Signed Certs
|
|
|
|
skip_tls_verify: true
|
|
|
|
values:
|
|
|
|
- "image.tag=${DRONE_COMMIT_SHA}"
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- development
|