GoogleCloudPlatform/emblem

Modernize Cloud Build YAML with 'script' property

grayside opened this issue · 1 comments

Proposal

The current Cloud Build YAML implementation uses the "original" syntax for running shell scripts in containers, which closely matches container entrypoint configuration. Since that structure is not a natural developer experience for people that don't regularly work with containers, there is now a script property that allows something more akin to the experience of running scripts in GitHub Workflows.

Let's update the Cloud Build YAML to use that more natural pattern. This seems like a low risk change that boosts readability.

Before

 # Install test requirements
 - id: "Install Pytest"
   name: python:3.11-slim
   dir: ${_DIR}
   entrypoint: pip
   args: ["install", "-r", "requirements-test.txt", "--user"]

After

# Install test requirements
 - id: "Install Pytest"
   name: python:3.11-slim
   dir: ${_DIR}
   script: pip install -r requirements-test.txt --user

@grayside I would like to take this issue, could you assign it to me?