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

Added env var for image prefix to engine registry #948

Conversation

sololegends
Copy link
Contributor

Changes

Added environmen variable CODECLIMATE_PREFIX as an option for the codeclimate analyzer image prefix.

This will allow offline code quality scanning something huge for many orginazations

Impact

These changes won't impact any existing configurations. Anyone wanting to use this feature can , but no one will have to alter their environments to use a new image.

Testing

  • Tested pointing to a local docker registry (GOOD)
  • Tested swapping the codeclimate image in an environment already using codeclimate:0.85.8 (GOOD)
    • No changes required for functionality
  • Tested swapping the codeclimate image in an environment already using codeclimate:0.85.9 (GOOD)
    • No changes required for functionality

Added environmen variable CODECLIMATE_PREFIX as an option for the codeclimate analyzer image prefix. 

This will allow offline code quality scanning something huge for many orginazations
@CLAassistant
Copy link

CLAassistant commented May 10, 2020

CLA assistant check
All committers have signed the CLA.

@goldenson
Copy link

👋 @filipesperandio should we merge this MR as it has been approved?

@filipesperandio
Copy link
Contributor

My bad.
Got distracted and forgot to come back here.

@filipesperandio filipesperandio merged commit 0598d82 into codeclimate:master Sep 2, 2020
@HSKC
Copy link

HSKC commented Nov 19, 2020

Thanks man. You saved my day. Someone should add this to the documentation.

@trulyliu
Copy link

Any usage example?

@sololegends
Copy link
Contributor Author

Any usage example?

I use it in my gitlab CI scripts, https://gitlab.sololegends.com/gitlab/offline-gitlab

Also, I've implemented this in the gitlab code quality scanner: https://gitlab.com/gitlab-org/ci-cd/codequality/-/blob/master/run.sh

Otherwise, just add the env variable "CODECLIMATE_PREFIX" to the docker run command.
I. E.
docker run -env CODECLIMATE_PREFIX=repo.example.com --volume "$SOURCE_CODE":/code codeclimate/codeclimate analyze

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

Successfully merging this pull request may close these issues.

7 participants