Add repositories;Push manifests;Change protocol
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
414b72bcb8
commit
1c60214f5a
@ -109,10 +109,16 @@
|
|||||||
loop:
|
loop:
|
||||||
- organization: mc
|
- organization: mc
|
||||||
body:
|
body:
|
||||||
name: GitOps.Config
|
name: GitOps.HelmCharts
|
||||||
# auto_init: true
|
# auto_init: true
|
||||||
# default_branch: main
|
# default_branch: main
|
||||||
description: GitOps manifests
|
description: Helm charts
|
||||||
|
- organization: mc
|
||||||
|
body:
|
||||||
|
name: GitOps.ClusterAPI
|
||||||
|
# auto_init: true
|
||||||
|
# default_branch: main
|
||||||
|
description: ClusterAPI manifests
|
||||||
- organization: wl
|
- organization: wl
|
||||||
body:
|
body:
|
||||||
name: GitOps.Config
|
name: GitOps.Config
|
||||||
|
@ -154,6 +154,19 @@
|
|||||||
-f {{ capi_clustermanifest.path }} \
|
-f {{ capi_clustermanifest.path }} \
|
||||||
-o /opt/metacluster/cluster-api/new-cluster
|
-o /opt/metacluster/cluster-api/new-cluster
|
||||||
|
|
||||||
|
- name: Initialize/Push git repository
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: |
|
||||||
|
git init
|
||||||
|
git config --global user.email "administrator@{{ vapp['metacluster.fqdn'] }}"
|
||||||
|
git config --global user.name "administrator"
|
||||||
|
git checkout -b main
|
||||||
|
git add .
|
||||||
|
git commit -m "Upload manifests"
|
||||||
|
git remote add origin https://git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.ClusterAPI.git
|
||||||
|
git push https://administrator:{{ vapp['metacluster.password'] | urlencode }}@git.{{ vapp['metacluster.fqdn'] }}/mc/GitOps.ClusterAPI.git --all
|
||||||
|
chdir: /opt/metacluster/cluster-api/new-cluster
|
||||||
|
|
||||||
- name: Cleanup tempfile
|
- name: Cleanup tempfile
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ capi_clustermanifest.path }}"
|
path: "{{ capi_clustermanifest.path }}"
|
||||||
|
@ -6,7 +6,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
generators:
|
generators:
|
||||||
- git:
|
- git:
|
||||||
repoURL: ssh://git@gitea-ssh.gitea.svc.cluster.local/mc/GitOps.Config.git
|
repoURL: https://git.{{ vapp['metacluster.fqdn'] }}/wl/GitOps.Config.git
|
||||||
revision: HEAD
|
revision: HEAD
|
||||||
directories:
|
directories:
|
||||||
- path: metacluster-applicationset/*
|
- path: metacluster-applicationset/*
|
||||||
@ -20,7 +20,7 @@ spec:
|
|||||||
prune: true
|
prune: true
|
||||||
selfHeal: true
|
selfHeal: true
|
||||||
source:
|
source:
|
||||||
repoURL: ssh://git@gitea-ssh.gitea.svc.cluster.local/mc/GitOps.Config.git
|
repoURL: https://git.{{ vapp['metacluster.fqdn'] }}/wl/GitOps.Config.git
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: {% raw %}'{{ path }}'{% endraw +%}
|
path: {% raw %}'{{ path }}'{% endraw +%}
|
||||||
destination:
|
destination:
|
||||||
|
Loading…
Reference in New Issue
Block a user