Skip to content

Commit

Permalink
Merge pull request #35 from backstage/djam/remove-quickstart
Browse files Browse the repository at this point in the history
chore: remove quickstart from backstage-deploy
  • Loading branch information
djamaile committed Jan 15, 2024
2 parents 9004a6e + c94c517 commit 057db08
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 31 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# backstage-deploy

## 0.4.0

### Minor Changes

- Remove all related quickstart functionality. Please refer to the [PR](https://github.com/backstage/backstage-deploy/pull/35) for more information.

## 0.3.2

- Remove trailing slash in container service host url if present
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "backstage-deploy",
"description": "CLI for Backstage deployment tooling",
"version": "0.3.2",
"version": "0.4.0",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion src/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default async (opts: OptionValues) => {
}
}

const shouldBuildApp = !opts.skipBuild && !opts.destroy && !opts.quickstart;
const shouldBuildApp = !opts.skipBuild && !opts.destroy;
if (shouldBuildApp) {
// run yarn tsc & yarn build for Dockerfile
Task.section(`Building app`);
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ const main = (argv: string[]) => {
'./.env',
)
.option('--with-db', 'Deploy a Backstage instance with a database', false)
.option('--quickstart', 'Deploys a quickstart instance', false)
.option('--image-uri <image-uri>', 'Url of Docker image')
.action(cmd => deploy(cmd));

Expand Down
38 changes: 10 additions & 28 deletions src/programs/aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ export const AWSProgram = (opts: OptionValues) => {
}

let db: Database | undefined = undefined;
if (opts.withDb || opts.quickstart) {
const DB_ENV_NAME = opts.quickstart
? 'QUICKSTART_SECRET_DATABASE_PASSWORD'
: 'DATABASE_PASSWORD';
if (opts.withDb) {
const DB_ENV_NAME = 'DATABASE_PASSWORD';
if (!providedEnvironmentVariables[DB_ENV_NAME]) {
throw new Error(`Environment variable ${DB_ENV_NAME} is not set`);
}
Expand Down Expand Up @@ -168,22 +166,12 @@ export const AWSProgram = (opts: OptionValues) => {
),
});

const DB_ENVS: Record<string, pulumi.Output<string> | undefined> =
opts.quickstart
? {
QUICKSTART_DATABASE_HOST: db?.masterEndpointAddress,
QUICKSTART_DATABASE_PORT: db?.masterEndpointPort.apply(v =>
v.toString(),
),
QUICKSTART_DATABASE_USER: db?.masterUsername,
QUICKSTART_SECRET_DATABASE_PASSWORD: db?.masterPassword,
}
: {
DATABASE_HOST: db?.masterEndpointAddress,
DATABASE_PORT: db?.masterEndpointPort.apply(v => v.toString()),
DATABASE_USER: db?.masterUsername,
DATABASE_PASSWORD: db?.masterPassword,
};
const DB_ENVS: Record<string, pulumi.Output<string> | undefined> = {
DATABASE_HOST: db?.masterEndpointAddress,
DATABASE_PORT: db?.masterEndpointPort.apply(v => v.toString()),
DATABASE_USER: db?.masterUsername,
DATABASE_PASSWORD: db?.masterPassword,
};

const containerServiceUrl = containerService.url.apply(url =>
url.endsWith('/') ? url.slice(0, -1) : url,
Expand All @@ -202,15 +190,9 @@ export const AWSProgram = (opts: OptionValues) => {
'7007': 'HTTP',
},
environment: {
...(opts.quickstart
? {
APP_CONFIG_app_baseUrl: containerService.url,
}
: {
BACKSTAGE_HOST: containerServiceUrl,
}),
BACKSTAGE_HOST: containerServiceUrl,
...providedEnvironmentVariables,
...(opts.withDb || opts.quickstart ? DB_ENVS : {}),
...(opts.withDb ? DB_ENVS : {}),
},
},
],
Expand Down

0 comments on commit 057db08

Please sign in to comment.