Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no-op] Hotfix to the deploy script and github actions logic #116

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ddn-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
--profile telco \
--override-description "${calculatedSha} [PR-${{ github.event.pull_request.number }}] ${{ github.event.pull_request.title }} | Build for commit ${{ github.event.pull_request.head.sha }}" \
--rebuild-connectors \
--gcp-region gcp-us-west2 \
--override \
--log-level FATAL \
--quiet \
Expand All @@ -86,6 +87,7 @@ jobs:
--context axiom-dev \
--profile telco \
--override-description "${calculatedSha} [PR-${{ github.event.pull_request.number }}] ${{ github.event.pull_request.title }} | Build for commit ${{ github.event.pull_request.head.sha }}" \
--gcp-region gcp-us-west2 \
--override \
--log-level FATAL \
--quiet \
Expand Down
34 changes: 21 additions & 13 deletions scripts/deploy/deploy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class DeploymentManager {
.option('-g, --gcp-region <region>', 'GCP region', null)
.option('-c, --context <context>', 'Deploy context', null)
.option('-p, --profile <profile>', 'Config profile', null)
.option('-r, --rebuild-connectors', 'Rebuild connectors', null)
.option('-f, --full-metadata-build', 'Full metadata rebuild', null)
.option('-r, --rebuild-connectors', 'Rebuild connectors', false)
.option('-f, --full-metadata-build', 'Full metadata rebuild', false)
.option('-x, --override-description <desc>', 'Override description')
.option('-q, --quiet', 'Quiet mode')
.option('-a, --apply-build', 'Auto-apply build', false)
Expand All @@ -42,6 +42,8 @@ class DeploymentManager {
noauth: join(__dirname, 'noauth.hml')
};
this.options = this.program.opts();
// This line is counter-intuitive but required.
this.options.noInteraction = !this.options.interaction;
}

log(level, msg) {
Expand Down Expand Up @@ -146,17 +148,23 @@ class DeploymentManager {
choices: CONFIG.regions
}])).gcpRegion,

fullMetadataBuild: this.options.fullMetadataBuild ?? (this.options.noInteraction ? false :
(await inquirer.prompt([{
type: 'confirm', name: 'fullMetadataBuild',
message: 'Perform full metadata rebuild?', default: false
}])).fullMetadataBuild),

rebuildConnectors: this.options.rebuildConnectors ?? (this.options.noInteraction ? false :
(await inquirer.prompt([{
type: 'confirm', name: 'rebuildConnectors',
message: 'Rebuild all connectors?', default: false
}])).rebuildConnectors)
fullMetadataBuild: this.options.fullMetadataBuild ||
(!this.options.noInteraction &&
(await inquirer.prompt([{
type: 'confirm',
name: 'fullMetadataBuild',
message: 'Perform full metadata rebuild?',
default: false
}])).fullMetadataBuild) || false,

rebuildConnectors: this.options.rebuildConnectors ||
(!this.options.noInteraction &&
(await inquirer.prompt([{
type: 'confirm',
name: 'rebuildConnectors',
message: 'Rebuild all connectors?',
default: false
}])).rebuildConnectors) || false
};

this.log(
Expand Down
Loading