Skip to content
Snippets Groups Projects
Commit 4cecda39 authored by Adrian Schmitz's avatar Adrian Schmitz
Browse files

Bug fixes

parent b277960a
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ variables: ...@@ -26,7 +26,7 @@ variables:
.local-template: .local-template:
variables: variables:
RUNNER_TAG: "ja664344-dev" RUNNER_TAG: "custom2"
.run-template: .run-template:
stage: run stage: run
......
...@@ -90,11 +90,11 @@ class Job: ...@@ -90,11 +90,11 @@ class Job:
self.rt_utility_path = rep(settings["Runtime Utility Path"]) self.rt_utility_path = rep(settings["Runtime Utility Path"])
self.scripts_path = f'{self.rt_utility_path}/scripts' self.scripts_path = f'{self.rt_utility_path}/scripts'
if self.down_scoping: if self.down_scoping:
try: if (get_cenv('HPC_CI_TOKEN') != None):
uid, pid = jwt.get_UID_PID_ID_TOKEN(get_cenv('HPC_CI_TOKEN'), uid, pid = jwt.get_UID_PID_ID_TOKEN(get_cenv('HPC_CI_TOKEN'),
f"{get_cenv('CI_SERVER_URL')}/-/jwks") f"{get_cenv('CI_SERVER_URL')}/-/jwks")
except: else:
logging.warn("id token HPC_CI_TOKEN, with aud: aixCIlence not defined.") print("WARNING:id token HPC_CI_TOKEN, with aud: aixCIlence not defined.", file=sys.stderr)
try: try:
uid, pid = jwt.get_UID_PID_CI_JOB_JWT(get_cenv('CI_JOB_JWT'), uid, pid = jwt.get_UID_PID_CI_JOB_JWT(get_cenv('CI_JOB_JWT'),
f"{get_cenv('CI_SERVER_URL')}/-/jwks") f"{get_cenv('CI_SERVER_URL')}/-/jwks")
...@@ -112,7 +112,6 @@ class Job: ...@@ -112,7 +112,6 @@ class Job:
else: else:
self.user_path = rep(settings['User Path']) self.user_path = rep(settings['User Path'])
def __setup(self): def __setup(self):
self.__get_config() self.__get_config()
if not self.down_scoping: if not self.down_scoping:
......
...@@ -74,7 +74,8 @@ class Sbatch(Slurm, ABC): ...@@ -74,7 +74,8 @@ class Sbatch(Slurm, ABC):
tmp = os.getenv("TMP") tmp = os.getenv("TMP")
with open(f'{self.job.scripts_path}/batchWrapper.sh', 'r') as file: with open(f'{self.job.scripts_path}/batchWrapper.sh', 'r') as file:
filedata = file.read() filedata = file.read()
filedata = filedata.replace('replaceme', f'{self.job.clone_path}/{get_cenv("BATCH_SCRIPT")}') filedata = filedata.replace('replacesource', f'{self.job.shell_config}')
filedata = filedata.replace('replacescript', f'{self.job.clone_path}/{get_cenv("BATCH_SCRIPT")}')
with open(f'{tmp}/wrapper{self.job.jobid}', 'w') as file: with open(f'{tmp}/wrapper{self.job.jobid}', 'w') as file:
file.write(filedata) file.write(filedata)
return f'{tmp}/wrapper{self.job.jobid}' return f'{tmp}/wrapper{self.job.jobid}'
...@@ -126,7 +127,8 @@ class Default(Sbatch, ABC): ...@@ -126,7 +127,8 @@ class Default(Sbatch, ABC):
tmp = os.getenv("TMP") tmp = os.getenv("TMP")
with open(f'{self.job.scripts_path}/batchWrapper.sh', 'r') as file: with open(f'{self.job.scripts_path}/batchWrapper.sh', 'r') as file:
filedata = file.read() filedata = file.read()
filedata = filedata.replace('replaceme', f'{self.job.clone_path}/script.') filedata = filedata.replace('replacescript', f'{self.job.clone_path}/script.')
filedata = filedata.replace('replacesource', f'{self.job.shell_config}')
with open(f'{tmp}/wrapper{self.job.jobid}', 'w') as file: with open(f'{tmp}/wrapper{self.job.jobid}', 'w') as file:
file.write(filedata) file.write(filedata)
return f'{tmp}/wrapper{self.job.jobid}' return f'{tmp}/wrapper{self.job.jobid}'
......
...@@ -81,7 +81,7 @@ class Singularity_Batch(Default, ABC): ...@@ -81,7 +81,7 @@ class Singularity_Batch(Default, ABC):
tmp = os.getenv("TMP") tmp = os.getenv("TMP")
with open(f'{self.job.runner_path}/utility/runtime/scripts/batchWrapper.sh', 'r') as file: with open(f'{self.job.runner_path}/utility/runtime/scripts/batchWrapper.sh', 'r') as file:
filedata = file.read() filedata = file.read()
filedata = filedata.replace('replaceme', filedata = filedata.replace('replacescript',
f'{self.job.clone_path}/singularity{self.job.jobid}.sh < ' f'{self.job.clone_path}/singularity{self.job.jobid}.sh < '
f'{self.job.clone_path}/script{self.job.jobid}.sh') f'{self.job.clone_path}/script{self.job.jobid}.sh')
with open(f'{tmp}/wrapper{self.job.jobid}', 'w') as file: with open(f'{tmp}/wrapper{self.job.jobid}', 'w') as file:
......
import logging import logging
name = 'AixCIlenz CI Driver' name = 'AixCIlenz CI Driver'
version = '0.5.2' version = '0.5.3'
debug = False debug = False
stdout_logging = False stdout_logging = False
......
...@@ -163,7 +163,7 @@ class Slurm_Executor(Executor, ABC): ...@@ -163,7 +163,7 @@ class Slurm_Executor(Executor, ABC):
allocator=self.get_srun_cmd(), allocator=self.get_srun_cmd(),
params=f'--jobid={self.simple_job_id} {self.get_default_params()} {params}', params=f'--jobid={self.simple_job_id} {self.get_default_params()} {params}',
wrapper_add=wrapper_add, wrapper_add=wrapper_add,
pre_exec_scripts=[self.job.shell_config], #pre_exec_scripts=[self.job.shell_config],
target_script=script, install_env=install_env, target_script=script, install_env=install_env,
text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout
logging.debug(management_out) logging.debug(management_out)
......
#!/usr/bin/zsh #!/usr/bin/zsh
zsh -l replaceme source replacesource
\ No newline at end of file
zsh -l replacescript
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
_path=$1 _path=$1
set -e set -e
while test "$_path" != "/work"; do while test "$_path" != "/work"; do
chmod o+x "$_path" chmod o+rx "$_path"
_path=$(dirname "$_path") _path=$(dirname "$_path")
done done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment