From 1b8257c9209c8626aa79fce5be1940321f95487f Mon Sep 17 00:00:00 2001 From: Easton Crupper <65553218+ecrupper@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:11:55 -0400 Subject: [PATCH] chore: add id_request to reference YAML docs (#431) * chore: add id_request to reference YAML docs * new version --- .github/workflows/build.yml | 2 +- content/reference/yaml/steps.md | 22 ++++++++++++++----- layouts/community/list.html | 4 ++-- layouts/faq/list.html | 4 ++-- layouts/installation/list.html | 4 ++-- layouts/plugins/list.html | 4 ++-- layouts/reference/list.html | 4 ++-- layouts/templates/list.html | 4 ++-- layouts/tour/list.html | 4 ++-- layouts/usage/list.html | 4 ++-- themes/docsy/layouts/_default/content.html | 4 ++-- themes/docsy/layouts/blog/content.html | 2 +- themes/docsy/layouts/docs/list.html | 4 ++-- .../layouts/partials/disqus-comment.html | 2 +- themes/docsy/layouts/partials/head-css.html | 2 +- themes/docsy/layouts/partials/scripts.html | 2 +- themes/docsy/layouts/swagger/list.html | 4 ++-- 17 files changed, 44 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index daaa90b25..158e53a5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: - name: hugo uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2 with: - hugo-version: '0.108.0' + hugo-version: '0.134.2' extended: true - name: build diff --git a/content/reference/yaml/steps.md b/content/reference/yaml/steps.md index 2563ac53b..be7e8cce4 100644 --- a/content/reference/yaml/steps.md +++ b/content/reference/yaml/steps.md @@ -27,15 +27,16 @@ steps: | `image` | Y | string | Docker image used to create ephemeral container. | | `pull` | N | string | Declaration to configure if and when the Docker image is pulled. | | `secrets` | N | struct | Sensitive variables injected into the container environment. | -| `environment` | N | map || []string | Variables to inject into the container environment. | +| `environment` | N | map OR []string | Variables to inject into the container environment. | | `ruleset` | N | struct | Conditions to limit the execution of the container. | | `parameters` | N | map | Extra configuration variables specific to a plugin. | | `commands` | N | []string | Execution instructions to run inside the container. | -| `template` | N | struct | Name of a template to expand in the pipeline. | +| `template` | N | struct | Name of a template to expand in the pipeline. | +| `id_request` | N | string | Injects `VELA_ID_TOKEN_REQUEST_TOKEN` into step environment. | | `entrypoint` | N | []string | Commands to execute inside the container. | -| `detach` | N | []string | Run the container in a detached (headless) state. | | -| `ulimits` | N | string | Set the user limits for the container. | | -| `user` | N | string | Set the user for the container. | +| `detach` | N | []string | Run the container in a detached (headless) state. | +| `ulimits` | N | string | Set the user limits for the container. | +| `user` | N | string | Set the user for the container. | ### Usage @@ -395,6 +396,17 @@ steps: A pipeline can have up to 10 steps that report their own status. {{% /alert %}} +#### The `id_request` key + +```yaml +steps: + # inject $VELA_ID_TOKEN_REQUEST_TOKEN into step environment. Value of `id_request` becomes one of the claims in the token. + - name: OIDC + id_request: write +``` + +More info can be found in the [OpenID Connect usage docs](usage/open_id_connect/). + #### The `entrypoint:` key ```yaml diff --git a/layouts/community/list.html b/layouts/community/list.html index 712247801..d14f3824d 100644 --- a/layouts/community/list.html +++ b/layouts/community/list.html @@ -4,11 +4,11 @@

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} {{ .Content }} {{ partial "section-index.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }} {{ partial "feedback.html" .Site.Params.ui.feedback }}
{{ end }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }} {{ end }} diff --git a/layouts/faq/list.html b/layouts/faq/list.html index 712247801..d14f3824d 100644 --- a/layouts/faq/list.html +++ b/layouts/faq/list.html @@ -4,11 +4,11 @@

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} {{ .Content }} {{ partial "section-index.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }} {{ partial "feedback.html" .Site.Params.ui.feedback }}
{{ end }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }} {{ end }} diff --git a/layouts/installation/list.html b/layouts/installation/list.html index 712247801..d14f3824d 100644 --- a/layouts/installation/list.html +++ b/layouts/installation/list.html @@ -4,11 +4,11 @@

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} {{ .Content }} {{ partial "section-index.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }} {{ partial "feedback.html" .Site.Params.ui.feedback }}
{{ end }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }} {{ end }} diff --git a/layouts/plugins/list.html b/layouts/plugins/list.html index 712247801..d14f3824d 100644 --- a/layouts/plugins/list.html +++ b/layouts/plugins/list.html @@ -4,11 +4,11 @@

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} {{ .Content }} {{ partial "section-index.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }} {{ partial "feedback.html" .Site.Params.ui.feedback }}
{{ end }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }} {{ end }} diff --git a/layouts/reference/list.html b/layouts/reference/list.html index 712247801..d14f3824d 100644 --- a/layouts/reference/list.html +++ b/layouts/reference/list.html @@ -4,11 +4,11 @@

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} {{ .Content }} {{ partial "section-index.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }} {{ partial "feedback.html" .Site.Params.ui.feedback }}
{{ end }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }} {{ end }} diff --git a/layouts/templates/list.html b/layouts/templates/list.html index 712247801..d14f3824d 100644 --- a/layouts/templates/list.html +++ b/layouts/templates/list.html @@ -4,11 +4,11 @@

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} {{ .Content }} {{ partial "section-index.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }} {{ partial "feedback.html" .Site.Params.ui.feedback }}
{{ end }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }} {{ end }} diff --git a/layouts/tour/list.html b/layouts/tour/list.html index 712247801..d14f3824d 100644 --- a/layouts/tour/list.html +++ b/layouts/tour/list.html @@ -4,11 +4,11 @@

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} {{ .Content }} {{ partial "section-index.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }} {{ partial "feedback.html" .Site.Params.ui.feedback }}
{{ end }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }} {{ end }} diff --git a/layouts/usage/list.html b/layouts/usage/list.html index 712247801..d14f3824d 100644 --- a/layouts/usage/list.html +++ b/layouts/usage/list.html @@ -4,11 +4,11 @@

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} {{ .Content }} {{ partial "section-index.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }} {{ partial "feedback.html" .Site.Params.ui.feedback }}
{{ end }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }} {{ end }} diff --git a/themes/docsy/layouts/_default/content.html b/themes/docsy/layouts/_default/content.html index b574ad29c..8cbb682af 100644 --- a/themes/docsy/layouts/_default/content.html +++ b/themes/docsy/layouts/_default/content.html @@ -2,11 +2,11 @@

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} {{ .Content }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }} {{ partial "feedback.html" .Site.Params.ui.feedback }}
{{ end }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }} {{ end }} diff --git a/themes/docsy/layouts/blog/content.html b/themes/docsy/layouts/blog/content.html index 7193b191d..dae7acc98 100644 --- a/themes/docsy/layouts/blog/content.html +++ b/themes/docsy/layouts/blog/content.html @@ -6,7 +6,7 @@

