Skip to main content

No project description provided

Project description

GitlabBot

Flux-local

Bot User

Setup your bot account and generate a PAT token. Then, add the bot to your project with the reporter permission. Finally , store the pat token in the GITLAB_BOT_PAT CI/CD variable.

CI

You can use the following content to setup GitLab CI to post the diff comment.

---
.flux-local-diff:
  stage: flux-local
  image:
    name: ghcr.io/alexsaphir/gitlabbot:v0.2.3
  parallel:
    matrix:
      - FLUX_RESOURCE:
          - hr
          - ks
  variables:
    GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
    CONFIG_FILE: '.gitlabbot.yaml'
  script:
    - |
      DIFF="dyff between --omit-header --ignore-order-changes -o gitlab" \
      flux-local diff $FLUX_RESOURCE -A \
      --path $CLUSTER_PATH \
      --branch-orig main \
      --strip-attrs "helm.sh/chart,checksum/config,app.kubernetes.io/version,chart" \
      --output-file out.diff
    - |
      gitlab-comment --diff_file out.diff \
        --flux_resource $FLUX_RESOURCE \
        --diff_mode dyff \
        --comment_mode $COMMENT_MODE
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"

flux-local-diff:
  extends: .flux-local-diff
  variables:
    CLUSTER_PATH: cluster
    COMMENT_MODE: recreate

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitlabbot-0.2.5.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitlabbot-0.2.5-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file gitlabbot-0.2.5.tar.gz.

File metadata

  • Download URL: gitlabbot-0.2.5.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for gitlabbot-0.2.5.tar.gz
Algorithm Hash digest
SHA256 775e0fc442d57caacf2b438b45c947c5830070e38b8827709bbc5f6df653b771
MD5 c29538f4396653a684b30c41e751c390
BLAKE2b-256 79443a019e17d5a806485121a6459499ab01ab26da7e5da2a46819dc8d1d8b91

See more details on using hashes here.

File details

Details for the file gitlabbot-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: gitlabbot-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for gitlabbot-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4d9f4019992346b43d8733e63468c41ce97be0be63375e0f20e22fff588898d0
MD5 8aa57f512e17144dd299fa3c298f5093
BLAKE2b-256 f8386dbdbd9a4e007eafb6e36a916616ee52eea47ef7d833c38ffd3fdd6a18f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page