Git Product home page Git Product logo

gcbapp-example's Introduction

gcbapp-example's People

Contributors

navierula avatar nityaravi avatar wlynch avatar

Stargazers

 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

gcbapp-example's Issues

Possible to open source the github app source code?

We want to make a few changes to how the app integration works:

  • Ignore submitting the build altogether if this file doesn't exist.
  • Change the path of where the app looks for cloudbuild.yaml file, ignore the Dockerfile.
  • Auto trigger builds on github tags as well.

We've been using the build triggers setup on GCB, but that requires a lot of setup for every repo. The app is perfect as we can have it enabled for our entire org and any developer that wants to use it can opt in by adding the cloudbuild file. (hence the ignore if file doesn't exist)

We understand that some, if not all these requirements might be pretty specific to how we want to use GCB.

If we had access to the source code, we'd modify and host a version of the github app ourselves.
That would solve all of our use cases and maybe other people's as well who want to make minor edits for their bespoke use cases.

Question - Assistance to get build running with TAG_NAME built-in substitutions

I got an issue, that I have not been able to find a solution for.
I have installed and setup cloud build to be able to build code fetched from my private github repositories. It is working and I have created nice flows that builds dockers and push them to GCR etc.
I have now added a new build where I would like to tag my docker images with the git tag. I found that I could use the TAG_NAME built-in substitution variable to do that. But my problem is that it is never set when running the build. It seems that when fetching/pull the code from github no tags are fetched/pull.

config yaml

substitutions:
 _IMAGE_NAME: "<image_name>"
 _REGION: 'europe-west1'
steps:
- name: 'gcr.io/cloud-builders/docker'
  id: 'Build Docker Image'
  args: ['build', '-t', "eu.gcr.io/$PROJECT_ID/${_IMAGE_NAME}:${TAG_NAME}", '--build-arg', "jarversion=${TAG_NAME}", '--build-arg', 'gitsha=${SHORT_SHA}', '.']
images: 
- 'eu.gcr.io/$PROJECT_ID/${_IMAGE_NAME}:${TAG_NAME}' 

Here is the tag on my git(hub) repo. (it has been pushed to remote too).

> git describe --tags $(git rev-list --tags --max-count=1)
0.0.1

So what am I missing?

This here is the build-in substitutions for latest build, found on the execution detail tab under the failed build.

Built-in substitutions
COMMIT_SHA d96122536f520eff2bd8f829625f3e873d49b3f9
SHORT_SHA d961225
BRANCH_NAME main
REPO_NAME <repo name>
REVISION_ID d96122536f520eff2bd8f829625f3e873d49b3f9

But the TAG_NAME is not set...
Hope to hear from you soon. Thanks in advance.

Dockerfile/cloudbuild.yaml in subdirectory

Hi,

We have a number of Dockerfiles and cloudbuild.yamls in subfolders of our mono-repo and the GitHub cloudbuild check does not detect them. What can be done to remedy this?

For example:

services/api/cloudbuild.yaml
services/websocket/cloudbuild.yaml

screenshot_20180812-153307_01

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.