>>> Can i specify a different staging bucket to use when deploying 
appengine apps?<<<

I think so (haven't tried it myself & so can't confirm it works). The 
documentation 
<https://cloud.google.com/sdk/gcloud/reference/app/deploy#--bucket> has a 
flag *--bucket* which it describes as .....*The Google Cloud Storage bucket 
used to stage files associated with the deployment. If this argument is not 
specified, the application's default code bucket is used*. 


*.....* NoCommandLine *......*
 https://nocommandline.com

*A GUI for Google App Engine*

On Tuesday, October 19, 2021 at 5:17:16 PM UTC-7 ntibr...@gmail.com wrote:

> I figured out the issue. The 2 cloudbuild triggers both use the same "
> staging.project_id.appspot.com" bucket. So when the staging service is 
> deployed, newly updated files are uploaded. But when the production service 
> is deployed, the file hasn't changed compared to what's currently in the 
> staging bucket, so the upload is skipped.
>
> So a few questions:
> 1) Can i specify a different staging bucket to use when deploying 
> appengine apps?
> 2) Is there a step I can add to the cloudbuild that "touches" all files 
> and hence uploads all of them? (this is not ideal though because it 
> increases build time unnecessarily)
> 3) If i can't specify a staging bucket, do I have to use 2 buckets, one 
> per service?
>
> Best,
> Nikhil
>
> On Tuesday, October 19, 2021 at 12:58:47 AM UTC-4 Nikhil Tibrewal wrote:
>
>>
>> Hi,
>>
>> I have an AppEngine project deployed through CloudBuild. For some reason, 
>> one of the files in the directory (a .json file) isn't getting uploaded in 
>> incremental upload.
>>
>> Setup:
>> I'm using cloudbuild to deploy my app. Relevant steps are:
>>
>> # List files in the directory for convenience purposes.
>> - name: 'gcr.io/cloud-builders/gcloud'
>> entrypoint: 'bash'
>> args: ['-c', 'ls -al /workspace']
>>
>> # Upload source files to GCS staging bucket, build images and upload to 
>> GCR, promote new version.
>> - name: 'gcr.io/cloud-builders/gcloud'
>> args: ['app', 'deploy', 'app_${_ENV}.yaml', '--verbosity=debug', 
>> '--promote']
>>
>>
>>    1. I can see the file in the "ls -al" step
>>    2. My setup has 2 triggers: one deploys to staging env, and one 
>>    deploys to production. Both triggers are connected to my github repo. All 
>>    pushes to staging branch trigger the staging deploy step, and that has 
>> the 
>>    file in incremental uploads. However, merges of that code into production 
>>    branch don't end up including that file in the deploy to production 
>> trigger.
>>    3. I even tried to push a commit with just a single change to the 
>>    JSON file. Staging trigger included it in incremental uploads, production 
>>    did not (even though production was triggered by merging the same staging 
>>    PR into production branch)
>>    4. The json file is even listed in the included files filter to 
>>    ensure changes to that file trigger the builds. It is not listed in 
>>    excluded files filter. 
>>    
>> What could be happening here that's skipping the file in one trigger, but 
>> not the other? They're being pushed exactly the same code, so why is one 
>> build not recognizing the difference?
>>
>> Thanks so much in advance.
>> Nikhil
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/b7067eb1-59cf-4030-9ce5-ece9b43b4867n%40googlegroups.com.

Reply via email to