Giter VIP home page Giter VIP logo

cloud-build-samples's Introduction

code-examples

This repository contains code examples used in the official Cloud Build documentation.

Contributing changes

New samples

  • New samples are accepted at reviewer discretion.
  • New samples should come with a README either linking to documentation or explaining how to use the sample directly. If the README is excessively long, the instructions should be moved to a tutorial and linked from the README.
  • The configuration file (e.g. cloudbuild.yaml) should be able to run as part of automated testing. This means that in general, the file should contain substitutions rather than dummy values that the user has to manually replace. Some exceptions to this rule may be allowed with sufficient justification.
  • Sample should be readable. Use clear comments, descriptive variable names, and try to avoid excessively long lines.

Bug Fixes

  • Bug fixes are welcome, either as pull requests or as GitHub issues.

See CONTRIBUTING.md for details on how to contribute.

cloud-build-samples's People

Contributors

agmsb avatar averikitsch avatar dinagraves avatar geriom avatar glasnt avatar google-cloud-policy-bot[bot] avatar jackwotherspoon avatar jsimonweb avatar jstemmer avatar justinbeckwith avatar mukamik avatar nataleecodes avatar navierula avatar nityaravi avatar oflisback avatar pattishin avatar psimakov avatar rafikk avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-build-samples's Issues

Error for python-example-flask when tried with cloudbuild.yaml

Step #2: Already have image (with digest): gcr.io/cloud-builders/docker
Step #2: invalid argument "us-central1-docker.pkg.dev/devops-bioenable//myimage:67dabfb" for "-t, --tag" flag: invalid reference format
Step #2: See 'docker build --help'.
Finished Step #2
ERROR
ERROR: build step 2 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 125

[Policy Bot] found one or more issues with this repository.

Policy Bot found one or more issues with this repository.

  • Default branch is 'main'
  • Branch protection is enabled
  • Renovate bot is enabled
  • Merge commits disabled
  • There is a CODEOWNERS file
  • There is a valid LICENSE.md
  • There is a CODE_OF_CONDUCT.md
  • There is a CONTRIBUTING.md
  • There is a SECURITY.md

Security Policy violation Binary Artifacts

This issue was automatically created by Allstar.

Security Policy Violation
Project is out of compliance with Binary Artifacts policy: binaries present in source code

Rule Description
Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.

Remediation Steps
To remediate, remove the generated executable artifacts from the repository.

Artifacts Found

  • maven-example/.mvn/wrapper/maven-wrapper.jar

Additional Information
This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.


Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar

This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update dependency chai to v5.1.1
  • chore(deps): update dependency pytest to v8.2.1
  • chore(deps): update plugin io.spring.dependency-management to v1.1.5

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

  • chore(deps): update spring boot to v3.2.5 (org.springframework.boot:spring-boot-maven-plugin, org.springframework.boot:spring-boot-starter-parent, org.springframework.boot)

Detected dependencies

cloudbuild
basic-config/cloudbuild.yaml
deploy-firebase-example/cloudbuild.yaml
golang-sample/cloudbuild.yaml
  • golang 1.22
gradle-example/cloudbuild.yaml
  • gradle 8-jdk17
  • gradle 8-jdk17
maven-example-noncontainer/cloudbuild.yaml
  • maven 3-eclipse-temurin-17-alpine
  • maven 3-eclipse-temurin-17-alpine
maven-example/cloudbuild.yaml
  • maven 3-eclipse-temurin-17-alpine
  • maven 3-eclipse-temurin-17-alpine
multiple-node-versions-example/cloudbuild.yaml
node-example-npm/cloudbuild.yaml
node-example-yarn/cloudbuild.yaml
private-pool/cloudbuild.yaml
python-example-flask/cloudbuild.yaml
python-example-noncontainer-artifacts/cloudbuild.yaml
quickstart-automate/cloudbuild.yaml
quickstart-build/cloudbuild.yaml
quickstart-deploy/cloudbuild.yaml
run-example-builddeploy/cloudbuild.yaml
scan-build-example/cloudbuild.yaml
sql-private-pool/cloudbuild.yaml
sql-proxy/cloudbuild.yaml
dockerfile
basic-config/Dockerfile
golang-sample/Dockerfile
  • golang 1.20-buster
