Someone already play with continuous integration w...
# prisma-whats-new
a
Someone already play with continuous integration with the graphcool framework ? I cannot deploy because the cli ask me to select my cluster even with the
--target
option I’m using Gitlab and
.gitlab-ci.yml
with the following config
Copy code
deploy_graphcool:
  stage: deploy
  script:
    - 'printf "platformToken: >-\n  $GC_AUTH_TOKEN" > $CI_PROJECT_DIR/.graphcoolrc'
    - npm run gc -- deploy --target prod
And my log from the CI ask me to choose
Copy code
> gc "deploy" "--target" "prod"

? Please choose the cluster you want to deploy to (Use arrow keys)

  Shared Clusters:
❯ shared-eu-west-1 
  shared-ap-northeast-1 
  shared-us-west-2 
                       
  Local (docker):
  local
n
can you show what your
.graphcoolrc
looks like?
a
hum in fact when I add the GC_AUTH_TOKEN I think i override my graphcoolrc file from my project…, just try with a
>>
instead of
>
maybe this will fix it, I didn’t realized it was the same file in the CI and not like the one in the project and the one int the
HOME
dir
👍 1
n
I believe that when you’re passing
--target prod
you need to provide a
.graphcoolrc
that references the
prod
target which could looks as follows:
Copy code
targets:
  default: propd
  prod: shared-us-west-2/cj8n7um5800ot0167tzrqj5r9
a
yes this I have, I just have as default another one for local but I have all this
n
hmmm
a
this command works from my terminal I can deploy in prod with no problem
n
might also be a bug in the CLI then…
a
ok no just finish my build
it was because I didn’t append to the file but replace
-_-'
n
🙃
all right, glad it’s fixed now 👍
a
just have a small warning that makes sense but useless
Copy code
gc "deploy" "--target" "dev"

 ▸    Could not find cluster local defined for target local in
 ▸    /builds/etherstellar/functions/.graphcoolrc.
 ▸    Please run graphcool local up to start the local cluster.
not big deal
anyway for those who want can deploy with the following job in a
.gitlab-ci.yml
Copy code
deploy_graphcool_staging:
  stage: deploy
  script:
    - 'printf "platformToken: >-\n  $GC_AUTH_TOKEN" >> $CI_PROJECT_DIR/.graphcoolrc'
    - npm run gc -- deploy --target dev
👍🏻 1
🙂