Compare commits

252 Commits

Author SHA1 Message Date
63eacd7406 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1353690986
2024-06-29 14:01:30 +00:00
719018e0d6 update 2024-06-29 09:00:38 -05:00
bf5417aa4c update 2024-06-29 08:51:22 -05:00
5e6f5a1523 update 2024-06-29 08:17:28 -05:00
f729e23a9f ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1353663774
2024-06-29 12:44:33 +00:00
cc54a82cee update 2024-06-29 07:43:46 -05:00
806bfe7ae5 update 2024-06-29 07:42:06 -05:00
7aa1367a46 update 2024-05-28 22:21:33 -05:00
362750ad08 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1309595514
2024-05-29 02:59:14 +00:00
0657acd0c8 update 2024-05-28 21:58:24 -05:00
4eb7eff790 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1309587836
2024-05-29 02:43:39 +00:00
282a377a1f update 2024-05-28 21:42:43 -05:00
acdaadedc5 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1309579929
2024-05-29 02:34:29 +00:00
02bcbe831e update 2024-05-28 21:33:04 -05:00
68993e2ccc ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1309572113
2024-05-29 02:23:29 +00:00
c469db82cd update 2024-05-28 21:22:15 -05:00
642940f0a4 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1309567581
2024-05-29 02:17:17 +00:00
8ea7205484 update 2024-05-28 21:14:11 -05:00
4107e22c4e ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1309565562
2024-05-29 02:11:09 +00:00
6ed30bb009 update 2024-05-28 21:10:10 -05:00
323f2ff92c ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1309563701
2024-05-29 02:07:43 +00:00
9b7f13f5bf update 2024-05-28 21:06:53 -05:00
1473841a5f ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1309547716
2024-05-29 01:42:56 +00:00
d93cf53105 update 2024-05-28 20:37:07 -05:00
aad652cfd5 update 2024-05-28 20:20:26 -05:00
9c7bbbbb2c ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1286865970
2024-05-11 12:12:33 +00:00
8cb6a6c8b3 update 2024-05-11 07:12:02 -05:00
584066d228 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285977796
2024-05-10 12:53:30 +00:00
86157b7393 update 2024-05-10 07:53:01 -05:00
0a76cc5a68 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285974101
2024-05-10 12:50:32 +00:00
dbd12cf6ab update 2024-05-10 07:49:41 -05:00
9cb8773e27 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285780299
2024-05-10 09:54:57 +00:00
0977583776 update 2024-05-10 04:54:09 -05:00
d86f3dfdca ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285768776
2024-05-10 09:43:29 +00:00
0f0fe6ec63 update 2024-05-10 04:42:55 -05:00
4cf5c612a3 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285359034
2024-05-10 00:35:31 +00:00
50368f7fa0 update 2024-05-09 19:34:37 -05:00
10906d8430 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285352433
2024-05-10 00:21:36 +00:00
a0e72af228 update 2024-05-09 19:20:30 -05:00
1daea2cd79 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285350467
2024-05-10 00:18:28 +00:00
2bd3aaf048 update 2024-05-09 19:17:31 -05:00
c314bef48d ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285343938
2024-05-10 00:12:28 +00:00
2750be1111 update 2024-05-09 19:11:33 -05:00
d2f35bf48c ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285341577
2024-05-10 00:09:29 +00:00
e380ecbd92 update 2024-05-09 19:08:54 -05:00
62e9fa2e9a update 2024-05-09 19:08:02 -05:00
e23d10806e ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285340537
2024-05-10 00:07:57 +00:00
ec42dbb641 update 2024-05-09 19:07:02 -05:00
c0bc3972a7 update 2024-05-09 19:05:17 -05:00
c4aef20994 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285337882
2024-05-10 00:04:58 +00:00
8e67ec8341 update 2024-05-09 19:04:06 -05:00
4b76641b2b ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285322164
2024-05-09 23:47:44 +00:00
cbef9a0299 update 2024-05-09 18:46:36 -05:00
a229283a45 update 2024-05-09 18:39:50 -05:00
e4681305ee update 2024-05-09 18:23:59 -05:00
ab8dc5f532 update 2024-05-09 18:23:13 -05:00
4e1d3b01f0 update 2024-05-09 18:16:52 -05:00
935ee5b2c9 update 2024-05-09 18:10:03 -05:00
54e8906f98 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1285291176
2024-05-09 23:03:30 +00:00
de0380baf5 update 2024-05-09 18:02:44 -05:00
ea7dc679de update 2024-05-09 17:58:34 -05:00
8a49f75e66 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1280037984
2024-05-06 11:19:15 +00:00
e0c37dc036 update 2024-05-06 06:18:35 -05:00
6cc79fa417 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1280034932
2024-05-06 11:16:18 +00:00
945ac257a1 update 2024-05-06 06:15:47 -05:00
919aa63a77 update 2024-05-06 04:55:40 -05:00
579209d521 update 2024-05-06 04:49:31 -05:00
2ef179dd66 update 2024-05-06 04:46:46 -05:00
d92d4ca09e update 2024-05-06 04:46:02 -05:00
79999edf2d update 2024-05-05 14:29:57 -05:00
872806d47a update 2024-05-05 14:26:39 -05:00
deb92dc15a update 2024-05-05 14:06:24 -05:00
84fd8e7dfd update 2024-05-05 14:04:16 -05:00
3dc9668436 fix loop 2024-05-05 14:01:54 -05:00
e28031e3bd update 2024-05-05 14:01:04 -05:00
fb42f0b7df update 2024-05-05 14:00:40 -05:00
2055a848eb update 2024-05-05 13:59:52 -05:00
f0b05cbeda update pipeline 2024-05-05 13:57:52 -05:00
30931618cc update rules 2024-05-05 13:39:22 -05:00
08039d982d test rules 2024-05-05 13:34:14 -05:00
fee65cfac6 test reference 2024-05-05 13:32:48 -05:00
45b1ba0cc9 update 2024-05-05 13:20:16 -05:00
51e70cb5f6 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1279131273
2024-05-05 18:18:17 +00:00
cf20485fce update 2024-05-05 13:17:29 -05:00
5998930c01 update 2024-05-05 11:38:21 -05:00
3ed3d5b169 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1279094530
2024-05-05 16:37:48 +00:00
4f5fd36962 update 2024-05-05 11:37:14 -05:00
21dbdaa9c0 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1279090575
2024-05-05 16:25:17 +00:00
afcf71cdb5 update 2024-05-05 11:24:25 -05:00
c3739257fa ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1279078176
2024-05-05 15:59:47 +00:00
efa01db1ff update 2024-05-05 10:59:17 -05:00
1f055dd76b ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1279076866
2024-05-05 15:53:19 +00:00
87a7efd1d2 update 2024-05-05 10:52:37 -05:00
ac9c66371f ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1279074171
2024-05-05 15:44:52 +00:00
7efb408637 update 2024-05-05 10:43:59 -05:00
dc9b8c2a6f ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1279068997
2024-05-05 15:27:14 +00:00
8c5cd42caa update 2024-05-05 10:26:28 -05:00
c5b5570969 update 2024-05-05 10:21:48 -05:00
1e6c8475fa update 2024-05-05 10:20:22 -05:00
b025d5f86c update 2024-05-05 10:18:32 -05:00
52116ff6c9 update 2024-05-05 10:05:11 -05:00
722d963839 update 2024-05-05 09:47:18 -05:00
5d148e7153 update 2024-05-05 09:46:09 -05:00
9ab0e6a822 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1279052932
2024-05-05 14:44:15 +00:00
db6054d437 update 2024-05-05 09:43:42 -05:00
668906398d update 2024-05-05 09:05:31 -05:00
5cf4b1d71c update 2024-05-05 09:02:57 -05:00
c87cfffd18 update 2024-05-05 09:01:46 -05:00
2fa5972c9d update 2024-05-05 09:00:23 -05:00
87d1efe1a2 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1279034175
2024-05-05 13:53:22 +00:00
ba38649a9f update 2024-05-05 08:52:27 -05:00
46c05c1fc3 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1279031201
2024-05-05 13:42:42 +00:00
e5661070c8 update 2024-05-05 08:42:17 -05:00
55b4964798 update 2024-05-05 08:39:39 -05:00
70823bb3ed update 2024-05-05 08:37:35 -05:00
f1d097a01a ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1241759779
2024-04-05 14:05:20 +00:00
efa0102109 update 2024-04-05 09:04:18 -05:00
baedbf6841 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1241751285
2024-04-05 14:01:22 +00:00
b1fc502fa1 update 2024-04-05 09:00:49 -05:00
47e74a9cab update 2024-04-05 09:00:14 -05:00
3e5aa5c10f update 2024-04-01 16:10:49 -05:00
f37b68dedd ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1235290571
2024-04-01 10:05:12 +00:00
7a69b9611d update 2024-04-01 05:04:40 -05:00
a0e20856f0 update 2024-03-31 13:18:39 -05:00
4575438b7d ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1234706202
2024-03-31 15:02:41 +00:00
529d38db9f update 2024-03-31 10:02:00 -05:00
ef964fc04e ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1234698452
2024-03-31 14:45:41 +00:00
45075cd136 update 2024-03-31 09:45:01 -05:00
4bed167cf0 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1234696927
2024-03-31 14:39:39 +00:00
971bf4fe61 update 2024-03-31 09:38:54 -05:00
b9bec8b70f ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1234695239
2024-03-31 14:31:08 +00:00
ada9c3cc9d update 2024-03-31 09:30:33 -05:00
2d06f6a2f9 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1234693557
2024-03-31 14:29:08 +00:00
148a5c0319 update 2024-03-31 09:28:32 -05:00
a0c372eebb update 2024-03-31 09:24:30 -05:00
1b63d7c6c7 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1234689864
2024-03-31 14:23:38 +00:00
a0e2715e44 update 2024-03-31 09:22:53 -05:00
e46369cded update 2024-03-31 09:21:39 -05:00
417840b6cc Update file compliance.yml 2024-03-21 11:34:36 +00:00
c8b0669596 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1222159433
2024-03-21 11:20:46 +00:00
2e2ed2ad14 Update 8 files
- /templates/docker.tpl.yml
- /templates/gitlab.tpl.yml
- /templates/golang.tpl.yml
- /templates/nuget.tpl.yml
- /templates/octopus.tpl.yml
- /templates/sonarqube.tpl.yml
- /templates/version.tpl.yml
- /templates/helm.tpl.yml
2024-03-21 11:20:07 +00:00
950fa7d0dc update 2023-11-26 10:46:53 -06:00
34dbc49075 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1085180372
2023-11-26 03:32:41 +00:00
78e551b686 update 2023-11-25 21:31:51 -06:00
ab91acbad4 update 2023-11-25 08:24:08 -06:00
c16dfadf7b update 2023-11-25 08:19:37 -06:00
1cdab13068 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1084897303
2023-11-25 14:02:11 +00:00
7846749fde update 2023-11-25 08:01:24 -06:00
a73c5aba19 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1084892736
2023-11-25 13:56:41 +00:00
9e906353fc update 2023-11-25 07:55:52 -06:00
8a141a0a6c update 2023-11-25 07:55:36 -06:00
e6fbb8515b ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1084891234
2023-11-25 13:49:39 +00:00
8dca27b4ac update 2023-11-25 07:49:14 -06:00
1b7998b388 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1084890913
2023-11-25 13:47:09 +00:00
243a6e755b update 2023-11-25 07:46:27 -06:00
4f9a03ff42 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1084889959
2023-11-25 13:44:11 +00:00
b094022f2b update 2023-11-25 07:43:37 -06:00
a63edbd635 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1084874430
2023-11-25 12:51:08 +00:00
6c53a88bf1 update 2023-11-25 06:50:40 -06:00
fea2141e15 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1084873630
2023-11-25 12:47:39 +00:00
c29c168f64 update 2023-11-25 06:47:07 -06:00
8cf45462f1 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1084872375
2023-11-25 12:42:40 +00:00
14d1577bb7 update 2023-11-25 06:42:18 -06:00
fd1fb54314 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1084871367
2023-11-25 12:39:08 +00:00
d8f93f8f9e update 2023-11-25 06:38:20 -06:00
99d262387d ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1084869922
2023-11-25 12:32:40 +00:00
d24da4cf0a update 2023-11-25 06:32:10 -06:00
2ac3189c46 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1084866182
2023-11-25 12:21:44 +00:00
8b4072d500 update 2023-11-25 06:21:10 -06:00
7255ea2da0 update 2023-11-25 05:51:57 -06:00
9e448a716d update 2023-11-25 05:49:12 -06:00
85a837e652 update 2023-11-25 05:36:46 -06:00
378a8b2c56 update 2023-11-25 05:36:01 -06:00
bd870d721b update 2023-11-25 05:34:11 -06:00
4e1d59b0e8 update 2023-11-25 05:33:28 -06:00
4c75cbfef4 update 2023-11-25 05:33:05 -06:00
45f3acc425 update 2023-11-25 05:17:14 -06:00
16a68a03f1 update 2023-11-25 05:07:06 -06:00
bf93c49c4c update 2023-11-25 05:06:13 -06:00
e1ca976a6d update 2023-11-25 05:02:53 -06:00
3914c740c5 update 2023-11-25 05:01:22 -06:00
5ba8ead424 update 2023-11-25 04:59:18 -06:00
464dc28a9d update 2023-11-24 07:40:36 -06:00
0c78a23938 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1083380855
2023-11-23 21:38:44 +00:00
8b43a98da5 update 2023-11-23 15:38:19 -06:00
1d682a58da ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1083375716
2023-11-23 21:26:46 +00:00
31a00e6d49 update tag 2023-11-23 15:26:09 -06:00
5689d6e99a update docker for dev tag 2023-11-23 15:25:57 -06:00
5fd1be1d8d update 2023-11-23 13:58:58 -06:00
83ae4f0ce2 update 2023-11-23 13:56:37 -06:00
b79b99c5bf update 2023-11-23 13:56:11 -06:00
cb0654f398 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1083316641
2023-11-23 19:54:23 +00:00
8b1a55de49 update 2023-11-23 13:53:49 -06:00
1050584364 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1083314661
2023-11-23 19:50:49 +00:00
df1eb6fb89 update 2023-11-23 13:50:02 -06:00
b19c3bdf94 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1083293830
2023-11-23 19:22:47 +00:00
60f24b9f79 Update 2 files
- /.gitlab-ci.yml
- /.gitlab/.gitlab-ci.yml
2023-11-23 19:22:08 +00:00
a0b3a6bf5c update 2023-11-23 13:16:24 -06:00
463ec9d09c ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1080699773
2023-11-21 20:19:05 +00:00
6ab4b3a5db update 2023-11-21 14:18:24 -06:00
629bbd6ad8 update 2023-11-21 13:47:24 -06:00
e849da09ef update 2023-11-21 13:23:11 -06:00
ad16b1dd46 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1080652770
2023-11-21 19:22:04 +00:00
ffef37af6c update 2023-11-21 13:21:09 -06:00
f5159ad1df ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1080641979
2023-11-21 19:11:04 +00:00
d8b2d168be update 2023-11-21 13:09:12 -06:00
c60b97407f update 2023-11-21 13:00:30 -06:00
5f3cf0eb29 ujpdate 2023-11-21 13:00:15 -06:00
20c3a66e82 update 2023-11-21 12:59:28 -06:00
c48c24ae67 update 2023-11-21 12:54:19 -06:00
91a91cd876 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/1080619092
2023-11-21 18:49:34 +00:00
32bf3c878d update 2023-11-21 12:48:54 -06:00
f625752f3b update 2023-11-21 12:45:54 -06:00
358ff939b2 update 2023-11-21 12:39:40 -06:00
44af92919f update 2023-08-20 11:35:15 -05:00
5309f01654 update 2023-08-20 11:35:02 -05:00
2251a3ff34 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/973570173
2023-08-20 13:48:16 +00:00
01bf91aeee Update 2 files
- /scripts/helm-push.sh
- /templates/helm.tpl.yml
2023-08-20 13:47:30 +00:00
d425a7f16a Update file helm.yml 2023-08-20 13:38:31 +00:00
a3e2143444 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/973566949
2023-08-20 13:35:16 +00:00
a2200f77b2 Update file helm.tpl.yml 2023-08-20 13:34:41 +00:00
06e518ab7c ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/973558733
2023-08-20 13:03:50 +00:00
21832c0d01 Update 2 files
- /pipelines/helm.yml
- /templates/helm.tpl.yml
2023-08-20 13:02:51 +00:00
a1db997227 Update 2 files
- /pipelines/helm.yaml
- /pipelines/helm.yml
2023-08-20 13:02:26 +00:00
8669ce1b77 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/973554570
2023-08-20 13:00:46 +00:00
53a46e61b5 Update file helm.tpl.yml 2023-08-20 13:00:00 +00:00
3a4132c0d4 Update file helm.tpl.yml 2023-08-20 12:58:51 +00:00
504045e17c Update 4 files
- /scripts/helm-push.sh
- /scripts/helm-login.sh
- /templates/helm.tpl.yml
- /pipelines/helm.yaml
2023-08-20 12:57:34 +00:00
9aab9546fd Update file golang.yml 2023-08-19 20:47:53 +00:00
48a78e6487 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/966220261
2023-08-13 15:14:59 +00:00
ffda7963f9 Update 3 files
- /scripts/octo-pack.sh
- /templates/octopus.tpl.yml
- /pipelines/octo-templates.yml
2023-08-13 15:14:21 +00:00
70013b9c65 Update file terraform-gitlab.yml 2023-08-13 13:50:19 +00:00
7a36f7ca69 Update file terraform-gitlab.yml 2023-08-13 13:19:37 +00:00
d56e714b21 Update file terraform-gitlab.yml 2023-08-13 13:11:42 +00:00
bcb5915063 Update file terraform-gitlab.yml 2023-08-13 13:11:05 +00:00
82a291f69b Update file terraform-gitlab.yml 2023-08-13 13:04:54 +00:00
1ae683f7d8 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/966129271
2023-08-13 13:03:33 +00:00
94e8153768 Update 3 files
- /pipelines/terraform-gitlab.yml
- /pipelines/terraform.yml
- /templates/terraform.tpl.yml
2023-08-13 13:02:53 +00:00
b8a1ffd020 Update file terraform-gitlab.yml 2023-08-13 12:29:43 +00:00
6391a67b52 Update file terraform.yml 2023-08-06 21:58:03 +00:00
bcc15b22a3 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/957483772
2023-08-06 21:54:15 +00:00
4292458f5c Update file terraform.tpl.yml 2023-08-06 21:53:45 +00:00
0e8b3183ee Update file terraform.yml 2023-08-06 21:51:42 +00:00
ab4eab5d36 Update file terraform.yml 2023-08-06 21:50:01 +00:00
ac07356556 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/957423720
2023-08-06 18:16:47 +00:00
efabc73d3c Update 2 files
- /templates/docker.tpl.yml
- /templates/terraform.tpl.yml
2023-08-06 18:15:53 +00:00
9cd1491c49 Update file terraform.yml 2023-07-29 13:23:20 +00:00
70c53b18a8 Update file terraform.yml 2023-07-29 13:19:47 +00:00
81e318b0ac ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/949421439
2023-07-29 13:18:27 +00:00
a62b66d917 Update 3 files
- /pipelines/terraform.yml
- /scripts/cd-workdir.sh
- /templates/terraform.tpl.yml
2023-07-29 13:17:37 +00:00
157a641f67 ci: render
Rendered by https://gitlab.com/developerdurp/yml/-/pipelines/949417304
2023-07-29 13:01:27 +00:00
3648086d32 Update 7 files
- /scripts/terraform-fmt.sh
- /scripts/terraform-init.sh
- /scripts/terraform-plan.sh
- /scripts/terraform-validate.sh
- /scripts/terraform-apply.sh
- /scripts/terraform-destroy.sh
- /templates/terraform.tpl.yml
2023-07-29 13:00:58 +00:00
64 changed files with 1226 additions and 129 deletions

View File

@@ -11,29 +11,20 @@ workflow:
render-job-templates-yml:
stage: render
image: registry.durp.info/debian:bullseye-slim
image: registry.internal.durp.info/debian:bullseye-slim
script:
- ./scripts/install-curl.sh
- ./scripts/install-git.sh
- ./scripts/install-yq.sh
- ./scripts/render-job-templates.sh
- ./scripts/commit-and-push-changes.sh
rules:
- if: $CI_COMMIT_BRANCH
changes:
- .gitlab-ci.yml
- scripts/**
- templates/**
- job-templates.yml
- job-templates.tpl.yml
render-pipelines-to-branch:
stage: render
image: registry.internal.durp.info/debian:bullseye-slim
script:
- ./scripts/install-curl.sh
- ./scripts/install-git.sh
- ./scripts/install-yq.sh
- ./scripts/render-pipelines-branch.sh
- ./scripts/commit-and-push-changes.sh
rules:
- if: $CI_COMMIT_BRANCH =~ /^release*/

View File

@@ -12,7 +12,7 @@ workflow:
- if: '$CI_COMMIT_BRANCH && $CI_SCRIPTS_SKIP_PIPELINE != "true"'
render-job-templates-yml:
stage: render
image: registry.durp.info/debian:bullseye-slim
image: registry.internal.durp.info/debian:bullseye-slim
script:
# Begin of install-curl.sh
- |
@@ -31,7 +31,7 @@ render-job-templates-yml:
# End of install-yq.sh
# Begin of render-job-templates.sh
- "# render job-templates.yml from job-templates.tpl.yml\nset -euo pipefail\nfor script in scripts/*.sh; do\n awk -v script_name=\"$(basename \"$script\")\" '\n NR==1 && /^#!/ {printf(\"# Begin of %s\\n\",script_name); next} # strip shebang in first line, print head comment\n /^\\s*$/ {next} # strip any newlines or whitespace\n /^#%%MULTILINE_YAML_START$/ { print \"- |\"; multiline=1; next } # detect start of multiline yaml block, print \"- |\" into output yml\n /^#%%MULTILINE_YAML_END$/ { multiline=0; next } # detect end of multiline yaml block\n multiline==1 {printf(\" %s\\n\",$0)} # print indented script of multiline yaml block\n multiline==0 {printf(\"- !!str %s\\n\",$0)} # not in multiline yaml, just print with \"- !!str\" (explicit yaml tag to avoid any quoting)\n END { printf(\"# End of %s\\n\",script_name) } # print trailing comment\n ' \"$script\" >\"$script.yml\"\ndone\n# start with copy and then edit in place using yq -i\ncat <<EOF >job-templates.yml\n### WARNING ###\n### THIS FILE IS RENDERED! DO NOT EDIT! ANY CHANGE WILL BE REVERTED BY RENDERING PIPELINE\n### Edit the template file job-templates.tpl.yml instead!\nEOF\ncat job-templates.tpl.yml >> job-templates.yml\n# shellcheck disable=SC2016 # \"unquoted $ warning\"\n./yq -i '(.[] | select(keys | .[] | select(tag == \"!!str\") | test(\"^(before_|after_|)script$\")) | .\"*script\") ref $scripts\n | ($scripts | .. | select(. == \"./scripts/*.sh\")) |= (load(. + \".yml\") | .[] style=\"\")\n | ($scripts | .[] | select(type == \"!reference\")) |= ([.] | . style=\"flow\")\n | ($scripts | select(type == \"!!seq\")) |= flatten(1)\n | explode .\n ' job-templates.yml\nfor template in templates/*.tpl.yml\n do \n export pipeline=$(basename $template | sed \"s/.tpl//\")\n cat $template > jobs/$pipeline \n ./yq -i '(.[] | select(keys | .[] | select(tag == \"!!str\") | test(\"^(before_|after_|)script$\")) | .\"*script\") ref $scripts\n | ($scripts | .. | select(. == \"./scripts/*.sh\")) |= (load(. + \".yml\") | .[] style=\"\")\n | ($scripts | .[] | select(type == \"!reference\")) |= ([.] | . style=\"flow\")\n | ($scripts | select(type == \"!!seq\")) |= flatten(1)\n | explode .\n ' jobs/$pipeline\ndone\n"
- "# render job-templates.yml from job-templates.tpl.yml\nset -euo pipefail\nfor pwsh in $(find ./scripts -name '*.ps1'); do\n script=$(cat $pwsh)\n sh_file=\"${pwsh%.ps1}.sh\"\n \n # Escape double quotes and dollar signs\n script=\"${script//\\\"/\\\\\\\"}\"\n script=\"${script//\\$/\\\\\\$}\"\n pwsh_command=\"pwsh -c \\\"$script\\\"\"\n echo '#!/usr/bin/env bash' > \"$sh_file\"\n echo '#%%MULTILINE_YAML_START' >> \"$sh_file\"\n echo \"$pwsh_command\" >> \"$sh_file\"\ndone\nfor script in $(find ./scripts -name '*.sh'); do\n awk -v script_name=\"$(basename \"$script\")\" '\n NR==1 && /^#!/ {printf(\"# Begin of %s\\n\",script_name); next} # strip shebang in first line, print head comment\n /^\\s*$/ {next} # strip any newlines or whitespace\n /^#%%MULTILINE_YAML_START$/ { print \"- |\"; multiline=1; next } # detect start of multiline yaml block, print \"- |\" into output yml\n /^#%%MULTILINE_YAML_END$/ { multiline=0; next } # detect end of multiline yaml block\n multiline==1 {printf(\" %s\\n\",$0)} # print indented script of multiline yaml block\n multiline==0 {printf(\"- !!str %s\\n\",$0)} # not in multiline yaml, just print with \"- !!str\" (explicit yaml tag to avoid any quoting)\n END { printf(\"# End of %s\\n\",script_name) } # print trailing comment\n ' \"$script\" >\"$script.yml\"\ndone\n# start with copy and then edit in place using yq -i\ncat <<EOF >job-templates.yml\n### WARNING ###\n### THIS FILE IS RENDERED! DO NOT EDIT! ANY CHANGE WILL BE REVERTED BY RENDERING PIPELINE\n### Edit the template file job-templates.tpl.yml instead!\nEOF\ncat job-templates.tpl.yml >> job-templates.yml\n# shellcheck disable=SC2016 # \"unquoted $ warning\"\n./yq -i '(.[] | select(keys | .[] | select(tag == \"!!str\") | test(\"^(before_|after_|)script$\")) | .\"*script\") ref $scripts\n | ($scripts | .. | select(. == \"./scripts/*.sh\")) |= (load(. + \".yml\") | .[] style=\"\")\n | ($scripts | .[] | select(type == \"!reference\")) |= ([.] | . style=\"flow\")\n | ($scripts | select(type == \"!!seq\")) |= flatten(1)\n | explode .\n ' job-templates.yml\nfor template in templates/*.tpl.yml\n do \n export pipeline=$(basename $template | sed \"s/.tpl//\")\n cat $template > jobs/$pipeline \n ./yq -i '(.[] | select(keys | .[] | select(tag == \"!!str\") | test(\"^(before_|after_|)script$\")) | .\"*script\") ref $scripts\n | ($scripts | .. | select(. == \"./scripts/*.sh\")) |= (load(. + \".yml\") | .[] style=\"\")\n | ($scripts | .[] | select(type == \"!reference\")) |= ([.] | . style=\"flow\")\n | ($scripts | select(type == \"!!seq\")) |= flatten(1)\n | explode .\n ' jobs/$pipeline\ndone\n"
# End of render-job-templates.sh
# Begin of commit-and-push-changes.sh
@@ -47,16 +47,9 @@ render-job-templates-yml:
git push -o ci.variable="CI_SCRIPTS_SKIP_PIPELINE=true" "https://oauth2:${GITLAB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" "HEAD:$CI_COMMIT_BRANCH"
curl --silent --fail --request POST --form token="$CI_JOB_TOKEN" --form ref="$CI_COMMIT_BRANCH" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/trigger/pipeline" >/dev/null
# End of commit-and-push-changes.sh
rules:
- if: $CI_COMMIT_BRANCH
changes:
- .gitlab-ci.yml
- scripts/**
- templates/**
- job-templates.yml
- job-templates.tpl.yml
render-pipelines-to-branch:
stage: render
image: registry.internal.durp.info/debian:bullseye-slim
script:
# Begin of install-curl.sh
- |
@@ -91,5 +84,3 @@ render-pipelines-to-branch:
git push -o ci.variable="CI_SCRIPTS_SKIP_PIPELINE=true" "https://oauth2:${GITLAB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" "HEAD:$CI_COMMIT_BRANCH"
curl --silent --fail --request POST --form token="$CI_JOB_TOKEN" --form ref="$CI_COMMIT_BRANCH" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/trigger/pipeline" >/dev/null
# End of commit-and-push-changes.sh
rules:
- if: $CI_COMMIT_BRANCH =~ /^release*/

