Closed fpagnoux closed 6 years ago
Is there a way to make this config? I don't want this in my fork because we don't deploy to those servers.
Is there a way to make this config?
Hmm, CircleCI config is pretty limited. The only way I could see to have a different behavior in the fork would be to use a environment variable, something like:
if [ -n "$DEPLOY" ]; then ssh -o StrictHostKeyChecking=no deploy-legislation-explorer@fr.openfisca.org; fi
(You can only filter deployment by branch, not by organisation)
However, I'm wondering if this would really be a good way to scale continuous deployment for a multi-instance app like the legislation explorer. One solution I could imagine would be, on master merges, to trigger n deployments to deploy the legislation explorer for n countries:
deploy:
docker:
- image: circleci/node:8-jessie-browsers
steps:
- run:
name: Deploy France app
command: ssh -o StrictHostKeyChecking=no deploy-legislation-explorer@fr.openfisca.org
- run:
name: Deploy New Zealand app
command: ssh -o StrictHostKeyChecking=no deploy-legislation-explorer@nz.openfisca.org
- run:
name: Deploy Tunisia app
command: ssh -o StrictHostKeyChecking=no deploy-legislation-explorer@tn.openfisca.org
I have more trouble imagining what workflow could work with forks... Do you have one in mind?
To make sure I understand your need correctly, what is the benefit of using a fork, instead of directly contributing on this repository?
Thanks in advance 🙂
Can you put this bit in an env variable in circle ci:
deploy-legislation-explorer@fr.openfisca.org
Then only deploy if it's set.
So something like:
if [ -n "$DEPLOY_SSH" ]; then ssh -o StrictHostKeyChecking=no $DEPLOY_SSH; fi
Seems a little annoying to scale if we had several servers to deploy to... Ok for now as France seems to be, as of today, the only country interested in continuous deployment.
Ready for review :)
@fpagnoux We use a fork, so we have some control of the deployment. When it's an official NZ government version, we want to know that NZ has some review and control of what deploys there
Ok, makes sense, thanks for the explanation!
Connected to openfisca/openfisca-ops#60 Depends on https://github.com/openfisca/openfisca-ops/pull/61
It works: https://circleci.com/gh/openfisca/legislation-explorer/714