This message was deleted.
# general
b
This message was deleted.
b
@agreeable-agency-8132 Hello! Thanks for pointing to this! We'll look into this. While it's in progress you can register using via Infracost Cloud, get API key there and use the current instructions. Here are the steps how to get the API key: https://www.infracost.io/docs/infracost_cloud/get_started/#1-sign-up-or-log-in
a
thank you @busy-agent-35515 for your response , i have registered and am able to get started on this ,another thing i noticed is when using docker and running below command the infracost-base.json is getting written on the short lived container and we cannot access it. can you provide any guidance on how to approach this
Copy code
docker run --rm -e INFRACOST_API_KEY={key} -v $PWD:/code/ infracost/infracost:ci-0.10 breakdown --path /code/ --format=json --out-file=$PWD/infracost-base.json
b
Oh, right. One way to do that is connecting your host folder to the container as a volume. This way the saved files will be preserved in your host's file system. Let me prepare an example for you
You already do that in your example by setting
-v $PWD:/code/
. I guess you could save the file as
--out-file=/code/infracost-base.json
. Can you try that?
a
ah, that way easy thanks, it worked
b
Awesome! 🙂
a
another question, sorry i m using this tool for the first time. when following https://github.com/infracost/infracost-jenkins/,
Copy code
sh 'infracost comment github --path=/tmp/infracost.json \
                                             --repo=$GITHUB_REPO \
                                             --pull-request=$GITHUB_PULL_REQUEST_NUMBER \
                                             --github-token=$GITHUB_TOKEN \
                                             --behavior=update'
what is the format for github_repo, it that https url or org/my repo
b
No worries at all. It should be in
org/repo
format
We don't have explicit examples for Jenkins, but you can probably use the examples from CircleCI to get an idea: https://www.infracost.io/docs/features/cli_commands/#circleci-with-github
a
is it the same for private github ?
b
You mean 1) private repo on github.com or 2) repo in GitHub Enterprise?
a
repo in github enterprise
b
Then you need to provide one more flag ``--github-api-url=https://your-gh-ent-domain`
This is needed to know where to send API requests to pull/post the comments
a
ah , super finally i got this working . thank you @busy-agent-35515 for all the help
b
Awesome! Thank you for your patience with this! We try to provide as many examples as possible, but it's hard to cover every case. We'll think how to make it clearer for docker image users. 👍
a
thank you
🙌 1