From 6a0268dab4dd9d788294796f941bef2485041070 Mon Sep 17 00:00:00 2001 From: mavogel <mavogel@cern.ch> Date: Tue, 29 Aug 2023 13:30:36 +0200 Subject: [PATCH] Fixing CI jobs --- .gitlab-ci.yml | 8 ++++---- script-gitlab-ci.yml.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 59af7c0c9..18d366b29 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,9 +9,9 @@ build_x86_64-centos7-gcc11-dbg_dev3: - logs/qmtestCool/$BINARY_TAG before_script: - "echo $BINARY_TAG $CI_COMMIT_REF_NAME" - - "export highest=$(curl --header \"PRIVATE-TOKEN: $PRIVATE_TOKEN\" \"https://gitlab.cern.ch/api/v4/projects/25684/jobs?per_page=100\" | jq \".[] | select(.name == \\\"build_x86_64-centos7-gcc11-dbg_dev3\\\") | select(.ref == \\\"${CI_COMMIT_REF_NAME}\\\") | .id\" | sort -n | tail -1)" + - "export highest=$(curl --header \"JOB-TOKEN: $CI_JOB_TOKEN\" \"https://gitlab.cern.ch/api/v4/projects/25684/jobs?per_page=100\" | jq \".[] | select(.name == \\\"build_x86_64-centos7-gcc11-dbg_dev3\\\") | select(.ref == \\\"${CI_COMMIT_REF_NAME}\\\") | .id\" | sort -n | tail -1)" - "echo $highest" - - "curl -L --header \"PRIVATE-TOKEN: $PRIVATE_TOKEN\" \"https://gitlab.cern.ch/api/v4/projects/25684/jobs/$highest/artifacts\" > coral-build_x86_64-centos7-gcc11-dbg_dev3.zip" + - "curl -L --header \"JOB-TOKEN: $CI_JOB_TOKEN\" \"https://gitlab.cern.ch/api/v4/projects/25684/jobs/$highest/artifacts\" > coral-build_x86_64-centos7-gcc11-dbg_dev3.zip" - "ls -l coral-build_x86_64-centos7-gcc11-dbg_dev3.zip" - "unzip coral-build_x86_64-centos7-gcc11-dbg_dev3.zip -d ./coral" script: @@ -40,9 +40,9 @@ build_x86_64-centos7-gcc11-opt_dev3: - logs/qmtestCool/$BINARY_TAG before_script: - "echo $BINARY_TAG $CI_COMMIT_REF_NAME" - - "export highest=$(curl --header \"PRIVATE-TOKEN: $PRIVATE_TOKEN\" \"https://gitlab.cern.ch/api/v4/projects/25684/jobs?per_page=100\" | jq \".[] | select(.name == \\\"build_x86_64-centos7-gcc11-opt_dev3\\\") | select(.ref == \\\"${CI_COMMIT_REF_NAME}\\\") | .id\" | sort -n | tail -1)" + - "export highest=$(curl --header \"JOB-TOKEN: $CI_JOB_TOKEN\" \"https://gitlab.cern.ch/api/v4/projects/25684/jobs?per_page=100\" | jq \".[] | select(.name == \\\"build_x86_64-centos7-gcc11-opt_dev3\\\") | select(.ref == \\\"${CI_COMMIT_REF_NAME}\\\") | .id\" | sort -n | tail -1)" - "echo $highest" - - "curl -L --header \"PRIVATE-TOKEN: $PRIVATE_TOKEN\" \"https://gitlab.cern.ch/api/v4/projects/25684/jobs/$highest/artifacts\" > coral-build_x86_64-centos7-gcc11-opt_dev3.zip" + - "curl -L --header \"JOB-TOKEN: $CI_JOB_TOKEN\" \"https://gitlab.cern.ch/api/v4/projects/25684/jobs/$highest/artifacts\" > coral-build_x86_64-centos7-gcc11-opt_dev3.zip" - "ls -l coral-build_x86_64-centos7-gcc11-opt_dev3.zip" - "unzip coral-build_x86_64-centos7-gcc11-opt_dev3.zip -d ./coral" script: diff --git a/script-gitlab-ci.yml.py b/script-gitlab-ci.yml.py index e8f635da5..22ee1fe48 100755 --- a/script-gitlab-ci.yml.py +++ b/script-gitlab-ci.yml.py @@ -11,9 +11,9 @@ def build_gitlabci(binary_tag, view, OS): - logs/qmtestCool/$BINARY_TAG before_script: - "echo $BINARY_TAG $CI_COMMIT_REF_NAME" - - "export highest=$(curl --header \\\"PRIVATE-TOKEN: $PRIVATE_TOKEN\\\" \\\"https://gitlab.cern.ch/api/v4/projects/25684/jobs?per_page=100\\\" | jq \\\".[] | select(.name == \\\\\\\"{name}\\\\\\\") | select(.ref == \\\\\\\"${{CI_COMMIT_REF_NAME}}\\\\\\\") | .id\\\" | sort -n | tail -1)" + - "export highest=$(curl --header \\\"JOB-TOKEN: $CI_JOB_TOKEN\\\" \\\"https://gitlab.cern.ch/api/v4/projects/25684/jobs?per_page=100\\\" | jq \\\".[] | select(.name == \\\\\\\"{name}\\\\\\\") | select(.ref == \\\\\\\"${{CI_COMMIT_REF_NAME}}\\\\\\\") | .id\\\" | sort -n | tail -1)" - "echo $highest" - - "curl -L --header \\\"PRIVATE-TOKEN: $PRIVATE_TOKEN\\\" \\\"https://gitlab.cern.ch/api/v4/projects/25684/jobs/$highest/artifacts\\\" > coral-{name}.zip" + - "curl -L --header \\\"JOB-TOKEN: $CI_JOB_TOKEN\\\" \\\"https://gitlab.cern.ch/api/v4/projects/25684/jobs/$highest/artifacts\\\" > coral-{name}.zip" - "ls -l coral-{name}.zip" - "unzip coral-{name}.zip -d ./coral" script: -- GitLab