forked from Ensono/stacks-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstackscli.yml
180 lines (162 loc) · 6.03 KB
/
stackscli.yml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# Configuration file for setting up the project
framework:
name: java
commands:
- name: java
version: ">= 17"
# Pipeline files
pipeline:
- type: azdo
files:
- name: build
path: build/azDevOps/azure/azure-pipelines-javaspring-k8s.yml
- name: variable
path: build/azDevOps/azure/azuredevops-vars.yml
replacements:
- pattern: ^.*stacks-credentials-nonprod-kv$
value: ""
- pattern: ^.*stacks-infra-credentials-nonprod$
value: ""
- pattern: ^.*stacks-infra-credentials-prod$
value: ""
- pattern: ^.*stacks-credentials-prod-kv$
value: ""
- pattern: ^.*stacks-credentials-nonprod-kv$
value: ""
- pattern: ^.*stacks-java-api$
value: ""
# The init stage are things that are required to run before the template is run
init:
operations:
# Copy pipelines for build and deploy
- action: cmd
cmd: mvn
args: process-resources
-f stacksclipom.xml
-P copy-devops-resources
-P generate-settings-file
-Dtarget.dir={{ .Project.Directory.WorkingDir }}
--quiet
desc: Copying build and deploy pipelines into the project structure
# Build archetype for the main code
- action: cmd
cmd: mvn
args: clean archetype:create-from-project
-f ./java/pom.xml
-DpropertyFile=./java/archetype.properties
-s {{ .Project.Directory.WorkingDir }}/settings.xml
--quiet
desc: Creating the archetype resources using the web-api source code
- action: cmd
cmd: mvn
args: install
-f ./java/target/generated-sources/archetype/pom.xml
--quiet
desc: Installing the archetype
(groupId= com.amido.stacks.workloads,
artifactId= stacks-api-archetype,
version= 1.0.0) in the local maven repository
- action: cmd
cmd: mvn
args: archetype:generate
-DoutputDirectory={{ .Project.Directory.WorkingDir }}
-DarchetypeGroupId=com.amido.stacks.workloads
-DarchetypeArtifactId=stacks-api-archetype
-DarchetypeVersion=1.0.0
-DgroupId=com.{{ .Input.Business.Company}}.{{ .Input.Business.Domain }}
-DartifactId={{ .Project.Name }}
-Dpackage=com.{{ .Input.Business.Company}}.{{ .Input.Business.Domain }}.{{.Input.Business.Component}}
--quiet
-B
desc: Generating the web-api project
- action: cmd
cmd: mvn
args: process-resources
-f stacksclipom.xml
-P rename-source-folder
-Dtemp.project.dir={{ .Project.Name }}
-Dtarget.dir={{ .Project.Directory.WorkingDir }}
--quiet
desc: Renaming the source code folder to java
- action: cmd
cmd: mvn
args: process-resources
-f {{ .Project.Directory.WorkingDir }}/java/pom.xml
--quiet
desc: Updating file permissions
- action: cmd
cmd: mvn
args: dependency:resolve
-f {{ .Project.Directory.WorkingDir }}/java/pom.xml
--quiet
desc: Downloading maven dependencies for the web-api project
- action: cmd
cmd: mvn
args: fmt:format
-f {{ .Project.Directory.WorkingDir }}/java/pom.xml
--quiet
desc: Formating the web-api code to meet the fmt standards
# Build archetype for the serenity tests
- action: cmd
cmd: mvn
args: process-resources
-f ./api-tests/pom.xml
-P archetype-resources
--quiet
desc: Duplicating the original pom.xml file to archetype-pom.xml
- action: cmd
cmd: mvn
args: clean archetype:create-from-project
-f ./api-tests/pom-temp.xml
-DpropertyFile=./api-tests/archetype.properties
-s {{ .Project.Directory.WorkingDir }}/settings.xml
--quiet
desc: Creating the archetype resources using the api-test source code
- action: cmd
cmd: mvn
args: install
-f ./api-tests/target/generated-sources/archetype/pom.xml
--quiet
desc: Installing the archetype (groupId= com.amido.stacks.tests,
artifactId= stacks-api-tests-archetype, version= 1.0.0)
in the local maven repository
- action: cmd
cmd: mvn
args: archetype:generate
-DoutputDirectory={{ .Project.Directory.WorkingDir }}
-DarchetypeGroupId=com.amido.stacks.tests
-DarchetypeArtifactId=stacks-api-tests-archetype
-DarchetypeVersion=1.0.0
-DgroupId=com.{{ .Input.Business.Company}}.{{ .Input.Business.Domain }}
-DartifactId=api-tests
-Dpackage=com.{{ .Input.Business.Company}}.{{ .Input.Business.Domain }}.{{.Input.Business.Component}}.tests
-DpactLocation=com/{{ .Input.Business.Company}}/{{ .Input.Business.Domain }}/{{.Input.Business.Component}}/tests
--quiet
-B
desc: Generating the api-test project
- action: cmd
cmd: mvn
args: process-resources
-f {{ .Project.Directory.WorkingDir }}/api-tests/pom-temp.xml
-P setup-workload-resources
--quiet
desc: Replacing the original pom.xml file with the new package references
- action: cmd
cmd: mvn
args: process-resources
-f {{ .Project.Directory.WorkingDir }}/api-tests/pom.xml
--quiet
desc: Updating file permissions
- action: cmd
cmd: mvn
args: fmt:format
-f {{ .Project.Directory.WorkingDir }}/api-tests/pom.xml
--quiet
desc: Formating the web-api serenity functional tests
to meet the fmt standards
- action: cmd
cmd: mvn
args: dependency:resolve
-f {{ .Project.Directory.WorkingDir }}/api-tests/pom.xml
--quiet
desc: Downloading maven dependencies for the api-tests project