Skip to content

Commit

Permalink
Merge pull request #2538 from vrk-kpa/allow_cloudstorage_to_use_test_…
Browse files Browse the repository at this point in the history
…role

Allow cloudstorage to use test role in aws
  • Loading branch information
Zharktas authored Feb 17, 2025
2 parents ed5b59f + b033340 commit c42da08
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions cdk/bin/opendata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -732,5 +732,6 @@ const ciTestStackBeta = new CiTestStack(app, 'CiTestStack-beta', {
},
githubOrg: "vrk-kpa",
githubRepo: "opendata",
githubRepo2: "ckanext-cloudstorage",
testBucketName: "avoindata-ci-test-bucket"
})
3 changes: 2 additions & 1 deletion cdk/lib/ci-test-stack-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import {StackProps} from "aws-cdk-lib";
export interface CiTestStackProps extends StackProps {
testBucketName: string,
githubOrg: string,
githubRepo: string
githubRepo: string,
githubRepo2: string
}
4 changes: 3 additions & 1 deletion cdk/lib/ci-test-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export class CiTestStack extends Stack {
const testRole = new aws_iam.Role(this, 'TestRole', {
assumedBy: new aws_iam.WebIdentityPrincipal(oidcProviderArn, {
StringLike: {
"token.actions.githubusercontent.com:sub": `repo:${props.githubOrg}/${props.githubRepo}:*`
"token.actions.githubusercontent.com:sub": [
`repo:${props.githubOrg}/${props.githubRepo}:*`,
`repo:${props.githubOrg}/${props.githubRepo2}:*`]
}
})
})
Expand Down

0 comments on commit c42da08

Please sign in to comment.