【Hasura】GitLab CIでmigrateをapplyする
概要
CI
で Hasura
の migrate
を実施するための最小構成
.gitlab-ci.yml
endpoint
と secret
を書き換えることで利用できます
stages:
- migrate
migrate:
stage: migrate
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 migrate apply
only:
refs:
- main
changes:
- migrations/**/*
関連記事
参考文献
Author And Source
この問題について(【Hasura】GitLab CIでmigrateをapplyする), 我々は、より多くの情報をここで見つけました https://qiita.com/knaot0/items/d8b06970157ed7c5306c著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .