Skip to content

Commit a54d36b

Browse files
committed
Add configuration for using Gitlab in validation
Also update the README and installation commands Related to packit/deployment#401
1 parent 2d12967 commit a54d36b

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

helm-charts/packit-service-validation/templates/job-run-validation.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ spec:
1919
secretKeyRef:
2020
name: {{ .Release.Name }}-github
2121
key: token
22+
- name: GITLAB_TOKEN
23+
valueFrom:
24+
secretKeyRef:
25+
name: { { .Release.Name } }-gitlab
26+
key: token
2227
- name: SENTRY_SECRET
2328
valueFrom:
2429
secretKeyRef:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: {{ .Release.Name }}-gitlab
5+
namespace: {{ .Release.Namespace }}
6+
type: Opaque
7+
data:
8+
token: "{{ .Values.secrets.gitlab }}"

helm-charts/packit-service-validation/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ resources:
2727
secrets:
2828
sentry: ~
2929
github: ~
30+
gitlab: ~
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
DEPLOYMENT ?= production
22

33
install:
4-
helm upgrade $(EXTRA_OPTIONS) --install --cleanup-on-fail packit-$(DEPLOYMENT)-validation ../../helm-charts/packit-service-validation/ --set secrets.sentry=${SENTRY} --set secrets.github=${GITHUB} --values $(DEPLOYMENT).yaml
4+
helm upgrade $(EXTRA_OPTIONS) --install --cleanup-on-fail packit-$(DEPLOYMENT)-validation ../../helm-charts/packit-service-validation/ --set secrets.sentry=${SENTRY} --set secrets.github=${GITHUB} --set secrets.gitlab=${GITLAB} --values $(DEPLOYMENT).yaml
55

66
dryrun:
77
make install EXTRA_OPTIONS="--debug --dry-run"

values/packit-service-validation/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ Login to [PSI](https://ocp4.psi.redhat.com) and switch to `cyborg` project.
66
oc project cyborg
77

88
Get secrets from Bitwarden.
9-
Sentry from `extra-vars.yml` in `secrets-packit-[prod|stg]` item and
10-
GitHub token from `Release/usercont bot` item.
9+
Sentry from `extra-vars.yml` in `secrets-packit-[prod|stg]` item,
10+
GitHub token from `Release/usercont bot` item and GitLab token from `Gitlab.com account for validation` item.
1111

1212
export SENTRY=$( echo -n 'token from bitwarden' | base64 )
1313
export GITHUB=$( echo -n 'token from bitwarden' | base64 )
14+
export GITLAB=$( echo -n 'token from bitwarden' | base64 )
1415

1516
### Install from this repo
1617

@@ -24,7 +25,7 @@ with keys overriding those defined in `values.yaml` with `~` value.
2425

2526
helm repo add packit https://helm.packit.dev
2627
helm repo update
27-
helm upgrade --install --cleanup-on-fail packit-service-validation packit/packit-service-validation --set secrets.sentry=${SENTRY} --set secrets.github=${GITHUB} --values your-values-file.yaml
28+
helm upgrade --install --cleanup-on-fail packit-service-validation packit/packit-service-validation --set secrets.sentry=${SENTRY} --set secrets.github=${GITHUB} secrets.gitlab=${GITLAB} --values your-values-file.yaml
2829

2930
### Render templates
3031

0 commit comments

Comments
 (0)