-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (74 loc) · 2.99 KB
/
build.yml
File metadata and controls
79 lines (74 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: "Build"
# This workflow builds and pushes Docker images
# Triggered on any tag push (e.g., v1.0.0, v1.0.0-beta.1)
#
# Monorepo strategy:
# - Uses filter_paths to detect which components changed
# - Builds only the changed components
# - Updates GitOps for beta/rc tags
on:
push:
tags:
- '**'
jobs:
build:
uses: LerianStudio/github-actions-shared-workflows/.github/workflows/build.yml@v1.11.0
with:
runner_type: "blacksmith-4vcpu-ubuntu-2404"
# Monorepo configuration
filter_paths: |-
components/manager
components/worker
path_level: 2
app_name_prefix: "reporter"
# Registry configuration
enable_dockerhub: true
enable_ghcr: true
dockerhub_org: lerianstudio
# GitOps artifacts for update_gitops job
enable_gitops_artifacts: true
# helm dispatch configuration
enable_helm_dispatch: true
helm_chart: "reporter"
helm_detect_env_changes: true
helm_values_key_mappings: '{"reporter-manager": "manager", "reporter-worker": "worker"}'
secrets: inherit
# =========================
# GITOPS UPDATE
# =========================
update_gitops:
needs: [build]
if: needs.build.result == 'success'
uses: LerianStudio/github-actions-shared-workflows/.github/workflows/gitops-update.yml@v1.11.0
with:
runner_type: "firmino-lxc-runners"
gitops_repository: "LerianStudio/midaz-firmino-gitops"
gitops_server: "firmino"
app_name: "reporter"
artifact_pattern: "gitops-tags-reporter-*"
gitops_file_dev: "gitops/environments/firmino/helmfile/applications/dev/reporter/values.yaml"
gitops_file_stg: "gitops/environments/firmino/helmfile/applications/stg/reporter/values.yaml"
gitops_file_prd: "gitops/environments/firmino/helmfile/applications/prd/reporter/values.yaml"
gitops_file_sandbox: "gitops/environments/firmino/helmfile/applications/sandbox/reporter/values.yaml"
yaml_key_mappings: '{"reporter-manager.tag": ".manager.image.tag", "reporter-worker.tag": ".worker.image.tag"}'
configmap_updates: '{"reporter-manager.tag": ".manager.configmap.VERSION", "reporter-worker.tag": ".worker.configmap.VERSION"}'
commit_message_prefix: "reporter"
enable_argocd_sync: true
argocd_app_name: "firmino-reporter"
use_dynamic_mapping: true
secrets: inherit
# =========================
# E2E TESTS
# =========================
# api-dog-e2e-tests:
# needs: [update_gitops]
# if: needs.update_gitops.result == 'success'
# uses: LerianStudio/github-actions-shared-workflows/.github/workflows/api-dog-e2e-tests.yml@v1.11.0
# with:
# runner_type: "firmino-lxc-runners"
# auto_detect_environment: true
# secrets:
# test_scenario_id: ${{ secrets.REPORTER_APIDOG_TEST_SCENARIO_ID }}
# apidog_access_token: ${{ secrets.APIDOG_ACCESS_TOKEN }}
# dev_environment_id: ${{ secrets.REPORTER_APIDOG_DEV_ENVIRONMENT_ID }}
# stg_environment_id: ${{ secrets.REPORTER_APIDOG_STG_ENVIRONMENT_ID }}