Skip to content
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ docker run -d \
-e DATABASE_URL=postgresql://user:pass@host:5432/forge \
-e REDIS_URL=redis://host:6379/0 \
-e ENCRYPTION_KEY=your-32-char-encryption-key \
-e DEFAULT_PROVIDER=aws-codebuild \
-e DEFAULT_PROVIDER=aws.code-build \
-e OBJECT_STORAGE_URL=http://object-storage:52010 \
-e LOG_BUCKET_NAME=logs \
-e ARTIFACT_BUCKET_NAME=artifacts \
Expand Down Expand Up @@ -80,7 +80,7 @@ services:
REDIS_URL: redis://redis:6379/0

ENCRYPTION_KEY: ${ENCRYPTION_KEY}
DEFAULT_PROVIDER: aws-codebuild
DEFAULT_PROVIDER: aws.code-build

OBJECT_STORAGE_URL: http://object-storage:52010
LOG_BUCKET_NAME: logs
Expand Down
2 changes: 1 addition & 1 deletion service/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ DATABASE_URL=postgresql://forge:forge@postgres:5432/forge
REDIS_URL=redis://redis:6379

# Provider Configuration
DEFAULT_PROVIDER=aws-codebuild
DEFAULT_PROVIDER=aws.code-build

# AWS CodeBuild Configuration (optional)
CODE_BUILD_AWS_REGION=
Expand Down
2 changes: 1 addition & 1 deletion service/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export let env = createValidatedEnv({
},

provider: {
DEFAULT_PROVIDER: v.enumOf(['aws-code-build'])
DEFAULT_PROVIDER: v.enumOf(['aws.code-build'])
},

codeBuild: {
Expand Down
18 changes: 9 additions & 9 deletions service/src/presenters/workflowVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@ import type {
} from '../../prisma/generated/client';

export let workflowVersionPresenter = (
artifact: WorkflowVersion & {
version: WorkflowVersion & {
steps: (WorkflowVersionStep & {
artifactToDownload: WorkflowArtifact | null;
})[];
workflow: Workflow;
}
) => ({
object: 'workflow.run',
object: 'workflow.version',

id: artifact.id,
identifier: artifact.identifier,
name: artifact.name,
id: version.id,
identifier: version.identifier,
name: version.name,

workflowId: artifact.workflow.id,
workflowId: version.workflow.id,

steps: artifact.steps.sort((a, b) => a.index - b.index).map(workflowVersionStepPresenter),
steps: version.steps.sort((a, b) => a.index - b.index).map(workflowVersionStepPresenter),

createdAt: artifact.createdAt
createdAt: version.createdAt
});

export let workflowVersionStepPresenter = (
step: WorkflowVersionStep & {
artifactToDownload: WorkflowArtifact | null;
}
) => ({
object: 'workflow.run.step',
object: 'workflow.version.step',

id: step.id,
type: step.type,
Expand Down
4 changes: 2 additions & 2 deletions service/src/providers/aws-codebuild/codeBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CodeBuildClient } from '@aws-sdk/client-codebuild';
import { env } from '../../env';

export let codebuild =
env.provider.DEFAULT_PROVIDER == 'aws-code-build'
env.provider.DEFAULT_PROVIDER == 'aws.code-build'
? new CodeBuildClient({
region: env.codeBuild.CODE_BUILD_AWS_REGION,
credentials:
Expand All @@ -18,7 +18,7 @@ export let codebuild =
: undefined;

export let logsClient =
env.provider.DEFAULT_PROVIDER == 'aws-code-build'
env.provider.DEFAULT_PROVIDER == 'aws.code-build'
? new CloudWatchLogsClient({
region: env.codeBuild.CODE_BUILD_AWS_REGION,
credentials:
Expand Down
5 changes: 5 additions & 0 deletions service/src/providers/aws-codebuild/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,11 @@ let storeOutputCleanupQueueProcessor = storeOutputCleanupQueue.process(async dat
await db.workflowRunOutputTemp.deleteMany({
where: { runOid: data.runOid }
});

await db.workflowRun.updateMany({
where: { oid: data.runOid },
data: { encryptedEnvironmentVariables: '' }
});
});

export let awsCodeBuildProcessors = combineQueueProcessors([
Expand Down
2 changes: 1 addition & 1 deletion service/src/providers/aws-codebuild/role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { once } from '@lowerdeck/once';
import { env } from '../../env';

let iam =
env.provider.DEFAULT_PROVIDER == 'aws-code-build'
env.provider.DEFAULT_PROVIDER == 'aws.code-build'
? new IAMClient({
region: env.codeBuild.CODE_BUILD_AWS_REGION,
credentials:
Expand Down