gradle-example/Dockerfile
  • openjdk 19-jdk-alpine
maven-example/Dockerfile
  • openjdk 19-jdk-alpine
python-example-flask/Dockerfile
  • python 3.12-slim
quickstart-build/Dockerfile
run-example-builddeploy/Dockerfile
  • golang 1.20-buster
scan-build-example/Dockerfile
sql-private-pool/Dockerfile
  • python 3.12-slim
sql-proxy/Dockerfile
  • python 3.12-slim
gomod
golang-sample/go.mod
  • go 1.19
run-example-builddeploy/go.mod
  • go 1.19
gradle
gradle-example/settings.gradle
gradle-example/build.gradle
  • org.springframework.boot 3.0.5
  • io.spring.dependency-management 1.1.4
maven
maven-example-noncontainer/pom.xml
  • org.springframework.boot:spring-boot-starter-parent 3.0.5
  • org.springframework.boot:spring-boot-maven-plugin 3.0.3
maven-example/pom.xml
  • org.springframework.boot:spring-boot-starter-parent 3.0.5
npm
multiple-node-versions-example/package.json
  • express ^4.17.1
  • chai 5.1.0
  • mocha 10.4.0
  • supertest 7.0.0
node-example-npm/package.json
  • express ^4.17.1
  • chai 5.1.0
  • mocha 10.4.0
  • supertest 7.0.0
node-example-yarn/package.json
  • express ^4.17.1
  • chai 5.1.0
  • mocha 10.4.0
  • supertest 7.0.0
pep621
python-example-noncontainer-artifacts/pyproject.toml
pip_requirements
python-example-flask/requirements.txt
  • Flask ==3.0.3
  • pytest ==8.2.0
sql-private-pool/requirements.txt
  • flask ==3.0.3
  • sqlalchemy ==2.0.30
  • pg8000 ==1.31.2
sql-proxy/requirements.txt
  • flask ==3.0.3
  • sqlalchemy ==2.0.30
  • pg8000 ==1.31.2
terraform
mig-blue-green/infra/main.tf

  • Check this box to trigger a request for Renovate to run again on this repository

Line breaks are removed from a secret when accessed in a Cloud Build workflow

I don't know if this is the right repo to open this issue.
I use Cloud Build to deploy my webapp to App Engine.
I'm storing the config file of the app (.env) in a Secret Manager secret.
In the workflow, the value of the secret in a file before the App Engine deploy.
The line breaks are removed, causing the app to not read correctly the config file.
The only workaround I found is to encode the secret in base64 and to decode it at build time, but this makes the process more complex...

  - id: set-env
    name: gcr.io/cloud-builders/docker
    entrypoint: bash
    args:
      - -c
      - echo $$APP_CONFIG | base64 --decode > .env
    secretEnv: ["APP_CONFIG"]

When I use the gcloud command line to get the value of the secret, the line breaks are not removed.

push command has invalid "-image" argument

The push command examples in following files include an invalid "-image" argument.

cloud-build-samples/basic-config/cloudbuild.json
cloud-build-samples/basic-config/cloudbuild.yaml

Running gcloud builds submit --config [CONFIG_FILE_PATH] with either of these files returns the error:

Step #1: unknown shorthand flag: 'i' in -image
Step #1: See 'docker push --help'.
Finished Step #1
ERROR
ERROR: build step 1 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 125

[Policy Bot] found one or more issues with this repository.

Policy Bot found one or more issues with this repository.

  • Default branch is 'main'
  • Branch protection is enabled
  • Renovate bot is enabled
  • Merge commits disabled
  • There is a CODEOWNERS file
  • There is a valid LICENSE.md
  • There is a CODE_OF_CONDUCT.md
  • There is a CONTRIBUTING.md
  • There is a SECURITY.md

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.