4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Hasura】GitLab CIでmetadataをapplyする

Posted at

概要

CIHasurametadata を実施するための最小構成

.gitlab-ci.yml

endpointsecret を書き換えることで利用できます

stages:
  - metadata

metadata:
  stage: metadata
  image:
    name: hasura/graphql-engine:v1.3.0.cli-migrations-v2
    # イメージのエントリポイントをオーバーライドする
    # https://gitlab-docs.creationline.com/ee/ci/docker/using_docker_images.html#overriding-the-entrypoint-of-an-image
    entrypoint: ["/bin/sh", "-c"]
  variables:
    # TODO: `endpoint` を書き換えてください
    HASURA_GRAPHQL_ENDPOINT: "https://my-endpoint.com"
    # TODO: `secret` を書き換えてください
    # NOTE: 実際に設定する際は、`CI > Variables` より設定してください
    HASURA_GRAPHQL_ADMIN_SECRET: "myadminsecretkey"
  script:
    - hasura-cli metadata apply
  only:
    refs:
      - main
    changes:
      - metadata/*

関連記事

参考文献

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?