Files
site-publish/scripts/__pycache__/deploy.cpython-314.pyc
T

55 lines
8.0 KiB
Plaintext
Raw Normal View History

+
PWûiãóôRt^RIt^RIt^RIt^RIt^RIHt^RIHtH t ^RI
H t H t ^RI
HtHtHtHtHtHtHtHtHtHtHt]P2P5RR4tRtR tRR
ltR tR t R
t!Rt"Rt#R#)u>Deploy phase — S3 sync, manifest rendering, alias reconcile.N)ÚPath)Ú HTTPErrorÚURLError)ÚRequestÚurlopen) ÚDEFAULT_S3_ENDPOINTÚ
GITEA_HOSTÚ NAMESPACEÚ
clone_appsÚcommit_and_pushÚdieÚenvÚk8s_nameÚparse_site_yamlÚrender_templatesÚrunÚGARAGE_ADMIN_ENDPOINTzhttp://garage.storage.svc:3903z"public, max-age=0, must-revalidatec óÒ\PPR\4pVR, R, pVP 4'g\ RV R24\
R4\
R4\PPRR4\R V R
V R V 24\R V R
V RV R\ R2 4\R4\R V RV RV R\ R2 4R#)ÚGARAGE_S3_ENDPOINTÚbuildÚhtmlu2build/html not found — did the build step run? (ÚAWS_ACCESS_KEY_IDÚAWS_SECRET_ACCESS_KEYÚAWS_DEFAULT_REGIONÚsjc001zSyncing u
→ s3://z via zaws --endpoint-url z s3 sync z/ s3://z// --delete --only-show-errors --cache-control 'Ú'z&Re-stamping metadata on all objects...z s3 cp z2/ --recursive --only-show-errors --cache-control 'N) ÚosÚenvironÚgetrÚexistsr r
Ú
setdefaultÚprintrÚ
CACHE_CONTROL)Ú site_nameÚsite_dirÚendpointÚhtml_dirs&& ÚN/Users/dfritz/code/git/code.fritzlab.net/action/site-publish/scripts/deploy.pyÚs3_syncr)!Üz‰z~‰~Ð2Ô4GÓH€Hؘ! *€HØ ?‰?× Ò Ü ÐÀ
È!Ð ÐÔÜÐÔ Ü‡JÑÐÔ ˆHXJ˜j¨¨ °5¸¸
Ð
Ø
˜h˜Z °
¸'À)ÀðMä)˜?¨!ðô

Ð
Ø
˜h˜Z w¨x¨j¸À ¸Kä)˜?¨!ðócóh\ V 2pVe%\P!V4P4MRpRRV 2/pVeRVR&\ WEWR7p\ V4;_uu_4pVP
4p V 'd\P!V 4M/uuRRR4# +'giR#;i)
AuthorizationzBearer zapplication/jsonz Content-Type)ÚdataÚmethodÚheaders)rÚjsonÚdumpsÚencoderrÚreadÚloads)
r.ÚpathÚtokenÚbodyÚurlr-r/ÚreqÚrespÚraws
&&&& r(Ú garage_adminr<>sÜ
# D 
*€CØ(,Ò(8Œ4:Š: × $¸d€DØ '¨%¨Ð 1Ð2€GØ ÒØ"4ˆÑÜ
Ô
A€CÜ Œ˜Øi‰ikˆß"%ŒtzŠz˜¨2÷
ús Á%0B Â B1 c
óŽV'gR#V'g\R4R#\RRV 2V4pTP R4p\ TP R4;'g.4p\RT R TR
, R \
T4 24TF,pYv9dK \R T 24\R
RTRTRT/4K. R# \\3dp\RT 24Rp?R#Rp?ii;i \dOp\TR4'd!TP4PRR7MRp\RT RT RT 24hRp?ii;i)u¿Add cfg['aliases'] as Garage globalAliases on the site bucket.
Idempotent: skips aliases already present. Never removes aliases not in
the desired set (safety — orphan removal is manual).
Nu= (no GARAGE_ADMIN_TOKEN — skipping bucket alias reconcile)ÚGETz/v2/GetBucketInfo?globalAlias=z! WARNING: bucket lookup failed: ÚidÚ
globalAliasesz Bucket z (:Né Nu…) currently aliases: z Adding globalAlias: ÚPOSTz/v2/AddBucketAliasÚbucketIdÚ globalAliasr3Úreplace)ÚerrorsÚz ERROR adding alias z: Ú )
r"r<rrrÚsetÚsortedÚhasattrr3Údecode) r$ÚaliasesÚ admin_tokenÚinfoÚeÚ bucket_idÚexistingÚaliasr7s &&& r(Úensure_bucket_aliasesrTJsL÷ Ùß Ü
ÐðܘEÐ%CÀIÀ;Ð#OØð ˜€IÜ4—8‘8˜OÓÓ3€HÜ ˆIi[  9¨S¥>Ð"2Ð2JÌ6ÐRZÓK[ÐJ\Ð
ˆØ Ô Ù Ü
Ð& u  Ü ˜Ð!5°{Ø$ i°ÀÐ
Hó øô
”xÐ ôÜ
Ð1°!°Ðûðûôô Ü8?ÀÀ6×8JÒ8J1—66“8—??¨)4ÐPRˆDÜ Ð)¨%¨°°1°#°Q°t°fÐ ûð ús0¡B>Â&C+Â>C(ÃC#Ã#C(Ã+ EÃ6A D?Ä?Ec
ó’VPRRR7RVR\V4RVR,RVR,R\/p\WW#4R#) z}Always re-render manifests from current site.yaml. Templates own
domain + aliases, so changes propagate without manual edits.T)ÚparentsÚexist_okÚsiteÚsite_k8sÚdomainrMÚ namespaceN)Úmkdirrr r)r$Ú
action_dirÚapp_dirÚ
manifests_dirÚcfgÚ
template_varss&&&&& r(Úrender_site_manifestsrbnsPð×Ñ ¨tÐÔ Ø”H˜#h•-Ø3y•>Ø”Yð €MôÖGr*có