-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathrelease_workflow_trunk.d2
More file actions
executable file
·69 lines (58 loc) · 1.96 KB
/
release_workflow_trunk.d2
File metadata and controls
executable file
·69 lines (58 loc) · 1.96 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
#!/usr/bin/env d2 --sketch
#
# Author: Hari Sekhon
# Date: 2025-02-28 12:52:10 +0700 (Fri, 28 Feb 2025)
#
# vim:ts=2:sts=2:sw=2:et:filetype=d2
#
# https://github.com/HariSekhon/Diagrams-as-Code
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn
# and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
title: {
label: "Release Workflow - Unified\nTrunk Based"
near: top-center
shape: text
style.font-size: 40
}
classes: {
devs: {
label: Devs
icon: https://diagrams.mingrammer.com/img/resources/onprem/client/users.png
shape: image
}
cicd: {
label: CI/CD
shape: diamond
}
}
devs.class: devs
branch1.label: Git Feature Branch # \nfeature/fancy-stuff
branch2.label: Git Bugfix Branch
# \nbugfix/broken-stuff
# branch3.label: Git Feature Branch\nfeature/more-fancy-stuff
trunk_branch.label: Git Trunk Branch\n\"main\"
cicd1.class: cicd
# cicd2.class: cicd
dev_env.label: Dev\nEnvironment
staging_env.label: Staging / QA\nEnvironment
prod_env.label: Production\nEnvironment
devs -> branch1: git push {style.animated: true}
devs -> branch2: git push {style.animated: true}
# devs -> branch3: git push changes {style.animated: true}
branch1 -> trunk_branch: git pull request\nmerge {style.animated: true}
branch2 -> trunk_branch: git pull request\nmerge {style.animated: true}
# branch3 -> trunk_branch: git merge {style.animated: true}
# make diagram messy and is implied
# branch1 -> cicd2: trigger\nbuild & test {style.animated: true}
# branch2 -> cicd2: trigger\nbuild & test {style.animated: true}
# branch3 -> cicd2: tigger\nbuild & test {style.animated: true}
trunk_branch -> cicd1: git tag\ntriggers {style.animated: true}
cicd1 -> dev_env: build & deploy {style.animated: true}
dev_env -> staging_env: promote artifact {style.animated: true}
staging_env -> prod_env: promote artifact {style.animated: true}