Commit 1df8474b authored by Jan Kiene's avatar Jan Kiene
Browse files

comment out debug code for now

parent 01bb3b9e
Loading
Loading
Loading
Loading
+18 −18
Original line number Diff line number Diff line
@@ -48,13 +48,13 @@ check-merged-ci-config-is-valid:

    # Get CI file from the respective repo
    - curl -sS --url "${repo_url}/-/raw/main/.gitlab-ci.yml?inline=false" --output $TEST_YML
    - echo "=== Original CI file ==="
    - cat $TEST_YML

    - |
      echo "Target branch SHA: $CI_MERGE_REQUEST_TARGET_BRANCH_SHA"
    - |
      echo "Current commit SHA: $CI_COMMIT_SHA"
    # - echo "=== Original CI file ==="
    # - cat $TEST_YML
    #
    # - |
    #   echo "Target branch SHA: $CI_MERGE_REQUEST_TARGET_BRANCH_SHA"
    # - |
    #   echo "Current commit SHA: $CI_COMMIT_SHA"
 
    - git fetch origin
    - git checkout $CI_COMMIT_REF_NAME
@@ -63,15 +63,15 @@ check-merged-ci-config-is-valid:
    - sed -i '/^include:/,$d' $BASE_YML
    - |
      echo -e "include:\n  - local: ${patch_yml}" >> $BASE_YML
    - echo "=== Baseline CI file (target branch) ==="
    - cat $BASE_YML
    # - echo "=== Baseline CI file (target branch) ==="
    # - cat $BASE_YML

    # Debug: Check if files actually differ between refs
    - echo "=== Checking ${patch_yml} at both refs ==="
    - |
      curl -sS "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/repository/files/${patch_yml}?ref=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA}" -H "PRIVATE-TOKEN: $CI_LINT_TOKEN" | jq -r .content | base64 -d | sha256sum
    - |
      curl -sS "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/repository/files/${patch_yml}?ref=${CI_COMMIT_SHA}" -H "PRIVATE-TOKEN: $CI_LINT_TOKEN" | jq -r .content | base64 -d | sha256sum
    # - echo "=== Checking ${patch_yml} at both refs ==="
    # - |
    #   curl -sS "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/repository/files/${patch_yml}?ref=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA}" -H "PRIVATE-TOKEN: $CI_LINT_TOKEN" | jq -r .content | base64 -d | sha256sum
    # - |
    #   curl -sS "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/repository/files/${patch_yml}?ref=${CI_COMMIT_SHA}" -H "PRIVATE-TOKEN: $CI_LINT_TOKEN" | jq -r .content | base64 -d | sha256sum

    # Get merged baseline with target branch ref
    - |
@@ -99,12 +99,12 @@ check-merged-ci-config-is-valid:
    - sed -i '/^include:/,$d' $TEST_YML
    - |
      echo -e "include:\n  - local: ${patch_yml}" >> $TEST_YML
    - echo "=== Current CI file (feature branch) ==="
    - cat $TEST_YML
    # - echo "=== Current CI file (feature branch) ==="
    # - cat $TEST_YML

    # Show what the local file looks like
    - echo "=== First 50 lines of ${patch_yml} ==="
    - head -n 50 $patch_yml
    # - echo "=== First 50 lines of ${patch_yml} ==="
    # - head -n 50 $patch_yml

    # Get current with feature branch ref
    - |