<@U01JVDKASAC> is it possible to use multiple sst....
# help
k
@Frank is it possible to use multiple sst.json files in one repo? Essentially i want to create another json file called sst-ci-cd.json with the aim of separating out the index.js file for our CI-CD stack and the app stack which live under the same repo. We don’t want to trigger the app to be updated via cloudformation when we add or delete new pipelines. Hope that makes sense
{
“name”: “sst-demo”, “region”: “eu-west-2", “main”: “stacks/index.ts” } the also have the pipeline one`{`
"name": "sst-demo",
"region": "eu-west-2",
"main": "ci-cd-stacks/index.ts"
}
j
Or to be able to override the path for
main
? so from the CLI can we do something like
yarn sst deploy --main 'ci-cd-stacks/index.ts' --stage ci
t
we don't support this currently but we generally don't recommend using checked in files to handle variations in deploy
You should have the logic inside
stacks/index.ts
and do something different depending on the stage or some env variable
You can have multiple sst apps in the same repo but the need to be in different folders
f
@Kuda Zhou just to clarify, would it work for u if the two json files are in different folders?
k
Well in one folder but named differently and if in two different folders how do we handle that?
f
It’s not something I thought thru/recommend, but u could have something like this:
Copy code
/
  backend/
    sst.json
  pipeline/
    sst.json
k
Ok I'll give that a go and see how it behaves. That way the pipeline should only deploy the stacks we target in the deploy command