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

future-traffic-93788

07/18/2019, 8:58 PM
anyone have experience with pulumi github actions?
s

swift-painter-31084

07/18/2019, 9:00 PM
I wish!
c

colossal-beach-47527

07/18/2019, 9:41 PM
I have some experience, what are you trying to do?
As you are probably already aware, the sum total of worldwide knowledge can be found here: https://www.pulumi.com/docs/reference/cd-github-actions/ Though I’m happy to help troubleshoot any issues you may be having.
f

future-traffic-93788

07/18/2019, 9:45 PM
@colossal-beach-47527 so I'm having trouble with deploying to kubernetes
I did a gcloud login and have a /github/home/.kube
I set KUBECONFIG
/github/home/.kube/config
and fail with:
Copy code
72131f5ef143: Pull complete
Digest: sha256:69a8de9ddede0bafc40c7c7364b464e51cff19f038fd065c95dd05550c14a0c5
Status: Downloaded newer image for pulumi/actions:latest
Logging in using access token from PULUMI_ACCESS_TOKEN

### FAILED Pulumi Deploy (Current Stack) 21:39:42Z (54.643s)
confirmed that the access token works when running locally
c

colossal-beach-47527

07/18/2019, 9:47 PM
Ugh. Yeah, I think there is an issue about the output of Pulumi being cut off in the event of a failure. Since obviously there isn’t any info to go on here. If you go to the Pulumi Cloud Console for the stack to update, do you see an update failure there? (And more importantly the specific logs for why the update failed.)
f

future-traffic-93788

07/18/2019, 9:48 PM
nope, no activity in pulumi cloud console
c

colossal-beach-47527

07/18/2019, 9:50 PM
How are you specifying which stack you want to update as part of the GitHub Actions workflow? Off the top of my head I don’t recall the default to how the container image determines which stack to update. But perhaps this has to do with your
.pulumi/ci.json
file?
f

future-traffic-93788

07/18/2019, 9:50 PM
ok, I'll take a look at that then. How does pulumi normally determine stack when running locally?
c

colossal-beach-47527

07/18/2019, 9:53 PM
Usually you’d run
pulumi stack ls
/
pulumi stack select
. Though I’d need to review the source code for the Pulumi GitHub Actions container to see what it does. (Perhaps if there is only a single stack for the current project, it just uses that.) Similarly, it might be worth double checking that the
Pulumi.yaml
file is in the root of the repository? Or if a
PULUMI_ROOT
environment variable is needed.
f

future-traffic-93788

07/18/2019, 9:56 PM
so I don't have a ci.json atm. Added and seeing what happens.
I feel like this example is really confusing: https://github.com/pulumi/actions-example-gke-rails
since they don't have auth (other than
PULUMI_ACCESS_TOKEN
) or the .pulumi directory
c

colossal-beach-47527

07/18/2019, 9:59 PM
What is confusing about that example? That the app is deployed by using a
PULUMI_ACCESS_TOKEN
environment variable for the GitHub actions? Or are you talking about the Pulumi app itself?
f

future-traffic-93788

07/18/2019, 10:00 PM
how it's being deployed and how it's finding the stack
also, I added the stack and failing in the same way. I can see an entry in the cloud console
but no logs with it
oh...I'm dumb There are multiple log files available. Actual error is that pulumi isn't installed...
I was under the impression that the pulumi github action would provide pulumi... ?
c

colossal-beach-47527

07/19/2019, 1:12 AM
Sorry for the delay in getting back to you. It looks like Pulumi, the
pulumi
command-line tool, is installed. But when running your Python-based Pulumi program, the “pulumi” Python library isn’t found. (And you’d need to run
pip
or something to have it installed.) This sounds like something that we could try to do automatically (e.g. run
pip install
automatically to ensure all dependencies are available?) This should be easy to address by running some step before you invoke Pulumi in your GitHub Actions workflow. I’ll ask around and see if there is something in the works to make this more transparent, but at the very least I’ll file an issue to make sure we update the documentation to include steps for how to do this sort of thing when using Python.
f

future-traffic-93788

07/19/2019, 3:54 PM
thanks. That and fixing the log output would be very helpful. I ended up having to fork the action to install pulumi python because running the install in a previous step was failing. (Also worrying is that all the standard python docker images I tried are unable to install pulumi_kubernetes. They fail with "pulumi is missing" )