Sam Hulick
08/02/2021, 12:50 PMyarn start --stage devname
so that it only spins up a specific stack for them to work on, and will properly reference Stack A in a totally different stage?thdxr
08/02/2021, 1:20 PMSam Hulick
08/02/2021, 2:47 PMSam Hulick
08/02/2021, 2:50 PMthdxr
08/02/2021, 3:21 PMscope.local
is true to speed up things as well
That said if you don't feel like that's worth I have an idea for what you can do but haven't fully tested it. Basically you can override the stack name on only the non-shared stacks like so:
new SharedStack(app, "shared")
new Stack(app, "individual", {
stackName: `${app.stage}-${developer_name}`,
})
This should make it so everyone deploys the same stack except for the individual stack. Set stage to dev
or something and pass in developer_name
maybe through an environment variableSam Hulick
08/02/2021, 3:26 PMSharedStack
from getting deployed?
what if I did something like this:
export default function main(app: <http://sst.App|sst.App>): void {
// Set default runtime for all functions
app.setDefaultFunctionProps({
runtime: 'nodejs14.x',
tracing: Tracing.DISABLED,
});
if (['dev', 'prod'].includes(app.stage)) {
new CoreStack(app, 'core');
}
new APIStack(app, 'api');
}
so when a dev runs yarn start --stage $(whoami)
, the core stack won’t get deployedthdxr
08/02/2021, 3:36 PMthdxr
08/02/2021, 3:36 PMdev
stage but then the APIStack
would get a name that's unique to them, forcing a unique deployment per developerSam Hulick
08/02/2021, 3:38 PMSam Hulick
08/02/2021, 3:38 PMthdxr
08/02/2021, 3:38 PMSam Hulick
08/02/2021, 10:54 PMthdxr
08/02/2021, 11:04 PMthdxr
08/02/2021, 11:05 PMSam Hulick
08/02/2021, 11:06 PMSam Hulick
08/02/2021, 11:07 PMthdxr
08/02/2021, 11:08 PMthdxr
08/02/2021, 11:08 PM