diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 59af7c0c94d1134384e10540cfceac976525617e..18d366b29f55e6dc73a39774e911e1f3e6b7f29a 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 e8f635da57233ce31244bfc69c6c200ac1c5462d..22ee1fe4860d945e411b6d2e729e533d55d39166 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: