features requests | C2C Community
Solved

features requests

  • 10 September 2022
  • 5 replies
  • 40 views

Userlevel 2

Hello everyone, is there a channel, group, or thread, whether in this community or elsewhere, where you can make features requests to the GCP ?

I’ve been playing with Cloud Run, which is really a cool service, but I’ve noticed that the `SET UP CONTINUOUS DEPLOYMENT` subsequent form does not allow to look for a Dockerfile that is not in the root of the repo while having the root folder as the build context (as you would do with in a docker-compose file by specifying the context);

this prompted me to do something quite ackward, which is creating the same Dockerfile at the root of my project instead of just referencing it from the GCP UI; both files are exactly the same, and it terms of maintenance, this is not great

 

Is there a way to keep a nested Dockerfile as the one which the build will be made from without having to copy the exact same file at root just because of build context ? Does it worth a feature request, if such a channel existed ?

 

Thanks 🙏

icon

Best answer by malamin 11 September 2022, 02:49

View original

5 replies

Userlevel 7
Badge +35

Hi @yactouat ,

Thank you for your question. Have you used the custom step builder or sub builder for cloud builds? If you haven't already, go to the following list of specific points based on the question scenario.

I think it might help you.

# Include cloudbuild sub step
- name: 'gcr.io/cloud-builders/gcloud'
args:
- 'builds'
- 'submit'
- '.'
- '--config'
- 'cloudbuild.yaml'

 

Here is a cloudbuild.meta.yaml building off of your example:

steps:
- id: 'build service1'
name: 'gcr.io/cloud-builders/gcloud'
args: ['builds', 'submit', '--config service1/cloudbuild.yaml']
waitFor: ['-'] #start in parallel
- id: 'build service2'
name: 'gcr.io/cloud-builders/gcloud'
args: ['builds', 'submit', '--config service2/cloudbuild.yaml']
waitFor: ['-'] # start in parallel
Or you can check the reference link below. 

https://cloud.google.com/build/docs/build-config-file-schema#build_steps

https://stackoverflow.com/questions/56821883/google-cloud-build-sub-builds

https://cloud.google.com/build/docs/configuring-builds/use-community-and-custom-builders

https://github.com/GoogleCloudPlatform/cloud-builders/issues/435

https://stackoverflow.com/questions/68303511/google-cloud-build-how-to-send-context-with-different-path-to-docker-build

 

 

Userlevel 2

Thanks @malamin , I did not know where to look exactly, this is really helpful !

Userlevel 7
Badge +35

You're welcome @yactouat  with best wishes.

Userlevel 7
Badge +65

WOW

Great answer @malamin! Glad that you are here with us 😀

Hi @yactouat, I’m glad to know that your questioned was answered by one of our moderators!

Userlevel 7
Badge +35

Also, I'm grateful to be here and participate in activities with such a fantastic and charismatic team, as well as to receive your support and inspiration, @ilias .

Reply