Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infracost comment commit #7

Closed
mpcabral opened this issue May 9, 2022 · 1 comment
Closed

Infracost comment commit #7

mpcabral opened this issue May 9, 2022 · 1 comment

Comments

@mpcabral
Copy link

mpcabral commented May 9, 2022

I am trying to make a pipeline to apply terraform script with jenkins
I did the job of checking and commenting on a pull request

But I would like to double check when a commit goes to master or when a PR is approved to master
But is not working

stage('infracost') {
agent {
docker {
image 'infracost/infracost:ci-0.9'
args "--user=root --entrypoint=''"
}
}
environment {
INFRACOST_API_KEY = credentials('jenkins-infracost-api-key')
GITHUB_TOKEN = credentials('git_token')
GITHUB_COMMIT = "${GIT_COMMIT}"
GITHUB_REPO = "mpcabral/test-infracost"
}
steps {
sh 'infracost breakdown --path plan.json --format json --out-file infracost.json'
sh 'infracost comment github --policy-path infracost-policy.rego --path infracost.json --repo $GITHUB_REPO --commit $GITHUB_COMMIT --github-token $GITHUB_TOKEN'
}
}

I'm getting the following error:
Type mismatch on variable $commitSha and argument oid (String! / GitObjectID)

@alikhajeh1
Copy link
Member

@mpcabral it seems like this is a duplicate of infracost/infracost#1635 so I'm going to close this but feel free to re-open it if I'm wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants