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

control-service: add git ssl enabled flag #182

Merged

Conversation

mivanov1988
Copy link
Collaborator

@mivanov1988 mivanov1988 commented Sep 2, 2021

In order to enable Git urls over HTTP we need to be able to pass extra
argument. For example we will use it in implementation of local (single
command) installation of our helm chart with local git server.

From helm install they can be passed using

helm install ... --set deploymentGitUrl=false

Testing Done: unit and itegration tests
Signed-off-by: Miroslav Ivanov [email protected]

In order to enable Git urls over http we need to be able to pass extra
argument. For example we will use it in implementation of local (single
command) installation of our helm chart with local git server.

From helm install they can be passed using

helm install ... --set deploymentGitUrl=false

Testing Done: unit and itegration tests
Signed-off-by: Miroslav Ivanov [email protected]
@tpalashki tpalashki merged commit b807ee5 into main Sep 3, 2021
@tpalashki tpalashki deleted the person/miroslavi/add-control-service-git-ssl-enabled-flag branch September 3, 2021 07:19
URI u = URI.create(gitDataJobsUrl);
if (StringUtils.isBlank(u.getScheme())) {
return "https://" + u.toString();
String scheme = gitDataJobsSslEnabled ? "https" : "http";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to initialise, could return directly

git_url_scheme="https"
[ "$GIT_SSL_ENABLED" = false ] && git_url_scheme="http"

git clone $git_url_scheme://$git_username:$git_password@$git_repository ./data-jobs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jGit lib we use supports a variety of URL schemes, e.g. "git"
do we have tests to cover all the variations ?

The recent announcement https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ made me think about this

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

Successfully merging this pull request may close these issues.

4 participants