Skip to content

Commit

Permalink
fix: Loading remote tags for bunq2ynab (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvgijssel authored Dec 21, 2023
1 parent 416bc2f commit d95cf42
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/provisioner-angry-bikes-listen-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"provisioner": patch
---

fix: Improve deploy logic for bunq2ynab
5 changes: 5 additions & 0 deletions .changeset/provisioner-angry-bikes-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"provisioner": patch
---

fix: Loading remote tags for bunq2ynab
17 changes: 8 additions & 9 deletions provisioner/deploys/bunq2ynab/tasks/install_bunq2ynab.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def install_bunq2ynab():
"1password_service_account_token.credential"
)

docker_compose = files.template(
files.template(
name="Copy the docker-compose file",
src="provisioner/deploys/bunq2ynab/files/docker-compose.yml.j2",
dest="/opt/bunq2ynab/docker-compose.yml",
Expand All @@ -45,11 +45,10 @@ def install_bunq2ynab():
bunq2ynab_image_tag=host.data.bunq2ynab_image_tag,
)

if docker_compose.changed:
server.shell(
name="Start the bunq2ynab service",
commands=[
"docker compose -f /opt/bunq2ynab/docker-compose.yml up -d --force-recreate --remove-orphans",
],
_sudo=True,
)
server.shell(
name="Start the bunq2ynab service",
commands=[
"docker compose -f /opt/bunq2ynab/docker-compose.yml up -d --remove-orphans",
],
_sudo=True,
)
6 changes: 4 additions & 2 deletions provisioner/group_data/dev.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

setup_env = "dev"
inside_docker = True
legacy_ip_tables = True
Expand All @@ -7,7 +9,7 @@
new_relic_display_name = "provisioner_dev"
bunq2ynab_image_tag = (
"ghcr.io/vgijssel/setup/bunq2ynab-dev:"
+ open("./tools/bunq2ynab/publish_oci_image-dev.remote_tags.txt", "r")
.read()
+ Path("./tools/bunq2ynab/publish_oci_image-dev.remote_tags.txt")
.read_text()
.strip()
)
4 changes: 3 additions & 1 deletion provisioner/group_data/prod.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

setup_env = "prod"
inside_docker = False
legacy_ip_tables = False
Expand All @@ -7,5 +9,5 @@
new_relic_display_name = "provisioner"
bunq2ynab_image_tag = (
"ghcr.io/vgijssel/setup/bunq2ynab:"
+ open("./tools/bunq2ynab/publish_oci_image.remote_tags.txt", "r").read().strip()
+ Path("./tools/bunq2ynab/publish_oci_image.remote_tags.txt").read_text().strip()
)
6 changes: 4 additions & 2 deletions provisioner/group_data/test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

setup_env = "test"
inside_docker = True
legacy_ip_tables = True
Expand All @@ -7,7 +9,7 @@
new_relic_display_name = "provisioner_test"
bunq2ynab_image_tag = (
"ghcr.io/vgijssel/setup/bunq2ynab-dev:"
+ open("./tools/bunq2ynab/publish_oci_image-dev.remote_tags.txt", "r")
.read()
+ Path("./tools/bunq2ynab/publish_oci_image-dev.remote_tags.txt")
.read_text()
.strip()
)

0 comments on commit d95cf42

Please sign in to comment.