Skip to content

Instantly share code, notes, and snippets.

@dduportal
Last active April 12, 2021 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dduportal/dd89581f2110391929d4d157e8dbf6a0 to your computer and use it in GitHub Desktop.
Save dduportal/dd89581f2110391929d4d157e8dbf6a0 to your computer and use it in GitHub Desktop.
<p>
Execute <a href="https://www.updatecli.io/updatecli" target="_blank">updatecli</a> on the repository.
<p>
The following arguments are available for this function:
<ul>
<li>String action: (Optional - Default: "diff") Updatecli action (e.g. subcommand) to execute.</li>
<li>String config: (Optional - Default: "./updatecli/updatecli.d") path to the file or directory with the updatecli configuration (flag "--config").</li>
<li>String values: (Optional - Default: "./updatecli/values.yaml") path to the file with the updatecli values (flag "--values").</li>
<li>String updatecliDockerImage: (Optional - Default: "ghcr.io/updatecli/updatecli:latest") Docker Image of updatecli to be used in the process.</li>
</ul>
Examples:
<pre><code>
// Run the "updatecli diff" command
updatecli()
</code></pre>
<pre><code>
// updatecli can use the environment variable "UPDATECLI_GITHUB_TOKEN" as a token source to allow GitHub access (both API reads and PR creation)
withCredentials([string(credentialsId: 'github-credential-with-write-access', variable: 'UPDATECLI_GITHUB_TOKEN')]) {
updatecli(
// Run the "updatecli apply" command
action: "apply"
// Configuration of updatecli is stored in the file "updateci.yaml" at the repository's root
config: "./updateci.yaml",
// No values flag to be passed
values: "",
)
}
</code></pre>
</p>
</p>
<!--
vim: ft=html
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment