-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
68 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,53 @@ | ||
import { App, CheckoutJob, Stack, Workflow } from "cdkactions"; | ||
import { App, CheckoutJob, Stack, Workflow } from "cdkactions" | ||
import { CDKPublishStack } from "@pennlabs/kraken" | ||
import { Construct } from "constructs"; | ||
import { DjangoBaseDockerStack, DockerPublishStack, ShibbolethDockerStack } from "./docker"; | ||
import { Construct } from "constructs" | ||
import { | ||
DjangoBaseDockerStack, | ||
DockerPublishStack, | ||
ShibbolethDockerStack, | ||
} from "./docker" | ||
|
||
class TerraformLintStack extends Stack { | ||
constructor(scope: Construct, name: string) { | ||
super(scope, name); | ||
constructor(scope: Construct, name: string) { | ||
super(scope, name) | ||
|
||
const workflow = new Workflow(this, 'terraform', { | ||
name: 'Lint terraform files', | ||
on: { | ||
push: { | ||
paths: ['terraform/**.tf'] | ||
} | ||
}, | ||
}); | ||
const workflow = new Workflow(this, "terraform", { | ||
name: "Lint terraform files", | ||
on: { | ||
push: { | ||
paths: ["terraform/**.tf"], | ||
}, | ||
}, | ||
}) | ||
|
||
new CheckoutJob(workflow, 'lint', { | ||
runsOn: 'ubuntu-latest', | ||
steps: [ | ||
{ | ||
uses: 'hashicorp/setup-terraform@v1' | ||
}, | ||
{ | ||
run: 'terraform fmt -check -recursive terraform' | ||
} | ||
], | ||
}); | ||
} | ||
new CheckoutJob(workflow, "lint", { | ||
runsOn: "ubuntu-latest", | ||
steps: [ | ||
{ | ||
uses: "hashicorp/setup-terraform@v1", | ||
}, | ||
{ | ||
run: "terraform fmt -check -recursive terraform", | ||
}, | ||
], | ||
}) | ||
} | ||
} | ||
|
||
const app = new App(); | ||
const app = new App() | ||
|
||
// CDK stacks | ||
new CDKPublishStack(app, 'kraken'); | ||
new CDKPublishStack(app, 'kittyhawk'); | ||
new CDKPublishStack(app, "kraken") | ||
new CDKPublishStack(app, "kittyhawk") | ||
|
||
// Docker stacks | ||
const dockerImages = ['datadog-agent', 'pg-s3-backup', 'team-sync']; | ||
dockerImages.map(name => new DockerPublishStack(app, name)); | ||
new DjangoBaseDockerStack(app, {pythonVersions: ['3.9.14', '3.8.5', '3.10.1', '3.11']}); | ||
new ShibbolethDockerStack(app); | ||
const dockerImages = ["datadog-agent", "pg-s3-backup", "team-sync"] | ||
dockerImages.map((name) => new DockerPublishStack(app, name)) | ||
new DjangoBaseDockerStack(app, { | ||
pythonVersions: ["3.9.14", "3.8.5", "3.10.1", "3.11"], | ||
}) | ||
new ShibbolethDockerStack(app) | ||
|
||
// Misc stacks | ||
new TerraformLintStack(app, 'terraform'); | ||
app.synth(); | ||
new TerraformLintStack(app, "terraform") | ||
app.synth() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters