Skip to content

Commit

Permalink
release: v4.17.0a1
Browse files Browse the repository at this point in the history
  • Loading branch information
ntarocco committed Sep 13, 2024
1 parent fcb419c commit 2998df0
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,32 +312,27 @@ Then, switch to the project that you want to update:
$ oc project caimira-test
```

Create a new service account in OpenShift to use GitLab container registry:
Create a new service account in OpenShift to access GitLab container registry:

```console
$ oc create serviceaccount gitlabci-deployer
serviceaccount "gitlabci-deployer" created
```

$ oc policy add-role-to-user registry-editor -z gitlabci-deployer
Grant `edit` permission to the service account to run `oc set image` from CI an update the tag to deploy:
```
$ oc policy add-role-to-user edit -z gitlabci-deployer
```

Get the service account token for GitLab:
```
# We will refer to the output of this command as `test-token`
$ oc serviceaccounts get-token gitlabci-deployer
<...test-token...>
```

Add the token to GitLab to allow GitLab to access OpenShift and define/change image stream tags. Go to `Settings` -> `CI / CD` -> `Variables` -> click on `Expand` button and create the variable `OPENSHIFT_CAIMIRA_TEST_DEPLOY_TOKEN`: insert the token `<...test-token...>`.

Then, create the webhook secret to be able to trigger automatic builds from GitLab.

Create and store the secret. Copy the secret above and add it to the GitLab project under `CI /CD` -> `Variables` with the name `OPENSHIFT_CAIMIRA_TEST_WEBHOOK_SECRET`.

```console
$ WEBHOOKSECRET=$(openssl rand -hex 50)
$ oc create secret generic \
--from-literal="WebHookSecretKey=$WEBHOOKSECRET" \
gitlab-caimira-webhook-secret
```

For CI usage, we also suggest creating a service account:

```console
Expand Down

0 comments on commit 2998df0

Please sign in to comment.