Conditional artifacts in Cloud Build

513 views
Skip to first unread message

Bruce

unread,
Nov 18, 2020, 5:44:58 PM11/18/20
to Google Cloud Developers
My workflow involves a CI run on all non-master branches and a CD run on master. Ideally, these are the same except for the actual saving of artifacts.

It would be nice to have only one cloudbuild.yaml file that describes how to build, test, and save artifacts, and configure whether or not to perform the save operation when creating the trigger. So the single YAML could look like:

substitutions:
    _A: B ...
steps:
    - docker build
    - maybe something else ...
images:

And with that one file Cloud Build will only save the file if the steps are successful _and_ the trigger is configured to perform the save.

I see other tight coupling issues with Cloud Build, but this seems like it might be the lowest hanging fruit in reducing unwanted coupling.

Thanks,
- Bruce

George (Cloud Platform Support)

unread,
Nov 19, 2020, 11:31:27 AM11/19/20
to Google Cloud Developers
Hello Bruce, 

Your feature request is now published in the Public Issue Tracker as Conditional artifacts in Cloud Build cloudbuild.yaml. You may follow developments and eventual implementation in that thread. 
Reply all
Reply to author
Forward
0 new messages