Skip to content

Commit

Permalink
chore: Get webhook url of gitlab and github from gitserver resource (#…
Browse files Browse the repository at this point in the history
…130)

JIRA: EPMDEDP-13302
Related: #130

Change-Id: I48990ccc3b41191dd6c50204723a58bb2ac15c63
  • Loading branch information
Artem-Zahumonnyi committed Feb 29, 2024
1 parent e7eed45 commit c9999ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ spec:
nameSshKeySecret: {{ default (printf "ci-%s" $server.gitProvider | quote) $server.nameSshKeySecret }}
sshPort: {{ dig "sshPort" "22" $server }}
skipWebhookSSLVerification: {{ $server.webhook.skipWebhookSSLVerification }}
{{- if not (eq "gerrit" $server.gitProvider) }}
webhookUrl: {{ printf "el-%s-%s.%s" $name $.Release.Namespace $.Values.global.dnsWildCard | quote }}
{{- end }}
{{- end }}
---
{{- end }}
2 changes: 2 additions & 0 deletions charts/pipelines-library/tests/test_github_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
def test_github_is_enabled():
config = """
global:
dnsWildCard: "example.com"
gitProviders:
- github
gitServers:
Expand Down Expand Up @@ -56,6 +57,7 @@ def test_github_is_enabled():
assert 443 == gitserver["httpsPort"]
assert "ci-github" == gitserver["nameSshKeySecret"]
assert 22 == gitserver["sshPort"]
assert "el-my-github-ns.example.com" == gitserver["webhookUrl"]

guicklink = r["quicklink"]["my-github"]["spec"]
assert "system" == guicklink["type"]
Expand Down
2 changes: 2 additions & 0 deletions charts/pipelines-library/tests/test_gitlab_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
def test_gitlab_is_enabled():
config = """
global:
dnsWildCard: "example.com"
gitProviders:
- gitlab
gitServers:
Expand Down Expand Up @@ -48,6 +49,7 @@ def test_gitlab_is_enabled():
assert 443 == gitserver["httpsPort"]
assert "ci-gitlab" == gitserver["nameSshKeySecret"]
assert 22 == gitserver["sshPort"]
assert "el-my-gitlab-ns.example.com" == gitserver["webhookUrl"]

guicklink = r["quicklink"]["my-gitlab"]["spec"]
assert "system" == guicklink["type"]
Expand Down

0 comments on commit c9999ed

Please sign in to comment.