Use GitHub Artifacts in Spinnaker Pipelines
Pulling a Kubernetes Manifest from Github
-
Under “Expected Artifacts” in your pipeline, create an artifact of type “Github”.
-
Specify the “file path” as the path within the repository to your file. For example, if your manifest is at
demo/manifests/deployment.yml
in the Github repositoryorgname/reponame
, specifydemo/manifests/deployment.yml
. -
Check the “Use Default Artifact” checkbox.
-
In the “Content URL”, provide the full path to the API URI for your manifest. Here are some examples of this:
-
If you’re using SaaS Github (www.github.com), the URI is generally formatted like this:
https://api.github.com/repos/<ORG>/<REPO>/contents/<PATH-TO-FILE>
.- For example:
https://api.github.com/repos/armory/demo/contents/manifests/deployment.yml
- For example:
-
If you have an on-prem Github Enterprise, then the URI may be formatted like this:
https://<GITHUB_URL>/api/v3/repos/<ORG>/<REPO>/contents/<PATH-TO-FILE>
.- For example:
http://github.customername.com/api/v3/repos/armory/spinnaker-pipelines/contents/manifests/deployment.yml
- For example:
-
-
Create a “Deploy (Manifest)” stage. Rather than specifying the manifest directly in the UI, under the “Manifest Source” specify “Artifact”, and in the “Expected Artifact” field, select the artifact you created above.
-
If you have multiple Github Accounts (credentials) added to your Spinnaker cluster, there should be a dropdown to select which one to use.
Feedback
Was this page helpful?
Thank you for letting us know!
Sorry to hear that. Please tell us how we can improve.
Last modified April 12, 2021: (8405118)