58
jobs/codescan.yml Normal file
View File

@@ -0,0 +1,58 @@
.generate_sbom:
image: registry.internal.durp.info/nixos/nix:latest
script:
# Begin of syft-install.sh
- |
#Syft install
nix-env -iA nixpkgs.syft
# End of syft-install.sh
# Begin of syft-mkdir.sh
- |
#mkdir for syft files
mkdir $CI_PROJECT_DIR/syft
# End of syft-mkdir.sh
# Begin of syft-go.sh
- |
#Syft scan for go
if [ -f "go.mod" ]; then
syft go.mod -o cyclonedx-json=syft/${CI_PROJECT_NAME}.sbom.json
fi
# End of syft-go.sh
# Begin of syft-docker.sh
- |
#Syft scan for docker
for i in packages/*.tar.gz;
do filename=${i%.*.*.*.tar.gz};
filename="$(basename -- "$filename")"
syft $i -o cyclonedx-json=syft/$filename.docker.sbom.json;
done
# End of syft-docker.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/syft
.generate_cve:
image: registry.internal.durp.info/nixos/nix:latest
script:
# Begin of grype-install.sh
- |
#Syft install
nix-env -iA nixpkgs.grype
# End of grype-install.sh
# Begin of grype.sh
- |
#grype scan sboms
for i in syft/*.sbom.json;
do filename=${i%*.sbom.json};
filename=${filename##/};
grype $i -o json --file $filename.cve.json;
done
# End of grype.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/syft

View File

@@ -1,5 +1,5 @@
.docker-build-container:
image: registry.durp.info/docker:20.10.17
image: registry.internal.durp.info/docker:20.10.17
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
@@ -21,3 +21,64 @@
docker push "$CI_REGISTRY/$CI_PROJECT_PATH:latest"
docker push "$CI_REGISTRY/$CI_PROJECT_PATH:$VERSION"
# End of docker-build.sh
.docker_build:
image: registry.internal.durp.info/docker:20.10.17
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: tcp://127.0.0.1:2375/
services:
- name: docker:dind
entrypoint: ["dockerd-entrypoint.sh", "--tls=false"]
script:
# Begin of version.sh
- |
#check for Version variable
if [ -z "${VERSION}" ]; then
# If not, assign a default value
VERSION=$CI_COMMIT_SHORT_SHA
fi
# End of version.sh
# Begin of build.sh
- |
#Build Docker Container
mkdir $CI_PROJECT_DIR/packages
containername=$(echo "$PROJECT_NAME" | awk '{print tolower($0)}')
docker build -t $containername .
docker save -o $CI_PROJECT_DIR/packages/$containername.$VERSION.tar.gz $containername
# End of build.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/packages
.docker_push_gitlab:
image: registry.internal.durp.info/docker:20.10.17
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: tcp://127.0.0.1:2375/
services:
- name: docker:dind
entrypoint: ["dockerd-entrypoint.sh", "--tls=false"]
script:
# Begin of login.sh
- |
#Docker Login
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY/$CI_PROJECT_PATH
# End of login.sh
# Begin of push-gitlab.sh
- |
#Push container to gitlab
containername=$(echo "$PROJECT_NAME" | awk '{print tolower($0)}')
if echo "$VERSION" | grep -Eq '^[0-9]+(\.[0-9]+)*$'; then
tag="latest"
else
tag="dev"
fi
docker import $CI_PROJECT_DIR/packages/$containername.$VERSION.tar.gz $CI_REGISTRY/$CI_PROJECT_PATH:$VERSION
docker import $CI_PROJECT_DIR/packages/$containername.$VERSION.tar.gz $CI_REGISTRY/$CI_PROJECT_PATH:$tag
docker push "$CI_REGISTRY/$CI_PROJECT_PATH:$VERSION"
docker push "$CI_REGISTRY/$CI_PROJECT_PATH:$tag"
# End of push-gitlab.sh

80
jobs/gitlab.yml Normal file
View File

@@ -0,0 +1,80 @@
.gitlab-move-files:
image: registry.internal.durp.info/debian:latest
script:
# Begin of movefiles.sh
- |
#move files to output
mkdir $CI_PROJECT_DIR/output
for i in $(echo $PROJECT_NAME | tr ";" "\n");
do mkdir $CI_PROJECT_DIR/output/$i;
cp -r $CI_PROJECT_DIR/$i $CI_PROJECT_DIR/output/;
done
# End of movefiles.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/output
.gitlab-deploy:
stage: deploy
image: mcr.microsoft.com/powershell:latest
script:
# Begin of update-chart.sh
- |
pwsh -c "Install-Module -Name powershell-yaml -Confirm:\$false -Force
\$template = (Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'= \$ENV:GITLAB_TOKEN } -Uri \"https://gitlab.com/api/v4/projects/45028985/repository/files/durpapi%2FChart.yaml/raw?ref=main\") | ConvertFrom-Yaml
\$template.version = \$ENV:VERSION
\$body = @{
branch = \"main\"
commit_message = \"Update Chart\"
content = \"\$(\$template | convertto-yaml)\"
} | ConvertTo-Json
Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'= \$ENV:GITLAB_TOKEN } -ContentType \"application/json\" -Method Put -body \$body -Uri \"https://gitlab.com/api/v4/projects/45028985/repository/files/durpapi%2FChart.yaml\""
# End of update-chart.sh
environment:
name: production
url: https://api.durp.info/goapi
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/'
when: manual
needs:
- job: version
artifacts: true
.generate-config:
stage: build
needs:
- job: version
artifacts: true
script:
# Begin of create-environment.sh
- |
#test deployment
echo "
$VERSION:
stage: deploy
image: mcr.microsoft.com/powershell:latest
script:
" >> generated-config.yml
echo '
- |
pwsh -c "Install-Module -Name powershell-yaml -Confirm:\$false -Force
\$template = (Invoke-RestMethod -Headers @{ \"PRIVATE-TOKEN\"= \$ENV:GITLAB_TOKEN } -Uri \"\$ENV:CI_API_V4_URL/projects/\$ENV:GITLAB_PROJECT_ID/repository/files/\$ENV:GITLAB_CHART_PATH/raw?ref=\$ENV:ENVIRONMENT\") | ConvertFrom-Yaml
\$template.version = \$ENV:VERSION
\$body = @{
branch = \"\$ENV:ENVIRONMENT\"
commit_message = \"Update Chart\"
content = \"\$(\$template | convertto-yaml)\"
} | ConvertTo-Json
Invoke-RestMethod -Headers @{ \"PRIVATE-TOKEN\"= \$ENV:GITLAB_TOKEN } -ContentType \"application/json\" -Method Put -body \$body -Uri \"\$ENV:CI_API_V4_URL/projects/\$ENV:GITLAB_PROJECT_ID/repository/files/\$ENV:GITLAB_CHART_PATH\""
needs:
- pipeline: $PARENT_PIPELINE_ID
job: version
' >> generated-config.yml
echo "
environment:
name: $ENVIRONMENT
" >> generated-config.yml
# End of create-environment.sh
artifacts:
expire_in: never
paths:
- generated-config.yml

View File

@@ -1,19 +1,20 @@
.golang-build-api:
.golang-build:
variables:
GOPROXY: https://nexus.durp.info/repository/go/
image: registry.durp.info/golang:1.20
#GOPROXY: https://nexus.durp.info/repository/go/
image: registry.internal.durp.info/golang:${GO_VERSION}
script:
# Begin of golang-build-api.sh
- "#Build golang api\nexport GOPATH=/go\nexport PATH=$PATH:$GOPATH/bin\nmkdir output\ngo install \ngo install github.com/swaggo/swag/cmd/swag@v1.8.12 \nswag init\nCGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ./output/main .\n"
# End of golang-build-api.sh
# Begin of golang-build.sh
- "#Build golang project\nexport GOPATH=/go\nexport PATH=$PATH:$GOPATH/bin\nmkdir output\n#go install \ngo mod download\n# Check if go.mod contains \"swag\"\nif grep -q \"swag\" go.mod; then\n echo \"Found 'swag' in go.mod. Running swag init...\"\n go install github.com/swaggo/swag/cmd/swag@latest\n swag init --parseDependency\nfi\nCGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ./output/main .\n"
# End of golang-build.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/output
.golang-lint:
variables:
GOPROXY: https://nexus.durp.info/repository/go/
image: registry.durp.info/golangci/golangci-lint:latest
#GOPROXY: https://nexus.durp.info/repository/go/
CGO_ENABLED: 0
image: registry.internal.durp.info/golangci/golangci-lint:${GOLANGCI_LINT_VERISON}
script:
# Begin of golang-lint.sh
- |

View File

@@ -1,12 +1,6 @@
.helm-createchart:
image: registry.durp.info/dtzar/helm-kubectl
.helm-build:
image: registry.internal.durp.info/dtzar/helm-kubectl
script:
# Begin of helm-addrepo.sh
- |
#Helm repo add
helm repo add --username gitlab-ci-token --password ${CI_JOB_TOKEN} ${CI_PROJECT_NAME} ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable
# End of helm-addrepo.sh
# Begin of helm-package.sh
- |
#Helm Package
@@ -17,6 +11,18 @@
fi
done
# End of helm-package.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/packages
.helm-push:
image: registry.internal.durp.info/dtzar/helm-kubectl
script:
# Begin of helm-addrepo.sh
- |
#Helm repo add
helm repo add --username gitlab-ci-token --password ${CI_JOB_TOKEN} ${CI_PROJECT_NAME} ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable
# End of helm-addrepo.sh
# Begin of helm-push.sh
- "#Helm Push \n \nhelm plugin install https://github.com/chartmuseum/helm-push\nfor chart in packages/*; do\n helm cm-push ./$chart ${CI_PROJECT_NAME}\ndone\n"

11
jobs/nuget.yml Normal file
View File

@@ -0,0 +1,11 @@
.nuget_push:
image: registry.internal.durp.info/dotnet/core/sdk:latest
script:
# Begin of push.sh
- |
#Nuget Push
dotnet nuget add source "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/nuget/index.json" --name gitlab --username gitlab-ci-token --password $CI_JOB_TOKEN --store-password-in-clear-text
for i in $(echo $PROJECT_NAME | tr ";" "\n");
do dotnet nuget push "${CI_PROJECT_DIR}/packages/$i.$VERSION.nupkg" --source gitlab;
done
# End of push.sh

24
jobs/octopus.yml Normal file
View File

@@ -0,0 +1,24 @@
.octo_package:
image: registry.internal.durp.info/octopusdeploy/octo:latest
script:
# Begin of pack.sh
- |
#Package with octopus
mkdir $CI_PROJECT_DIR/packages
for dir in ./output/*/;
do dir=${dir%*/};
dir=${dir##*/};
dotnet /octo/octo.dll pack --id=$dir --version=$VERSION --outFolder=$CI_PROJECT_DIR/packages --basePath=$CI_PROJECT_DIR/output/$dir;
done
# End of pack.sh
artifacts:
paths:
- $CI_PROJECT_DIR/packages
.octo_release:
image: registry.internal.durp.info/octopusdeploy/octo:latest
script:
# Begin of create_release.sh
- |
#Octopus Create Release
dotnet /octo/octo.dll create-release --project=$OCTO_PROJECT_NAME --releaseNumber=$VERSION --server=https://octopus.internal.durp.info/ --apiKey=$OCTOAPI --packagesFolder=$CI_PROJECT_DIR/packages --gitRef main
# End of create_release.sh

View File

@@ -3,7 +3,7 @@
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
image:
name: registry.durp.info/sonarsource/sonar-scanner-cli:latest
name: registry.internal.durp.info/sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
cache:
key: "${CI_JOB_NAME}"

83
jobs/terraform.yml Normal file
View File

@@ -0,0 +1,83 @@
.terraform_fmt:
script:
# Begin of cd-workdir.sh
- |
#change directory
cd $WORKDIR
# End of cd-workdir.sh
# Begin of fmt.sh
- |
#Terraform fmt
tofu fmt -diff -check -write=false
# End of fmt.sh
.terraform_validate:
script:
# Begin of cd-workdir.sh
- |
#change directory
cd $WORKDIR
# End of cd-workdir.sh
# Begin of init.sh
- "#Terraform init \ntofu init -reconfigure -backend-config=\"address=${GITLAB_TF_ADDRESS}\" -backend-config=\"lock_address=${GITLAB_TF_ADDRESS}/lock\" -backend-config=\"unlock_address=${GITLAB_TF_ADDRESS}/lock\" -backend-config=\"username=gitlab-ci-token\" -backend-config=\"password=${CI_JOB_TOKEN}\" -backend-config=\"lock_method=POST\" -backend-config=\"unlock_method=DELETE\" -backend-config=\"retry_wait_min=5\" \n"
# End of init.sh
# Begin of validate.sh
- "#Terraform validate\ntofu validate \n"
# End of validate.sh
.terraform_plan:
variables:
PLAN: plan.tfplan
JSON_PLAN_FILE: tfplan.json
script:
# Begin of cd-workdir.sh
- |
#change directory
cd $WORKDIR
# End of cd-workdir.sh
# Begin of init.sh
- "#Terraform init \ntofu init -reconfigure -backend-config=\"address=${GITLAB_TF_ADDRESS}\" -backend-config=\"lock_address=${GITLAB_TF_ADDRESS}/lock\" -backend-config=\"unlock_address=${GITLAB_TF_ADDRESS}/lock\" -backend-config=\"username=gitlab-ci-token\" -backend-config=\"password=${CI_JOB_TOKEN}\" -backend-config=\"lock_method=POST\" -backend-config=\"unlock_method=DELETE\" -backend-config=\"retry_wait_min=5\" \n"
# End of init.sh
# Begin of plan.sh
- "#Terraform plan \napk add --update curl jq \nalias convert_report=\"jq -r '([.resource_changes[].change.actions?]|flatten)|{\\\"create\\\":(map(select(.==\\\"create\\\"))|length),\\\"update\\\":(map(select(.==\\\"update\\\"))|length),\\\"delete\\\":(map(select(.==\\\"delete\\\"))|length)}'\"\ntofu plan -out=$PLAN $ARGUMENTS\ntofu show --json $PLAN | jq -r '([.resource_changes[].change.actions?]|flatten)|{\"create\":(map(select(.==\"create\"))|length),\"update\":(map(select(.==\"update\"))|length),\"delete\":(map(select(.==\"delete\"))|length)}' > $JSON_PLAN_FILE\n"
# End of plan.sh
artifacts:
reports:
terraform: $WORKDIR/$JSON_PLAN_FILE
.terraform_apply:
script:
# Begin of cd-workdir.sh
- |
#change directory
cd $WORKDIR
# End of cd-workdir.sh
# Begin of init.sh
- "#Terraform init \ntofu init -reconfigure -backend-config=\"address=${GITLAB_TF_ADDRESS}\" -backend-config=\"lock_address=${GITLAB_TF_ADDRESS}/lock\" -backend-config=\"unlock_address=${GITLAB_TF_ADDRESS}/lock\" -backend-config=\"username=gitlab-ci-token\" -backend-config=\"password=${CI_JOB_TOKEN}\" -backend-config=\"lock_method=POST\" -backend-config=\"unlock_method=DELETE\" -backend-config=\"retry_wait_min=5\" \n"
# End of init.sh
# Begin of apply.sh
- |
#Terraform validate
tofu apply -auto-approve $ARGUMENTS
# End of apply.sh
.terraform_destroy:
script:
# Begin of cd-workdir.sh
- |
#change directory
cd $WORKDIR
# End of cd-workdir.sh
# Begin of init.sh
- "#Terraform init \ntofu init -reconfigure -backend-config=\"address=${GITLAB_TF_ADDRESS}\" -backend-config=\"lock_address=${GITLAB_TF_ADDRESS}/lock\" -backend-config=\"unlock_address=${GITLAB_TF_ADDRESS}/lock\" -backend-config=\"username=gitlab-ci-token\" -backend-config=\"password=${CI_JOB_TOKEN}\" -backend-config=\"lock_method=POST\" -backend-config=\"unlock_method=DELETE\" -backend-config=\"retry_wait_min=5\" \n"
# End of init.sh
# Begin of destroy.sh
- |
#Terraform validate
tofu destroy -auto-approve $ARGUMENTS
# End of destroy.sh

View File

@@ -1,9 +1,9 @@
.version:
image: registry.durp.info/gittools/gitversion:5.12.0
image: registry.internal.durp.info/gittools/gitversion:5.12.0
variables:
GIT_DEPTH: "0"
script:
# Begin of version-number.sh
# Begin of version.sh
- |
#Check for configuration
echo "mode: ContinuousDeployment
@@ -37,7 +37,8 @@
version=$(/tools/dotnet-gitversion /showvariable NuGetVersionV2)
echo "VERSION=$version" >> version.env
cat version.env
# End of version-number.sh
# End of version.sh
artifacts:
expire_in: never
reports:
dotenv: version.env

21
pipeline.yml Normal file
View File

@@ -0,0 +1,21 @@
stages:
- deploy
variables:
GO_VERSION: "1.22"
GOLANGCI_LINT_VERISON: "v1.58.0"
UPLOAD_PACKAGE: "false"
build_go:
stage: deploy
allow_failure: false
trigger:
include:
- project: 'developerdurp/yml'
ref: 'main'
file:
- 'pipelines/go-build.yml'
strategy: depend
rules:
- exists:
- "go.mod"

View File

@@ -0,0 +1,47 @@
stages:
- build
- package
- publish
include:
- template: Security/Secret-Detection.gitlab-ci.yml
- project: 'developerdurp/yml'
ref: 'main'
file:
- 'jobs/docker.yml'
- 'jobs/version.yml'
secret_detection:
stage: .pre
rules:
- when: always
allow_failure: false
version:
extends: .version
stage: .pre
rules:
- when: always
build_container:
extends: .docker-build-container
stage: build
artifacts:
paths:
- $CI_PROJECT_DIR/packages
needs:
- job: version
artifacts: true
#publish_container:
# extends: .docker_push_gitlab
# stage: publish
# needs:
# - job: version
# artifacts: true
# - job: build_container
# artifacts: true
# rules:
# - if: $CI_COMMIT_BRANCH =~ '/^release/'
# - if: $CI_COMMIT_BRANCH =~ 'main'
# - when: never

View File

@@ -0,0 +1,63 @@
stages:
- build
- package
- publish
include:
- project: 'developerdurp/yml'
ref: 'main'
file:
- 'jobs/octopus.yml'
- 'jobs/version.yml'
- 'jobs/nuget.yml'
- 'jobs/gitlab.yml'
version:
extends: .version
stage: .pre
rules:
- when: always
build:
extends: .gitlab-move-files
stage: build
package:
extends: .octo_package
stage: package
needs:
- job: build
artifacts: true
- job: version
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH =~ '/^release/'
- if: $CI_COMMIT_BRANCH =~ 'main'
- when: never
upload:
extends: .nuget_push
stage: package
needs:
- job: version
artifacts: true
- job: package
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH =~ '/^release/'
- if: $CI_COMMIT_BRANCH =~ 'main'
- when: never
publish:
extends: .octo_release
stage: publish
needs:
- job: package
artifacts: true
- job: version
artifacts: true
- job: upload
rules:
- if: $CI_COMMIT_BRANCH =~ '/^release/'
- if: $CI_COMMIT_BRANCH =~ 'main'
- when: never

61
pipelines/go-build.yml Normal file
View File

@@ -0,0 +1,61 @@
stages:
- build
- validate
- publish
include:
- template: Security/Secret-Detection.gitlab-ci.yml
- project: 'developerdurp/yml'
ref: 'main'
file:
- 'jobs/golang.yml'
- 'jobs/golang.yml'
- 'jobs/docker.yml'
- 'rules/rules.yml'
- 'pipelines/templates/security.yml'
golang-lint:
extends: .golang-lint
stage: validate
rules:
- !reference [.mr_only_rules, rules]
docker-build:
extends: .docker-build-container
stage: build
needs:
- job: gobuild
artifacts: true
- pipeline: $PARENT_PIPELINE_ID
job: version
rules:
- !reference [.docker_rules, rules]
gobuild:
variables:
GOPROXY: https://nexus.durp.info/repository/go/
extends: .golang-build
stage: build
rules:
- !reference [.default_mr_rules, rules]
#docker-build:
# extends: .docker_build
# stage: build
# needs:
# - job: gobuild
# artifacts: true
# - pipeline: $PARENT_PIPELINE_ID
# job: version
# rules:
# - !reference [.docker_rules, rules]
#docker-push:
# extends: .docker_push_gitlab
# stage: publish
# needs:
# - job: docker-build
# artifacts: true
# - pipeline: $PARENT_PIPELINE_ID
# job: version
# rules:
# - !reference [.docker_publish_rules, rules]

View File

@@ -1,56 +0,0 @@
stages:
- build
- package
- publish
include:
- project: 'developerdurp/yml'
ref: main
file:
- 'jobs/version.yml'
- 'jobs/sonarqube.yml'
- 'jobs/golang.yml'
- 'jobs/docker.yml'
- 'jobs/helm.yml'
version:
extends: .version
stage: .pre
rules:
- if: $CI_COMMIT_REF_NAME == 'main'
sonarqube:
extends: .sonarcloud-check
stage: .pre
rules:
- if: $CI_COMMIT_REF_NAME == 'main' || $CI_PIPELINE_SOURCE == 'merge_request_event'
golang-lint:
extends: .golang-lint
stage: .pre
gobuild:
extends: .golang-build-api
stage: build
docker:
extends: .docker-build-container
stage: publish
needs:
- job: gobuild
artifacts: true
- job: version
artifacts: true
rules:
- if: $CI_COMMIT_REF_NAME == 'main'
helm:
extends: .helm-createchart
stage: publish
needs:
- job: gobuild
artifacts: false
- job: version
artifacts: true
rules:
- if: $CI_COMMIT_REF_NAME == 'main'

39
pipelines/helm.yml Normal file
View File

@@ -0,0 +1,39 @@
stages:
- build
- publish
include:
- project: 'developerdurp/yml'
ref: 'main'
file:
- 'jobs/version.yml'
- 'jobs/helm.yml'
version:
extends: .version
stage: .pre
rules:
- if: $CI_COMMIT_REF_NAME == 'main'
- if: $CI_COMMIT_BRANCH =~ '/^release/'
helm-build:
extends: .helm-build
stage: build
needs:
- job: version
artifacts: true
rules:
- if: $CI_COMMIT_REF_NAME == 'main'
- if: $CI_COMMIT_BRANCH =~ '/^release/'
helm-push:
extends: .helm-push
stage: publish
needs:
- job: helm-build
artifacts: true
- job: version
artifacts: true
rules:
- if: $CI_COMMIT_REF_NAME == 'main'
- if: $CI_COMMIT_BRANCH =~ '/^release/'

View File

@@ -0,0 +1,25 @@
stages:
- package
- publish
include:
- project: 'developerdurp/yml'
ref: 'main'
file:
- 'jobs/version.yml'
- 'jobs/octopus.yml'
version:
extends: .version
stage: .pre
rules:
- if: $CI_COMMIT_REF_NAME == 'main'
pack:
variables:
WORKDIR: $CI_PROJECT_DIR
extends: .octo_package
stage: package
rules:
- if: $CI_COMMIT_REF_NAME == 'main'

View File

@@ -0,0 +1,43 @@
stages:
- build
include:
- template: Security/Secret-Detection.gitlab-ci.yml
- project: 'developerdurp/yml'
ref: 'main'
file:
- 'jobs/codescan.yml'
- 'jobs/sonarqube.yml'
- 'rules/rules.yml'
secret_detection:
stage: validate
rules:
- !reference [.mr_only_rules, rules]
allow_failure: false
generate_sbom:
extends: .generate_sbom
stage: build
needs:
- job: docker-build
optional: true
artifacts: true
rules:
- !reference [.mr_only_rules, rules]
generate_cve:
extends: .generate_cve
stage: build
needs:
- job: generate_sbom
artifacts: true
rules:
- !reference [.mr_only_rules, rules]
sonarqube:
extends: .sonarcloud-check
stage: validate
allow_failure: true
rules:
- !reference [.sonarqube_rules, rules]

View File

@@ -0,0 +1,37 @@
stages:
- plan
- apply
- destroy
variables:
WORKDIR: $CI_PROJECT_DIR/.tf
GITLAB_TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/gitlab
TF_VAR_GITLAB_PROJECT_ID: $CI_PROJECT_ID
TF_VAR_GITLAB_PROJECT_NAME: $CI_PROJECT_NAME
TF_VAR_GITLAB_TOKEN: $CI_JOB_TOKEN
image:
name: registry.durp.info/hashicorp/terraform:light
#name: hashicorp/terraform:light
entrypoint: [""]
include:
- project: 'developerdurp/yml'
ref: 'main'
file:
- 'jobs/terraform.yml'
format:
stage: .pre
allow_failure: false
extends: .terraform_fmt
validate:
stage: .pre
allow_failure: false
extends: .terraform_validate
apply:
stage: apply
allow_failure: false
extends: .terraform_apply

94
pipelines/terraform.yml Normal file
View File

@@ -0,0 +1,94 @@
stages:
- plan
- apply
- destroy
variables:
WORKDIR: $CI_PROJECT_DIR/terraform
GITLAB_TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/${ENVIRONMENT_NAME}
image:
name: registry.internal.durp.info/opentofu/opentofu:latest
entrypoint: [""]
include:
- project: 'developerdurp/yml'
ref: 'main'
file:
- 'jobs/terraform.yml'
format:
stage: .pre
allow_failure: false
extends: .terraform_fmt
validate:
stage: .pre
allow_failure: false
extends: .terraform_validate
plan-development:
stage: plan
environment:
name: development
variables:
ENVIRONMENT_NAME: dev
allow_failure: false
extends: .terraform_plan
needs: ["validate","format"]
plan-production:
stage: plan
environment:
name: production
variables:
ENVIRONMENT_NAME: prd
allow_failure: false
extends: .terraform_plan
needs: ["validate","format"]
apply-development:
stage: apply
environment:
name: development
variables:
ENVIRONMENT_NAME: dev
allow_failure: false
extends: .terraform_apply
rules:
- when: manual
apply-production:
stage: apply
environment:
name: production
variables:
ENVIRONMENT_NAME: prd
allow_failure: false
extends: .terraform_apply
rules:
- when: manual
destroy-development:
stage: destroy
environment:
name: development
variables:
ENVIRONMENT_NAME: dev
allow_failure: false
extends: .terraform_destroy
needs: ["apply-development"]
rules:
- when: manual
destroy-production:
stage: destroy
environment:
name: production
variables:
ENVIRONMENT_NAME: prd
allow_failure: false
extends: .terraform_destroy
needs: ["apply-production"]
rules:
- when: manual

47
rules/rules.yml Normal file
View File

@@ -0,0 +1,47 @@
.default_rules:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH =~ '/^release/'
.sonarqube_rules:
rules:
- if: $CI_MERGE_REQUEST_IID
exists:
- "sonar-project.properties"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
exists:
- "sonar-project.properties"
- if: $CI_COMMIT_BRANCH =~ '/^release/'
exists:
- "sonar-project.properties"
.default_mr_rules:
rules:
- if: $CI_MERGE_REQUEST_IID
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH =~ '/^release/'
.mr_only_rules:
rules:
- if: $CI_MERGE_REQUEST_IID
.docker_rules:
rules:
- if: $CI_MERGE_REQUEST_IID
exists:
- "Dockerfile"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
exists:
- "Dockerfile"
- if: $CI_COMMIT_BRANCH =~ '/^release/'
exists:
- "Dockerfile"
.docker_publish_rules:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
exists:
- "Dockerfile"
- if: $CI_COMMIT_BRANCH =~ '/^release/'
exists:
- "Dockerfile"

4
scripts/cd-workdir.sh Normal file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#change directory
cd $WORKDIR

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#check for Version variable
if [ -z "${VERSION}" ]; then
# If not, assign a default value
VERSION=$CI_COMMIT_SHORT_SHA
fi

8
scripts/docker/build.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Build Docker Container
mkdir $CI_PROJECT_DIR/packages
containername=$(echo "$PROJECT_NAME" | awk '{print tolower($0)}')
docker build -t $containername .
docker save -o $CI_PROJECT_DIR/packages/$containername.$VERSION.tar.gz $containername

4
scripts/docker/login.sh Normal file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Docker Login
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY/$CI_PROJECT_PATH

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Push container to gitlab
containername=$(echo "$PROJECT_NAME" | awk '{print tolower($0)}')
if echo "$VERSION" | grep -Eq '^[0-9]+(\.[0-9]+)*$'; then
tag="latest"
else
tag="dev"
fi
docker import $CI_PROJECT_DIR/packages/$containername.$VERSION.tar.gz $CI_REGISTRY/$CI_PROJECT_PATH:$VERSION
docker import $CI_PROJECT_DIR/packages/$containername.$VERSION.tar.gz $CI_REGISTRY/$CI_PROJECT_PATH:$tag
docker push "$CI_REGISTRY/$CI_PROJECT_PATH:$VERSION"
docker push "$CI_REGISTRY/$CI_PROJECT_PATH:$tag"

View File

@@ -0,0 +1,31 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#test deployment
echo "
$VERSION:
stage: deploy
image: mcr.microsoft.com/powershell:latest
script:
" >> generated-config.yml
echo '
- |
pwsh -c "Install-Module -Name powershell-yaml -Confirm:\$false -Force
\$template = (Invoke-RestMethod -Headers @{ \"PRIVATE-TOKEN\"= \$ENV:GITLAB_TOKEN } -Uri \"\$ENV:CI_API_V4_URL/projects/\$ENV:GITLAB_PROJECT_ID/repository/files/\$ENV:GITLAB_CHART_PATH/raw?ref=\$ENV:ENVIRONMENT\") | ConvertFrom-Yaml
\$template.version = \$ENV:VERSION
\$body = @{
branch = \"\$ENV:ENVIRONMENT\"
commit_message = \"Update Chart\"
content = \"\$(\$template | convertto-yaml)\"
} | ConvertTo-Json
Invoke-RestMethod -Headers @{ \"PRIVATE-TOKEN\"= \$ENV:GITLAB_TOKEN } -ContentType \"application/json\" -Method Put -body \$body -Uri \"\$ENV:CI_API_V4_URL/projects/\$ENV:GITLAB_PROJECT_ID/repository/files/\$ENV:GITLAB_CHART_PATH\""
needs:
- pipeline: $PARENT_PIPELINE_ID
job: version
' >> generated-config.yml
echo "
environment:
name: $ENVIRONMENT
" >> generated-config.yml

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#move files to output
mkdir $CI_PROJECT_DIR/output
for i in $(echo $PROJECT_NAME | tr ";" "\n");
do mkdir $CI_PROJECT_DIR/output/$i;
cp -r $CI_PROJECT_DIR/$i $CI_PROJECT_DIR/output/;
done

View File

@@ -0,0 +1,12 @@
Install-Module -Name powershell-yaml -Confirm:$false -Force
$template = (Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'= $ENV:GITLAB_TOKEN } -Uri "https://gitlab.com/api/v4/projects/45028985/repository/files/durpapi%2FChart.yaml/raw?ref=main") | ConvertFrom-Yaml
$template.version = $ENV:VERSION
$body = @{
branch = "main"
commit_message = "Update Chart"
content = "$($template | convertto-yaml)"
} | ConvertTo-Json
Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'= $ENV:GITLAB_TOKEN } -ContentType "application/json" -Method Put -body $body -Uri "https://gitlab.com/api/v4/projects/45028985/repository/files/durpapi%2FChart.yaml"

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
pwsh -c "Install-Module -Name powershell-yaml -Confirm:\$false -Force
\$template = (Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'= \$ENV:GITLAB_TOKEN } -Uri \"https://gitlab.com/api/v4/projects/45028985/repository/files/durpapi%2FChart.yaml/raw?ref=main\") | ConvertFrom-Yaml
\$template.version = \$ENV:VERSION
\$body = @{
branch = \"main\"
commit_message = \"Update Chart\"
content = \"\$(\$template | convertto-yaml)\"
} | ConvertTo-Json
Invoke-RestMethod -Headers @{ 'PRIVATE-TOKEN'= \$ENV:GITLAB_TOKEN } -ContentType \"application/json\" -Method Put -body \$body -Uri \"https://gitlab.com/api/v4/projects/45028985/repository/files/durpapi%2FChart.yaml\""

View File

@@ -1,13 +0,0 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Build golang api
export GOPATH=/go
export PATH=$PATH:$GOPATH/bin
mkdir output
go install
go install github.com/swaggo/swag/cmd/swag@v1.8.12
swag init
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ./output/main .

19
scripts/golang-build.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Build golang project
export GOPATH=/go
export PATH=$PATH:$GOPATH/bin
mkdir output
#go install
go mod download
# Check if go.mod contains "swag"
if grep -q "swag" go.mod; then
echo "Found 'swag' in go.mod. Running swag init..."
go install github.com/swaggo/swag/cmd/swag@latest
swag init --parseDependency
fi
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ./output/main .

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#run linter
golangci-lint run ./... --timeout 5m0s
golangci-lint run ./... --timeout 5m0s

5
scripts/helm-login.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Helm login
helm registry login ${CI_REGISTRY} -u gitlab-ci-token -p ${CI_JOB_TOKEN}

7
scripts/nuget/push.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Nuget Push
dotnet nuget add source "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/nuget/index.json" --name gitlab --username gitlab-ci-token --password $CI_JOB_TOKEN --store-password-in-clear-text
for i in $(echo $PROJECT_NAME | tr ";" "\n");
do dotnet nuget push "${CI_PROJECT_DIR}/packages/$i.$VERSION.nupkg" --source gitlab;
done

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Octopus Create Release
dotnet /octo/octo.dll create-release --project=$OCTO_PROJECT_NAME --releaseNumber=$VERSION --server=https://octopus.internal.durp.info/ --apiKey=$OCTOAPI --packagesFolder=$CI_PROJECT_DIR/packages --gitRef main

10
scripts/octopus/pack.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Package with octopus
mkdir $CI_PROJECT_DIR/packages
for dir in ./output/*/;
do dir=${dir%*/};
dir=${dir##*/};
dotnet /octo/octo.dll pack --id=$dir --version=$VERSION --outFolder=$CI_PROJECT_DIR/packages --basePath=$CI_PROJECT_DIR/output/$dir;
done

View File

@@ -2,7 +2,24 @@
#%%MULTILINE_YAML_START
# render job-templates.yml from job-templates.tpl.yml
set -euo pipefail
for script in scripts/*.sh; do
for pwsh in $(find ./scripts -name '*.ps1'); do
script=$(cat $pwsh)
sh_file="${pwsh%.ps1}.sh"
# Escape double quotes and dollar signs
script="${script//\"/\\\"}"
script="${script//\$/\\\$}"
pwsh_command="pwsh -c \"$script\""
echo '#!/usr/bin/env bash' > "$sh_file"
echo '#%%MULTILINE_YAML_START' >> "$sh_file"
echo "$pwsh_command" >> "$sh_file"
done
for script in $(find ./scripts -name '*.sh'); do
awk -v script_name="$(basename "$script")" '
NR==1 && /^#!/ {printf("# Begin of %s\n",script_name); next} # strip shebang in first line, print head comment
/^\s*$/ {next} # strip any newlines or whitespace

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Syft install
nix-env -iA nixpkgs.grype

9
scripts/scanner/grype.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#grype scan sboms
for i in syft/*.sbom.json;
do filename=${i%*.sbom.json};
filename=${filename##/};
grype $i -o json --file $filename.cve.json;
done

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Syft scan for docker
for i in packages/*.tar.gz;
do filename=${i%.*.*.*.tar.gz};
filename="$(basename -- "$filename")"
syft $i -o cyclonedx-json=syft/$filename.docker.sbom.json;
done

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Syft scan for go
if [ -f "go.mod" ]; then
syft go.mod -o cyclonedx-json=syft/${CI_PROJECT_NAME}.sbom.json
fi

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Syft install
nix-env -iA nixpkgs.syft

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#mkdir for syft files
mkdir $CI_PROJECT_DIR/syft

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Terraform validate
tofu apply -auto-approve $ARGUMENTS

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Terraform validate
tofu destroy -auto-approve $ARGUMENTS

4
scripts/terraform/fmt.sh Normal file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Terraform fmt
tofu fmt -diff -check -write=false

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Terraform init
tofu init -reconfigure -backend-config="address=${GITLAB_TF_ADDRESS}" -backend-config="lock_address=${GITLAB_TF_ADDRESS}/lock" -backend-config="unlock_address=${GITLAB_TF_ADDRESS}/lock" -backend-config="username=gitlab-ci-token" -backend-config="password=${CI_JOB_TOKEN}" -backend-config="lock_method=POST" -backend-config="unlock_method=DELETE" -backend-config="retry_wait_min=5"

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Terraform plan
apk add --update curl jq
alias convert_report="jq -r '([.resource_changes[].change.actions?]|flatten)|{\"create\":(map(select(.==\"create\"))|length),\"update\":(map(select(.==\"update\"))|length),\"delete\":(map(select(.==\"delete\"))|length)}'"
tofu plan -out=$PLAN $ARGUMENTS
tofu show --json $PLAN | jq -r '([.resource_changes[].change.actions?]|flatten)|{"create":(map(select(.=="create"))|length),"update":(map(select(.=="update"))|length),"delete":(map(select(.=="delete"))|length)}' > $JSON_PLAN_FILE

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
#%%MULTILINE_YAML_START
#Terraform validate
tofu validate

View File

@@ -0,0 +1,21 @@
.generate_sbom:
image: registry.internal.durp.info/nixos/nix:latest
script:
- ./scripts/scanner/syft-install.sh
- ./scripts/scanner/syft-mkdir.sh
- ./scripts/scanner/syft-go.sh
- ./scripts/scanner/syft-docker.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/syft
.generate_cve:
image: registry.internal.durp.info/nixos/nix:latest
script:
- ./scripts/scanner/grype-install.sh
- ./scripts/scanner/grype.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/syft

View File

@@ -1,5 +1,5 @@
.docker-build-container:
image: registry.durp.info/docker:20.10.17
image: registry.internal.durp.info/docker:20.10.17
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
@@ -10,4 +10,34 @@
script:
- ./scripts/docker-login.sh
- ./scripts/docker-build.sh
.docker_build:
image: registry.internal.durp.info/docker:20.10.17
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: tcp://127.0.0.1:2375/
services:
- name: docker:dind
entrypoint: ["dockerd-entrypoint.sh", "--tls=false"]
script:
- ./scripts/checkvariable/version.sh
- ./scripts/docker/build.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/packages
.docker_push_gitlab:
image: registry.internal.durp.info/docker:20.10.17
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: tcp://127.0.0.1:2375/
services:
- name: docker:dind
entrypoint: ["dockerd-entrypoint.sh", "--tls=false"]
script:
- ./scripts/docker/login.sh
- ./scripts/docker/push-gitlab.sh

35
templates/gitlab.tpl.yml Normal file
View File

@@ -0,0 +1,35 @@
.gitlab-move-files:
image: registry.internal.durp.info/debian:latest
script:
- ./scripts/gitlab/movefiles.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/output
.gitlab-deploy:
stage: deploy
image: mcr.microsoft.com/powershell:latest
script:
- ./scripts/gitlab/update-chart.sh
environment:
name: production
url: https://api.durp.info/goapi
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ '/^release/'
when: manual
needs:
- job: version
artifacts: true
.generate-config:
stage: build
needs:
- job: version
artifacts: true
script:
- ./scripts/gitlab/create-environment.sh
artifacts:
expire_in: never
paths:
- generated-config.yml

View File

@@ -1,9 +1,9 @@
.golang-build-api:
.golang-build:
variables:
GOPROXY: https://nexus.durp.info/repository/go/
image: registry.durp.info/golang:1.20
#GOPROXY: https://nexus.durp.info/repository/go/
image: registry.internal.durp.info/golang:${GO_VERSION}
script:
- ./scripts/golang-build-api.sh
- ./scripts/golang-build.sh
artifacts:
expire_in: 1 hour
paths:
@@ -11,7 +11,8 @@
.golang-lint:
variables:
GOPROXY: https://nexus.durp.info/repository/go/
image: registry.durp.info/golangci/golangci-lint:latest
#GOPROXY: https://nexus.durp.info/repository/go/
CGO_ENABLED: 0
image: registry.internal.durp.info/golangci/golangci-lint:${GOLANGCI_LINT_VERISON}
script:
- ./scripts/golang-lint.sh
- ./scripts/golang-lint.sh

View File

@@ -1,6 +1,14 @@
.helm-createchart:
image: registry.durp.info/dtzar/helm-kubectl
.helm-build:
image: registry.internal.durp.info/dtzar/helm-kubectl
script:
- ./scripts/helm-package.sh
artifacts:
expire_in: 1 hour
paths:
- $CI_PROJECT_DIR/packages
.helm-push:
image: registry.internal.durp.info/dtzar/helm-kubectl
script:
- ./scripts/helm-addrepo.sh
- ./scripts/helm-package.sh
- ./scripts/helm-push.sh

4
templates/nuget.tpl.yml Normal file
View File

@@ -0,0 +1,4 @@
.nuget_push:
image: registry.internal.durp.info/dotnet/core/sdk:latest
script:
- ./scripts/nuget/push.sh

12
templates/octopus.tpl.yml Normal file
View File

@@ -0,0 +1,12 @@
.octo_package:
image: registry.internal.durp.info/octopusdeploy/octo:latest
script:
- ./scripts/octopus/pack.sh
artifacts:
paths:
- $CI_PROJECT_DIR/packages
.octo_release:
image: registry.internal.durp.info/octopusdeploy/octo:latest
script:
- ./scripts/octopus/create_release.sh

View File

@@ -3,7 +3,7 @@
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
image:
name: registry.durp.info/sonarsource/sonar-scanner-cli:latest
name: registry.internal.durp.info/sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
cache:
key: "${CI_JOB_NAME}"

View File

@@ -0,0 +1,35 @@
.terraform_fmt:
script:
- ./scripts/cd-workdir.sh
- ./scripts/terraform/fmt.sh
.terraform_validate:
script:
- ./scripts/cd-workdir.sh
- ./scripts/terraform/init.sh
- ./scripts/terraform/validate.sh
.terraform_plan:
variables:
PLAN: plan.tfplan
JSON_PLAN_FILE: tfplan.json
script:
- ./scripts/cd-workdir.sh
- ./scripts/terraform/init.sh
- ./scripts/terraform/plan.sh
artifacts:
reports:
terraform: $WORKDIR/$JSON_PLAN_FILE
.terraform_apply:
script:
- ./scripts/cd-workdir.sh
- ./scripts/terraform/init.sh
- ./scripts/terraform/apply.sh
.terraform_destroy:
script:
- ./scripts/cd-workdir.sh
- ./scripts/terraform/init.sh
- ./scripts/terraform/destroy.sh

View File

@@ -1,9 +1,10 @@
.version:
image: registry.durp.info/gittools/gitversion:5.12.0
image: registry.internal.durp.info/gittools/gitversion:5.12.0
variables:
GIT_DEPTH: "0"
script:
- ./scripts/version-number.sh
- ./scripts/gitversion/version.sh
artifacts:
expire_in: never
reports:
dotenv: version.env