1-
21.service-rust-base :
32 image : ${RUST_IMAGE}
43 stage : check
4+ cache :
5+ key : ${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}
6+ fallback_keys :
7+ - ${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}
8+ - ${CI_JOB_NAME}
9+ paths :
10+ - .cargo/registry/index/
11+ - .cargo/registry/cache/
12+ - .cargo/git/db/
13+ - target/
514
615.service-format-check :
716 extends : .service-rust-base
2029 script :
2130 - cargo test --package ${SERVICE_NAME}
2231
23- .service-build :
24- extends : .service-rust-base
25- stage : build
26- script :
27- - cargo build --release --package ${SERVICE_NAME}
28- artifacts :
29- paths :
30- - target/release/${SERVICE_NAME}
31- expire_in : 1 week
32-
3332.service-image :
3433 image :
3534 name : moby/buildkit:rootless
36- entrypoint : ['' ]
35+ entrypoint : ["" ]
3736 before_script :
3837 - mkdir -p ~/.docker
3938 - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > ~/.docker/config.json
4443 --frontend dockerfile.v0 \
4544 --local context=. \
4645 --local dockerfile=./services/${SERVICE_DIR} \
47- --import-cache type=registry,ref=$CI_REGISTRY_IMAGE/${SERVICE_NAME}:$CI_COMMIT_SHA-cache \
48- --export-cache type=registry,ref=$CI_REGISTRY_IMAGE/${SERVICE_NAME}:$CI_COMMIT_SHA-cache,mode=max \
46+ --import-cache type=registry,ref=$CI_REGISTRY_IMAGE/${SERVICE_NAME}:cache-$CI_DEFAULT_BRANCH \
47+ --import-cache type=registry,ref=$CI_REGISTRY_IMAGE/${SERVICE_NAME}:cache-$CI_COMMIT_REF_SLUG \
48+ --export-cache type=registry,ref=$CI_REGISTRY_IMAGE/${SERVICE_NAME}:cache-$CI_COMMIT_REF_SLUG,mode=max \
4949 --output type=image,name=$CI_REGISTRY_IMAGE/${SERVICE_NAME}:$CI_COMMIT_SHA,push=true
5050
5151# #######################################################################
@@ -90,11 +90,6 @@ server-clippy:
9090 - .server-workflow
9191 - .service-clippy
9292
93- server-build :
94- extends :
95- - .server-workflow
96- - .service-build
97-
9893server-image :
9994 extends :
10095 - .server-workflow
@@ -145,11 +140,6 @@ moderation-clippy:
145140 - .moderation-workflow
146141 - .service-clippy
147142
148- moderation-build :
149- extends :
150- - .moderation-workflow
151- - .service-build
152-
153143moderation-image :
154144 extends :
155145 - .moderation-workflow
@@ -162,56 +152,51 @@ moderation-image:
162152# notifications
163153# #######################################################################
164154
165- .notifications-workflow :
155+ .push- notifications-workflow :
166156 image : gitlab.futo.org:5050/devops/manifest-repo/library/docker:latest
167157 rules :
168- - if : $CI_COMMIT_TAG =~ /^notifications-/
158+ - if : $CI_COMMIT_TAG =~ /^push- notifications-/
169159 when : always
170160 - if : $CI_PIPELINE_SOURCE == "merge_request_event"
171161 changes :
172162 - Cargo.toml
173163 - Cargo.lock
174- - services/notifications/**/*
164+ - services/push- notifications/**/*
175165 - services/common/**/*
176166 - .gitlab/ci/build_services.yml
177167 - .gitlab/ci/deploy_services.yml
178168 - if : $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
179169 when : never
180170 - if : $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
181171 changes :
182- - services/notifications/**/*
172+ - services/push- notifications/**/*
183173 - services/common/**/*
184174 - .gitlab/ci/build_services.yml
185175 - .gitlab/ci/deploy_services.yml
186176 variables :
187177 RUNNER_SCRIPT_TIMEOUT : 179m
188- SERVICE_NAME : notifications-service
189- SERVICE_DIR : notifications
178+ SERVICE_NAME : push- notifications-service
179+ SERVICE_DIR : push- notifications
190180
191- notifications-format-check :
181+ push- notifications-format-check :
192182 extends :
193- - .notifications-workflow
183+ - .push- notifications-workflow
194184 - .service-format-check
195185
196- notifications-clippy :
186+ push- notifications-clippy :
197187 extends :
198- - .notifications-workflow
188+ - .push- notifications-workflow
199189 - .service-clippy
200190
201- notifications-test :
191+ push- notifications-test :
202192 extends :
203- - .notifications-workflow
193+ - .push- notifications-workflow
204194 - .service-test
205195
206- notifications-build :
207- extends :
208- - .notifications-workflow
209- - .service-build
210-
211- notifications-image :
196+ push-notifications-image :
212197 extends :
213- - .notifications-workflow
198+ - .push- notifications-workflow
214199 - .service-image
215200 rules :
216- - !reference [.notifications-workflow, rules]
201+ - !reference [.push- notifications-workflow, rules]
217202 - !reference [.release-workflow, rules]
0 commit comments