-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
document variables & template overview
- Loading branch information
1 parent
d9904ce
commit 66c027b
Showing
3 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
public | ||
public/** | ||
resources | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
date: 2000-01-01T00:00:00+00:00 | ||
title: Variables | ||
author: eoinmcafee | ||
weight: 20 | ||
disable_toc: true | ||
aliases: | ||
- /configure/templates/variables/ | ||
description: a list and description of variables available for use | ||
--- | ||
The following variables are available for use for both starlark & Jsonnet templates: | ||
|
||
# Build | ||
|
||
Jsonnet example usage: | ||
``` | ||
local event = std.extVar("build.event"); | ||
local action = std.extVar("build.action"); | ||
please note they must be prefixed with 'build.' | ||
``` | ||
|
||
Starlark example usage: | ||
``` | ||
{ | ||
"event": ctx.build.event, | ||
"action": ctx.build.action | ||
} | ||
please note they must be prefixed with 'build.' | ||
``` | ||
|
||
Variable | Description | ||
------------|------------ | ||
event | | ||
action | | ||
environment | | ||
link | | ||
branch | | ||
source | | ||
before | | ||
after | | ||
target | | ||
ref | | ||
commit | | ||
title | | ||
message | | ||
source_repo | | ||
author_login | | ||
author_email | | ||
author_avatar | | ||
sender | | ||
|
||
# Repo | ||
|
||
Jsonnet example usage: | ||
``` | ||
local uid = std.extVar("repo.uid"); | ||
local name = std.extVar("repo.name"); | ||
please note they must be prefixed with 'repo.' | ||
``` | ||
|
||
Starlark example usage: | ||
``` | ||
{ | ||
"uid": ctx.repo.uid, | ||
"name": ctx.repo.name | ||
} | ||
please note they must be prefixed with 'repo.' | ||
``` | ||
|
||
Variable | Description | ||
------------|------------ | ||
uid | | ||
name | | ||
namespace | | ||
slug | | ||
git_http_url | | ||
git_ssh_url | | ||
link | | ||
branch | | ||
config | | ||
private | | ||
visibility | | ||
active | | ||
trusted | | ||
protected | | ||
ignore_forks | | ||
ignore_pull_requests | |