Skip to content

Commit

Permalink
ci: enable docker access
Browse files Browse the repository at this point in the history
Tests need docker access actually, needed to follow instructions here
projen/projen#2094 to enable this.
  • Loading branch information
berenddeboer committed Sep 16, 2022
1 parent 8fca2ff commit 7d20fbb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .github/workflows/release.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .github/workflows/upgrade-main.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion .projenrc.ts
@@ -1,4 +1,4 @@
import { awscdk } from "projen"
import { awscdk, JsonPatch } from "projen"

const tmpDirectories = ["cdk.context.json", ".idea/", "cdk.out/", ".envrc"]

Expand Down Expand Up @@ -37,6 +37,12 @@ const project = new awscdk.AwsCdkConstructLibrary({
"source-map-support",
],
devDeps: ["@types/ms", "@types/pg", "@types/aws-lambda", "testcontainers", "esbuild"],
workflowBootstrapSteps: [
{
name: "Change permissions on /var/run/docker.sock",
run: "sudo chown superchain /var/run/docker.sock",
},
],
})
project.addGitIgnore("*~")
if (project.eslint) {
Expand All @@ -45,4 +51,8 @@ if (project.eslint) {
quotes: ["error", "double"],
})
}
const buildWorkflow = project.tryFindObjectFile(".github/workflows/build.yml")
if (buildWorkflow && buildWorkflow.patch) {
buildWorkflow.patch(JsonPatch.add("/jobs/build/container/options", "--group-add sudo"))
}
project.synth()

0 comments on commit 7d20fbb

Please sign in to comment.