{{ .Title }}

{{ .Content }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }}
diff --git a/themes/docsy/layouts/docs/list.html b/themes/docsy/layouts/docs/list.html index 712247801..d14f3824d 100644 --- a/themes/docsy/layouts/docs/list.html +++ b/themes/docsy/layouts/docs/list.html @@ -4,11 +4,11 @@

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} {{ .Content }} {{ partial "section-index.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }} {{ partial "feedback.html" .Site.Params.ui.feedback }}
{{ end }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }} {{ end }} diff --git a/themes/docsy/layouts/partials/disqus-comment.html b/themes/docsy/layouts/partials/disqus-comment.html index c3ae3f91b..f7406c484 100644 --- a/themes/docsy/layouts/partials/disqus-comment.html +++ b/themes/docsy/layouts/partials/disqus-comment.html @@ -14,7 +14,7 @@ */ (function() { // DON'T EDIT BELOW THIS LINE var d = document, s = d.createElement('script'); -s.src = 'https://' + {{ .Site.DisqusShortname }} + '.disqus.com/embed.js'; +s.src = 'https://' + {{ .Site.Config.Services.Disqus.Shortname }} + '.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })(); diff --git a/themes/docsy/layouts/partials/head-css.html b/themes/docsy/layouts/partials/head-css.html index 603da3861..070cffaa6 100644 --- a/themes/docsy/layouts/partials/head-css.html +++ b/themes/docsy/layouts/partials/head-css.html @@ -1,6 +1,6 @@ {{ $scssMain := "scss/main.scss"}} -{{ if .Site.IsServer }} +{{ if hugo.IsServer }} {{/* Note the missing postCSS. This makes it snappier to develop in Chrome, but makes it look sub-optimal in other browsers. */}} {{ $css := resources.Get $scssMain | toCSS (dict "enableSourceMap" true) }} diff --git a/themes/docsy/layouts/partials/scripts.html b/themes/docsy/layouts/partials/scripts.html index 70b8e8a59..512d4d492 100644 --- a/themes/docsy/layouts/partials/scripts.html +++ b/themes/docsy/layouts/partials/scripts.html @@ -5,7 +5,7 @@ {{ $jsAnchor := resources.Get "js/anchor.js" }} {{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home }} {{ $js := (slice $jsBase $jsAnchor $jsSearch) | resources.Concat "js/main.js" }} -{{ if .Site.IsServer }} +{{ if hugo.IsServer }} {{ else }} {{ $js := $js | minify | fingerprint }} diff --git a/themes/docsy/layouts/swagger/list.html b/themes/docsy/layouts/swagger/list.html index 712247801..d14f3824d 100644 --- a/themes/docsy/layouts/swagger/list.html +++ b/themes/docsy/layouts/swagger/list.html @@ -4,11 +4,11 @@

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} {{ .Content }} {{ partial "section-index.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }} {{ partial "feedback.html" .Site.Params.ui.feedback }}
{{ end }} - {{ if (.Site.DisqusShortname) }} + {{ if (.Site.Config.Services.Disqus.Shortname) }}
{{ partial "disqus-comment.html" . }} {{ end }}