1. Docs
  2. Pulumi IaC
  3. Using Pulumi
  4. Continuous Delivery
  5. Pulumi GitHub App

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.

    Comment on Pull Request

    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.

    Results on GitHub Check

    Installation and Configuration

    1. Sign in to your Pulumi account.

    2. Ensure you have selected the Pulumi organization you wish to use with the GitHub app by choosing it in the Organization drop-down.

    3. Navigate to Settings > Integrations.

    4. Select the “Install the Pulumi GitHub App” button.

      Install the Pulumi GitHub App

      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.

    5. After selecting “Install” you will be directed to GitHub. Select the GitHub organization you wish to use.

    6. Select which repos (or all repos) that the Pulumi GitHub App can have access to, and then select Install.

    7. 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.

    Turn on Pull Request Comments with Pulumi GitHub App

    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:

    1. Ensure you’re a GitHub admin of the GitHub organization where you’re installing the app.
    2. 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.

    You need to have the .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.

    GitHub Checks Tab

    Every stack that was impacted by the CI job is then listed in the left.

    GitHub Check Result

    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.

    Comment on Pull Request

    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

    1. Sign in to your Pulumi account.

    2. Ensure you have selected the Pulumi organization you wish to use with the GitHub app by choosing it in the Organization drop-down.

    3. Navigate to Settings > Integrations.

    4. Select the “GitHub Enterprise Server App” button.

      Install the Pulumi GitHub Enterprise Server App

      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.

    5. 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.

      GitHub Enterprise Server App Installation Dialog

      For Personal accounts, no extra information is required, click on the install button to continue.

      GitHub Enterprise Server App Installation Dialog for personal account

      For Organization accounts, the organization name is required to continue.

      GitHub Enterprise Server App Installation Dialog for organization account

    6. After selecting “Install” you will be directed to GitHub where you will have to complete the Application name.

      GitHub App provisioning

    7. The last step will be to select where do you want to install the application

      GitHub App installation

      PulumiUP 2024. Watch On Demand.