Comments (5)
same problem
from cloud-build-notifiers.
I think you can find all possible variables here:
https://cloud.google.com/build/docs/api/reference/rest/v1/projects.builds#resource:-build
from cloud-build-notifiers.
Thanks for the link @VuKrampHub. Does that resolve your question @scr4bble >
from cloud-build-notifiers.
I guess that partially it does. But I find the linked docs quite extensive, so I would need time to review it in order to evaluate. First thing that comes to my mind is: does the case sensitivity matter here? I see there is "build" variable in the posted URL for build resource but I see {{.Build.ProjectId}} in the slack.json file and I don't understand why is it different. It would be really great if this all is explained inside docs directly in this project (e.g. in the Readme file) - how exactly to use the variables and where to find the list of available variables (could be the linked docs if that is the source but I am not able to verify this).
from cloud-build-notifiers.
@scr4bble I indeed had the same confusion from the start. The link I shared is the possible structure of the build
object containing all available variables. When it is referred in the template file, it is as .Build
. The same with its properties, they also start with uppercase letter.
The caveat is for some it's hard to determine how to refer to them from the linked doc such as Source
property as there can be multiple inherited types. What I do in this case is to look at the actual build
object, which you can capture from cloud-builds
topic message and decode using any base64 decoder
from cloud-build-notifiers.
Related Issues (20)
- [SLACK NOTIFIER] Region not contained in the url HOT 3
- [HTTP Notifications] Empty Body HOT 1
- Not able to use GCP Cloud Build Trigger Name in Email Subject or Body HOT 3
- {{.Build.FailureInfo.Detail}} doesn't work. HOT 1
- [SLACK] color side bar is not working in notification messages HOT 1
- Surfacing author / username information to Slack notifier (GH) HOT 2
- New line in a substitution fails Slack notification HOT 6
- Template vars passed to slack.json (Block Kit template) should escape or replace double quotation marks (ie. {{.Build.FailureInfo.Detail}}) HOT 1
- The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable HOT 6
- [Request] Allow using secret value for HTTP Notifier webhook
- should extract build id in another way when build status is unknown HOT 1
- Go Template `replace` function not found HOT 1
- SlackNotifier message notification popup says "no preview available" in Slack desktop client for Windows HOT 2
- SlackNotifier Error "field template not found in type notifiers.Notification" HOT 2
- Slack notifier fails to deploy because it doesn't listen to port 8080 HOT 7
- [REQUEST] Support for Bitbucket Commit Statuses HOT 1
- githubissues notifier - use single notifier for multiple repositories HOT 4
- what is the upgrade path for slack notifier versions < 0.15.0 HOT 1
- Slack Notification Template: Need More Docs / Link To Docs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloud-build-notifiers.