Commit 9fbe5f0d authored by Jan Kiene's avatar Jan Kiene
Browse files

try CI_JOB_TOKEN again

parent 0c13d130
Loading
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -38,6 +38,17 @@ check-merged-ci-config-is-valid:
    - if [ "$REPO" == "ivas-codec" ]; then repo_url=$REPO_URL_FLOAT; project_id=$PROJECT_ID_FLOAT; fi
    - if [ "$REPO" == "ivas-basop" ]; then repo_url=$REPO_URL_BASOP; project_id=$PROJECT_ID_BASOP; fi

    # for testing
    - |
      curl -H "JOB-TOKEN: $CI_JOB_TOKEN" "https://forge.3gpp.org/rep/api/v4/projects/$project_id/repository/files/.gitlab-ci.yml"

    - |
      curl -X POST \
        -H "Content-Type: application/json" \
        -H "JOB-TOKEN: $CI_JOB_TOKEN" \
        --data '{"content": "stages: [test]\n"}' \
        "https://forge.3gpp.org/rep/api/v4/projects/$project_id/ci/lint?include_merged_yaml=true"

    # get the CI file from the respective repo without lengthy clone
    - test_yml="$REPO-ci.yml"
    - curl -sS --url "$repo_url/./raw/main/.gitlab-ci.yml?inline=false" --output $test_yml
@@ -48,7 +59,8 @@ check-merged-ci-config-is-valid:
      | curl -sS -X POST \
             --url "https://forge.3gpp.org/rep/api/v4/projects/$project_id/ci/lint?include_merged_yaml=true" \
             -H "Content-Type: application/json" \
             -H "PRIVATE-TOKEN: $LINT_TOKEN_FLOAT" \
             # -H "PRIVATE-TOKEN: $LINT_TOKEN_FLOAT" \
             -H "JOB-TOKEN: $CI_JOB_TOKEN" \
             --output $BASELINE_RESPONSE \
             --data-binary @-

@@ -59,7 +71,8 @@ check-merged-ci-config-is-valid:
      | curl -sS -X POST \
             --url "https://forge.3gpp.org/rep/api/v4/projects/$project_id/ci/lint?include_merged_yaml=true" \
             -H "Content-Type: application/json" \
             -H "PRIVATE-TOKEN: $LINT_TOKEN_FLOAT" \
             # -H "PRIVATE-TOKEN: $LINT_TOKEN_FLOAT" \
             -H "JOB-TOKEN: $CI_JOB_TOKEN" \
             --output $MERGED_RESPONSE \
             --data-binary @-