register-graphql.yml 1.03 KB
Newer Older
1
2
3
4
register_graphql_production:
  stage: post-deploy
  only:
    - master
5
    - tags
6
  variables:
7
    NODE_ENV: production
8
    # APOLLO_KEY: ${APOLLO_KEY}
9
10
  dependencies:
    - build
11
12
13
  before_script:
    - npm i -g apollo
    - npm i -g graphql
14
  script:
15
    - apollo service:push --key="${APOLLO_KEY}"
16
17
18
      --serviceName="${CI_PROJECT_NAME}" --serviceRevision="${CI_COMMIT_TAG}"
      --serviceURL="http://${CI_PROJECT_PATH_SLUG}.${CI_PROJECT_NAMESPACE}:${APP_PORT}/graphql"
      --localSchemaFile=src/schema.gql --tag=${NODE_ENV}
19
20
21
22
23
24

register_graphql_staging:
  stage: post-deploy
  only:
    - master
  variables:
25
    NODE_ENV: staging
26
    # APOLLO_KEY: ${APOLLO_KEY}
27
28
  dependencies:
    - build
29
30
31
  before_script:
    - npm i -g apollo
    - npm i -g graphql
32
  script:
33
    - apollo service:push --key="${APOLLO_KEY}"
34
35
36
37
      --serviceName="${CI_PROJECT_NAME}"
      --serviceRevision="${CI_COMMIT_REF_SLUG}"
      --serviceURL="http://${CI_PROJECT_PATH_SLUG}.${CI_PROJECT_NAMESPACE}:${APP_PORT}/graphql"
      --localSchemaFile=src/schema.gql --tag=${NODE_ENV}