circle: merge default and router services, deploy together, drop --no-cache

it's been a while, the Google people closed my GCP Build caching bug as obsolete, let's see if it's actually fixed

https://issuetracker.google.com/issues/146780347
https://issuetracker.google.com/issues/347268867
pull/1486/head
Ryan Barrett 2024-11-14 12:19:24 -08:00
rodzic 7a280d1c56
commit 9ce4e5f393
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
1 zmienionych plików z 5 dodań i 18 usunięć

Wyświetl plik

@ -6,19 +6,10 @@
# https://circleci.com/docs/2.1/sample-config/
version: 2.1
# I could get rid of "default" with eg pipeline.trigger_source, if it
# distinguished manual from push, but I can't tell that it does.
# https://circleci.com/docs/pipeline-variables/#pipeline-values
#
# pipeline.trigger_parameters.circleci.trigger_type looks promising!
# https://stackoverflow.com/questions/75616644/how-to-detect-whether-a-circleci-pipeline-build-was-manually-triggered#comment133409450_75616644
#
# ...but it's only available to GitHub App logins, and I'm on Github OAuth :(
# https://circleci.com/docs/github-integration/
parameters:
service:
type: enum
enum: ["app", "router", "atproto_hub", "default"]
enum: ["atproto_hub", "default"]
default: "default"
jobs:
@ -88,15 +79,11 @@ jobs:
service='<< pipeline.parameters.service >>'
if [[ $service == 'default' ]]; then
service='app'
services='app.yaml router.yaml'
else
services='atproto_hub.yaml'
fi
# Flex services don't support --no-cache, but we need it
# for the default service.
# https://issuetracker.google.com/issues/347268867
if [[ $service == 'app' ]]; then
nocache='--no-cache'
fi
gcloud -q app deploy $nocache --project bridgy-federated index.yaml queue.yaml ${service}.yaml
gcloud -q app deploy --project bridgy-federated index.yaml queue.yaml ${services}
fi
- save_cache: