Skip to content

Commit

Permalink
[FIX] argocd_deployer - Fixed templates and application set deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGigSolutions committed Apr 4, 2024
1 parent ddcb45f commit f97e897
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions argocd_deployer/data/application_set_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,31 @@
<record id="application_set_template_master" model="argocd.application.set.template">
<field name="name">Master application set template - Do not change</field>
<field name="yaml">apiVersion: argoproj.io/v1alpha1
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: curq-application-sets
name: curq-master-application-set
namespace: argocd
spec:
goTemplate: true
generators:
- git:
repoURL: {{.config.repository_url}}
revision: {{.config.branch}}
files:
- path: {{.config.deployment_directory}}
- git:
repoURL: {{.config.repository_url}}
revision: {{.config.branch}}
files:
- path: {{.config.deployment_directory}}/**/application_set.yaml
template:
metadata:
name: curq-application-sets
name: "application-set-{{ "{{ " }}.path.basename{{ " }}" }}"
spec:
project: "default"
source:
repoURL: {{.config.repository_url}}
targetRevision: {{.config.branch}}
path: {{.config.deployment_directory}}/{{ "{{ " }}.path.basename{{ " }}" }}
path: "{{ "{{ " }}.path.filename{{ " }}" }}"
destination:
name: in-cluster
namespace: argocd
namespace: "application-set-{{ "{{ " }}.path.basename{{ " }}" }}"
syncPolicy:
syncOptions:
- CreateNamespace=true
Expand Down
2 changes: 1 addition & 1 deletion argocd_deployer/models/application_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def _get_repository(self):
return Repo.clone_from(self.repository_url, directory)

def _get_branch(self):
return self.branch
return self.env.ref("argocd_deployer.application_set_master").branch

def _format_commit_message(self, message):
return message % self.name
Expand Down

0 comments on commit f97e897

Please sign in to comment.