Skip to content

Commit

Permalink
Merge pull request #25 from onesteinbv/16.0-deployment-fixes
Browse files Browse the repository at this point in the history
[FIX] argocd_deployer - Fix config
  • Loading branch information
MrGigSolutions authored Apr 4, 2024
2 parents 76cd03f + f97e897 commit e789bf9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 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/data/ir_config_parameter_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
</record>
<record id="allow_immediate_deployment" model="ir.config_parameter">
<field name="key">argocd.allow_immediate_deployment</field>
<field name="value">False</field>
<field name="value" eval="'False'"/>
</record>
</odoo>
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 e789bf9

Please sign in to comment.