Git Product home page Git Product logo

Comments (3)

cedrelek avatar cedrelek commented on July 28, 2024 1

If I understand your request, your pb is that you get a $REPO_NAME like :
github-my-organisation-user-service and you would like $REPO_NAME to equals user-service.

This name is generated when you create a build trigger. But you can choose the name you want if you create the repository by your own.

1 - create a repository in the google console (Menu "Source repositories" -> "Repositories" -> "Create repository"), you choose the name of the repository (like user-service) and select the github repository you want.
2 - Create the build trigger using the repository you've just created.
3 - The $REPO_NAME should have the user-servicevalue.

from cloud-builders.

bendory avatar bendory commented on July 28, 2024

This GitHub issue tracker is intended for bugs with the officially supported builder images specifically.
Please report issues and feature requests regarding the GCB service to our public issue tracker at
https://issuetracker.google.com/issues/new?component=190802&template=1162743

from cloud-builders.

car409 avatar car409 commented on July 28, 2024

$REPO_NAME substitution is misleading as you expect to only get repository name instead of the more verbose {SOURCE}-{ORG}-{REPOSITORY} (eg: github-my-org-hello-world-repo)

maybe a $REPO_SHORTNAME could be added ?

It sounds like you have a reposync (mirroring) trigger. Google Cloud Build does support Bash parameter expansion. You should be able to get what you need using that. See: https://cloud.google.com/build/docs/configuring-builds/use-bash-and-bindings-in-substitutions#bash_parameter_expansions

In the case above, just create a new user defined substitution like:
$_REPO_SHORTNAME --> ${REPO_NAME/#github-my-org-}

should remove the prefix"github-my-org-" from the repo name.

from cloud-builders.

Related Issues (20)

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.