Google Cloud Build 教學 (一) — 透過本地端完成 GCP Cloud Build 服務 | by 楊承翰 | Medium
gcloud builds submit | Google Cloud CLI Documentation
選擇本地打包放上去CONTAINER REGISTRY才丟到Cloud Run的原因就是因為我沒搞定金鑰如何放在環境變數裡,
問題來了,為什麼我需要使用這個金鑰呢?好像是因為我需要在imager裡用到google cloud?
好問題,我還是先去背誦義務役都要背的單戰好了
解決方式:
多寫一個 .gcloudignore 讓我的金鑰檔案不被忽略而沒有打包進build裡
找到的問題點:
打包部署時遇到下列說明(奇怪為什麼之前沒這個問題)
Creating temporary tarball archive of 7 file(s) totalling 24.0 KiB before compression.
Some files were not included in the source upload.
文檔中有寫清楚,如果打包時檔案沒有 .gcloudignore,就會使用 .gitignore
作為打包時處理要忽略的檔案
SOURCE
]--ignore-file
. If --ignore-file
is not specified, use.gcloudignore
file. If a .gcloudignore
file is absent and a .gitignore
file is present in the local source directory, gcloud will use a generated Git-compatible .gcloudignore
file that respects your .gitignored files. The global .gitignore
is not respected. For more information on .gcloudignore
, see gcloud topic gcloudignore
.
沒有留言:
張貼留言