Help us understand the problem. What is going on with this article?

GitLab CI で複数のプロジェクトを連携する

More than 3 years have passed since last update.

  • wordpress
  • my-theme
  • my-plugin

WordPressのコアとテーマを別に管理していてテーマやプラグインを更新したらコアをdeployしたい場合。

対象

GitLab 7.14
https://about.gitlab.com/2015/08/22/gitlab-7-14-released/

設定

  1. 連携先(wordpress)でTriggers→Add Trigger。Tokenが表示される。
  2. 連携元(my-theme)の.gitlab-ci.ymlを編集。 TOKENとREF_NAMEはそのまま書き換えるかVariablesを使う。
    REF_NAME=master。
    Variablesを使う場合は${TOKEN}のように書く。
trigger:
  type: deploy
  script:
    - "curl -X POST -F token=${TOKEN} http://gitlab-ci.tsuyoshioka.jp/api/v1/projects/3/refs/${REF_NAME}/trigger"

my-pluginも同じように設定。

これでmy-themeを更新してビルドが通ればwordpressも連携して再ビルドされる。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away