https://pulumi.com logo
#general
Title
# general
e

early-match-56268

11/16/2019, 1:37 PM
Re-posting from above, does anyone know how the Pulumi GitHub app is triggered? I am using GitHub actions and it only seems to get triggered on a merge and I can't seem to get it to comment on the PR. I think I am just configuring something incorrectly but can't figure out what.
w

white-balloon-205

11/16/2019, 5:38 PM
Cc @colossal-beach-47527 who is the expert on this. There are docs here in case you haven’t already seen them: https://www.pulumi.com/docs/guides/continuous-delivery/github-app/
e

early-match-56268

11/16/2019, 6:17 PM
thanks, I followed those to install the app but it seems like the
pulumi preview
command is not getting picked up. The docs say
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.
But nothing is showing up on the pull request or in the Checks
c

colossal-beach-47527

11/16/2019, 7:11 PM
That doesn’t sound right Andrew. But like Luke said, I can help track down whatever the missing link is. Just to confirm: • You are successfully running Pulumi on pushes to your pull request branch. e.g. you see the
pulumi
output for the GitHub Actions run. And can visit https://app.pulumi.com/<your-stack>/previews/… and see the preview that was performed in the GitHub Actions was persisted as you would expect on app.pulumi.com? • If you click the “Checks” tab for the Pull Request, you see the Pulumi GitHub app, but it just isn’t posting any check runs? (But you are seeing the GitHub actions output on that page?)
e

early-match-56268

11/16/2019, 9:15 PM
@colossal-beach-47527 I can see the preview in the Pulumi console after I create the pull request, but the Pulumi app does not show up in the "Checks" tab. After I merge the PR, as soon as pulumi starts running the update, then the Pulumi app shows up in the 'Actions' tab.
This is the Dockerfile I am using for the action (needed to add Helm)
And this is the entrypoint script (I wanted pulumi to preview against the PR branch not the target)
This is how I am using it in GitHub actions
c

colossal-beach-47527

11/16/2019, 9:24 PM
Hrm, that is confusing. Would you mind Direct Messaging me two things: • The URL to an update that is showing up correctly from the Pulumi GitHub app? e.g. https://app.pulumi.com/chrsmith/website-backend/production/updates/2 • The URL to a preview that runs in the GitHub Actions, but isn’t flowing through to the Pulumi GitHub app. e.g. https://app.pulumi.com/chrsmith/website-backend/production/previews/<GUID> With those two links, I can look at the metadata associated with the two updates and see why it isn’t triggering our GitHub app. When you run
pulumi up
or
pulumi preview
, we associate some metadata from the current environment with the update. (e.g. the current git hash at head.) That’s how we know to associate the preview/update with the PR. But it’s possible something isn’t quite the way we expect. (For example, if the git SHA that the preview is running as doesn’t match up with the GitHub pull request’s SHA or something.)
e

early-intern-90238

11/17/2019, 12:31 AM
I created my own custom GitHub action, you can see it here for reference. I find it more flexible, you will probably want to fork it and change it for yourself... https://github.com/cloudlayerio/github-pulumi
Here is an example of how I use it:
Another example:
It lets you do things like this, which the other one wouldn't.
btw one bug in GitHub actions is if you need it to trigger on an automated release from say semantic, you have to use your personal GitHub token as opposed to the repo one...
2 Views