Make workdir independent
continuous-integration/drone/push Build is failing Details

pull/1/head
lars 2023-10-02 20:50:16 -05:00
parent 84a830bfcc
commit 369d0b0925
1 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import requests
import json import json
from dotenv import load_dotenv from dotenv import load_dotenv
from string import Template from string import Template
from pathlib import Path
load_dotenv() load_dotenv()
@ -77,7 +78,8 @@ else:
### Template substitution for the portainer stack deployment ### ### Template substitution for the portainer stack deployment ###
portainer_deploy_json = None portainer_deploy_json = None
with open('portainer_deploy.template.json', 'r') as file: template_file = f'{Path( __file__ ).parent.absolute()}/portainer_deploy.template.json'
with open(template_file, 'r') as file:
portainer_template = Template(file.read()) portainer_template = Template(file.read())
# Perform variable substitution # Perform variable substitution