Integrasi

Publish Release otomatis dari CI

Tambah job notify ke workflow CI — release tercatat di Oprex otomatis tiap deploy.

Diperbarui 2026-07-28

Publish Release otomatis dari CI

Setup

  1. Dapatkan OPREX_INGEST_KEY dari Pengaturan → API Keys di member.oprex.id
  2. Set sebagai CI/CD variable di repository Anda (Settings → CI/CD → Variables), masked
  3. Tambah job ke workflow CI:
publish-release:
  stage: notify
  when: on_success
  allow_failure: true
  image: alpine:latest
  before_script:
    - apk add --no-cache curl jq
  script:
    - |
      curl -sS -X POST "https://oprex.id/api/v1/releases" \
        -H "X-Oprex-Key: $OPREX_INGEST_KEY" \
        -H "Content-Type: application/json" \
        -d "{
          \"appKey\": \"$CI_PROJECT_NAME\",
          \"version\": \"$CI_COMMIT_SHORT_SHA\",
          \"title\": \"$CI_COMMIT_TITLE\"
        }"yaml

Script lengkap (idempotent, dgn validation): oprex-publish-release.sh

Belum menemukan jawaban? Hubungi kami