Pulumi Github App
Pulumi’s GitHub app displays the results of Pulumi stack update previews in pull requests and enables automatic stack deployments via Pulumi Deployments. Once installed and
configured, it will show you any potential infrastructure changes on Pull Requests and commit checks. You can also configure git push
to deploy workflows that update your stacks whenever a pull request is merged.
Features
The Pulumi GitHub app will automatically add comments to Pull Requests with the results of any stack changes. This includes a summary of how many resources were created, updated, and/or deleted. This allows you to quickly see the changes caused by your Pulumi program without needing to leave GitHub’s Pull Request view, with a link to the richer details available on the Pulumi Cloud.
Beyond Pull Request comments, the GitHub application also integrates with GitHub’s Checks API. This provides even more detail about any resource changes, including the full update log.
Installation and Configuration
Ensure you have selected the Pulumi organization you wish to use with the GitHub app by choosing it in the Organization drop-down.
Navigate to Settings > Integrations.
Select the “Install the Pulumi GitHub App” button.
If this page says you already have the app installed, you can stop here. If the page asks you to accept additional permissions for the app, please accept the permissions and stop here.
After selecting “Install” you will be directed to GitHub. Select the GitHub organization you wish to use.
Select which repos (or all repos) that the Pulumi GitHub App can have access to, and then select Install.
You will be redirected to app.pulumi.com. Return to the Settings > Integrations tab and confirm the GitHub App is installed on your desired organization.
If you installed the GitHub app in the past and the steps above aren’t showing it as installed for your desired organization, please try the following:
- Ensure you’re a GitHub admin of the GitHub organization where you’re installing the app.
- Uninstall the app (via github.com) and re-install it following the steps above.
Configure Git Push-to-Deploy with Pulumi Deployments
To set up a git push
-to-deploy workflow using Pulumi Deployments, consult the Pulumi Deployments documentation after installing the Pulumi GitHub App.
CI Integration
The Pulumi GitHub application will work with any CI/CD system. See our Continuous Delivery guide for information on how to integration Pulumi with whatever system you currently use.
Once installed in your organization, any pulumi preview
or pulumi up
that is run in your CI
system will have its results reported back to GitHub.
.git
folder included in your Pulumi project folder to take advantage of some of these features. If you copy your Pulumi code into a container or somewhere else and don’t include the .git
folder then some of this functionality won’t work.GitHub UI
There are two places that Pulumi update results will be displayed: Pull Requests or commit Check.
All Pulumi stack updates are reported to the GitHub Checks API. You can see the results of each commit check by “Code” tab’s “Commits” page, and then clicking the ✅ or ❌ icon.
For Pull Requests, you can see the checks on the “Checks” tab as well.
Every stack that was impacted by the CI job is then listed in the left.
If the CI build originated from a pull request, e.g. the Travis CI job had type pull_request
,
then the results will be placed as a comment on the Pull Request as well.
GitHub Enterprise Server support
GitHub Enterprise Server is supported for Pulumi Business Critical Edition, for it to work, Pulumi has to provision the GitHub application into your GitHub instance.
Installation
Ensure you have selected the Pulumi organization you wish to use with the GitHub app by choosing it in the Organization drop-down.
Navigate to Settings > Integrations.
Select the “GitHub Enterprise Server App” button.
If this page says you already have the app installed, you can stop here. If the page asks you to accept additional permissions for the app, please accept the permissions and stop here.
A dialog will pop-up requesting information about your GitHub installation.
Complete your installation hostname and the type of account where you want to provision the App.
For Personal accounts, no extra information is required, click on the install button to continue.
For Organization accounts, the organization name is required to continue.
After selecting “Install” you will be directed to GitHub where you will have to complete the Application name.
The last step will be to select where do you want to install the application
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.