Commit 6eb6a817 authored by Marius DAVID's avatar Marius DAVID
Browse files

updated CI

parent c2b06599
Loading
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -19,12 +19,14 @@ build:
      - nix-cache
  script:
    - NIX_CACHE_HOME=$(pwd)/nix-cache
    - "nix run --extra-experimental-features nix-command --extra-experimental-features flakes nixpkgs/25.05#python3 -- ./tools/merge_data.py ./entries atlas.json"
    - "nix run --extra-experimental-features nix-command --extra-experimental-features flakes nixpkgs/25.05#python3 -- ./tools/merge_data.py ./entries atlas2024.json"
    - "nix run --extra-experimental-features nix-command --extra-experimental-features flakes nixpkgs/25.05#python3 -- ./tools/merge_data.py ./entries2025 atlas2025.json"
  artifacts:
    expire_in: "1 year"
    expose_as: "atlas_json"
    paths:
      - "atlas.json"
      - "atlas2024.json"
      - "atlas2025.json"

comment:
  stage: "comment"
@@ -40,8 +42,9 @@ comment:
    # Here we parse them into URL
    # - DOCUMENTATION_PARSED=$(echo $DOCUMENTATION | sed 's/ /%20/g')
    - NIX_CACHE_HOME=$(pwd)/nix-cache
    - ATLAS_JSON_URL=$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/artifacts/refs/merge-requests/$CI_MERGE_REQUEST_IID/head/raw/atlas.json?job=build
    - BODY="You can preview the data at https://atlas.mariusdavid.fr?atlas=$(nix --extra-experimental-features nix-command --extra-experimental-features flakes run nixpkgs/25.05#urlencode -- $ATLAS_JSON_URL)"
    - ATLAS2024_JSON_URL=$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/artifacts/refs/merge-requests/$CI_MERGE_REQUEST_IID/head/raw/atlas2024.json?job=build
    - ATLAS2025_JSON_URL=$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/artifacts/refs/merge-requests/$CI_MERGE_REQUEST_IID/head/raw/atlas2025.json?job=build
    - BODY="You can preview the data (here for 2024)[https://atlas.mariusdavid.fr?atlas=$(nix --extra-experimental-features nix-command --extra-experimental-features flakes run nixpkgs/25.05#urlencode -- $ATLAS2024_JSON_URL)] and (here for 2025)[https://atlas.mariusdavid.fr?atlas=$(nix --extra-experimental-features nix-command --extra-experimental-features flakes run nixpkgs/25.05#urlencode -- $ATLAS2025_JSON_URL)]."
    - echo $BODY
    # And finally we post them on your merge request!
    - 'curl --request POST --header "PRIVATE-TOKEN: ${GITLAB_CI_COMMENT_API_KEY}" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/notes" --data-urlencode "body=$BODY"'