Skip to content

Commit

Permalink
Small changes to gitlab templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ElaiShalevRH committed Dec 19, 2024
1 parent 414c62b commit 394a0ae
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ spec:
version: 1.0.0-SNAPSHOT
workflowId: ${{ parameters.workflowId }}
infrastructureWorkflowId: ${{ parameters.infrastructureWorkflowId }}
sourceControl: github.com
sourceControl: gitlab.com
applicationType: workflow-project
lifecycle: development
quayOrgName: ${{ parameters.quayOrgName }}
Expand Down Expand Up @@ -294,8 +294,8 @@ spec:
argocdNamespace: ${{ parameters.argocdNamespace }}
orgName: ${{ parameters.orgName }}
workflowId: ${{ parameters.workflowId }}
gitUrl: git@github.com:${{ parameters.orgName }}/${{ parameters.repoName }}.git
gitOpsUrl: git@github.com:${{ parameters.orgName }}/${{ parameters.repoName }}-gitops.git
gitUrl: git@${{ parameters.gitlabHost }}:${{ parameters.orgName }}/${{ parameters.repoName }}.git
gitOpsUrl: git@${{ parameters.gitlabHost }}:${{ parameters.orgName }}/${{ parameters.repoName }}-gitops.git
quayOrgName: ${{ parameters.quayOrgName }}
quayRepoName: ${{ parameters.quayRepoName }}
gitHost: ${{ parameters.gitlabHost }}
Expand All @@ -314,8 +314,8 @@ spec:
argocdNamespace: ${{ parameters.argocdNamespace }}
orgName: ${{ parameters.orgName }}
workflowId: ${{ parameters.workflowId }}
gitUrl: git@github.com:${{ parameters.orgName }}/${{ parameters.repoName }}.git
gitOpsUrl: git@github.com:${{ parameters.orgName }}/${{ parameters.repoName }}-gitops.git
gitUrl: git@${{ parameters.gitlabHost }}:${{ parameters.orgName }}/${{ parameters.repoName }}.git
gitOpsUrl: git@${{ parameters.gitlabHost }}:${{ parameters.orgName }}/${{ parameters.repoName }}-gitops.git
quayOrgName: ${{ parameters.quayOrgName }}
quayRepoName: ${{ parameters.quayRepoName }}
convertToFlat: false
Expand Down Expand Up @@ -376,10 +376,10 @@ spec:
system: ${{ parameters.system }}
applicationType: workflow-project
description: ${{ parameters.description }}
sourceControl: github.com
sourceControl: gitlab.com
lifecycle: development
gitUrl: git@github.com:${{ parameters.orgName }}/${{ parameters.repoName }}.git
gitOpsUrl: git@github.com:${{ parameters.orgName }}/${{ parameters.repoName }}-gitops.git
gitUrl: git@${{ parameters.gitlabHost }}:${{ parameters.orgName }}/${{ parameters.repoName }}.git
gitOpsUrl: git@${{ parameters.gitlabHost }}:${{ parameters.orgName }}/${{ parameters.repoName }}-gitops.git
persistencePSQLSecretName: ${{ parameters.persistencePSQLSecretName }}
persistencePSQLUserKey: ${{ parameters.persistencePSQLUserKey }}
persistencePSQLPasswordKey: ${{ parameters.persistencePSQLPasswordKey }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ spec:
action: fetch:template
if: ${{ parameters.CI == 'tekton_argocd' }}
input:
url: ./
url: ../build/
copyWithoutTemplating:
- .gitlab-ci.yml
values:
Expand Down
10 changes: 5 additions & 5 deletions scaffolder-templates/gitlab-workflows/build/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ stages:
- update

wait_for_populated_variable:
# A tag can be set according to your Gitlab runner configuration, for example:
# tags:
# - shared-podman

tags:
- shared-podman # Change to any tag your organization uses
stage: wait
image: ubuntu:latest
script: |
sleep 5
update_pipelinerun:
# tags:
# - shared-podman
tags:
- shared-podman # Change to any tag your organization uses
stage: update
image: ubuntu:latest
script: |
Expand Down
4 changes: 2 additions & 2 deletions scaffolder-templates/gitops/bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ SSH_PRIVATE_KEY=$(oc get secrets -n orchestrator-gitops github-ssh-credentials -
{% else %}
SSH_PRIVATE_KEY=$(oc get secrets -n orchestrator-gitops gitlab-ssh-credentials -o jsonpath='{.data.id_rsa}')
{% endif %}
sed -i "s/__REPLACE_SSH_PRIVATE_KEY__/$SSH_PRIVATE_KEY/" ${{values.workflowId}}-argocd-repo.yaml
sed -i "s/__REPLACE_SSH_PRIVATE_KEY__/$SSH_PRIVATE_KEY/" bootstrap/${{values.workflowId}}-argocd-repo.yaml
kubectl apply -f .
```

**Note:** If you're not logged into the repository, you need to provide a personal access token (PAT) as part of the clone URL.

```
git clone https://<PAT>@${{ values.gitHost }}/${{ values.orgName }}/${{ values.repoName }}.git
git clone https://token:<PAT>@${{ values.gitHost }}/${{ values.orgName }}/${{ values.repoName }}.git
```

Replace `<PAT>` with your personal access token. Ensure the token has the necessary permissions to access the repository.
Expand Down

0 comments on commit 394a0ae

Please sign in to comment.