@bifravst/ci
Advanced tools
Comparing version 2.0.2 to 2.1.0
import { IAMClient } from '@aws-sdk/client-iam'; | ||
import { ensureGitHubOIDCProvider } from './ensureGitHubOIDCProvider.js'; | ||
import { fromEnv } from '@bifravst/from-env'; | ||
import { CIApp } from './CIApp.js'; | ||
import { ensureGitHubOIDCProvider } from './ensureGitHubOIDCProvider.js'; | ||
import { listRepos } from './listRepos.js'; | ||
@@ -6,0 +6,0 @@ import { loadRepoList } from './loadRepoList.js'; |
@@ -5,3 +5,3 @@ import { aws_iam as IAM } from 'aws-cdk-lib'; | ||
readonly role: IAM.IRole; | ||
constructor(parent: Construct, { repository: { owner, repo }, gitHubOICDProviderArn, }: { | ||
constructor(parent: Construct, { repository: { owner, repo }, gitHubOICDProviderArn, environment, }: { | ||
repository: { | ||
@@ -12,3 +12,4 @@ owner: string; | ||
gitHubOICDProviderArn: string; | ||
environment?: string; | ||
}); | ||
} |
@@ -5,3 +5,3 @@ import { Duration, aws_iam as IAM, Stack } from 'aws-cdk-lib'; | ||
role; | ||
constructor(parent, { repository: { owner, repo }, gitHubOICDProviderArn, }) { | ||
constructor(parent, { repository: { owner, repo }, gitHubOICDProviderArn, environment, }) { | ||
super(parent, 'cd'); | ||
@@ -13,3 +13,3 @@ const gitHubOIDC = IAM.OpenIdConnectProvider.fromOpenIdConnectProviderArn(this, 'gitHubOICDProvider', gitHubOICDProviderArn); | ||
StringEquals: { | ||
[`token.actions.githubusercontent.com:sub`]: `repo:${owner}/${repo}:environment:production`, | ||
[`token.actions.githubusercontent.com:sub`]: `repo:${owner}/${repo}:environment:${environment ?? 'production'}`, | ||
[`token.actions.githubusercontent.com:aud`]: 'sts.amazonaws.com', | ||
@@ -16,0 +16,0 @@ }, |
export * from './ContinuousDeployment.js'; | ||
export * from './ensureGitHubOIDCProvider.js'; | ||
export * from './RepoPermission.js'; | ||
export * from './ensureGitHubOIDCProvider.js'; |
export * from './ContinuousDeployment.js'; | ||
export * from './ensureGitHubOIDCProvider.js'; | ||
export * from './RepoPermission.js'; | ||
export * from './ensureGitHubOIDCProvider.js'; |
@@ -0,5 +1,5 @@ | ||
import assert from 'node:assert/strict'; | ||
import path from 'node:path'; | ||
import { describe, it } from 'node:test'; | ||
import assert from 'node:assert/strict'; | ||
import { loadRepoList } from './loadRepoList.js'; | ||
import path from 'node:path'; | ||
void describe('loadRepoList()', () => { | ||
@@ -6,0 +6,0 @@ void it('should load the list of repos', async () => { |
{ | ||
"name": "@bifravst/ci", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "Sets up the permissions in our CI account for all repositories in this account to be able to use it for CI runs.", | ||
@@ -37,16 +37,16 @@ "exports": { | ||
"devDependencies": { | ||
"@bifravst/eslint-config-typescript": "6.1.9", | ||
"@bifravst/eslint-config-typescript": "6.1.19", | ||
"@bifravst/from-env": "3.0.2", | ||
"@bifravst/prettier-config": "1.0.4", | ||
"@commitlint/config-conventional": "19.2.2", | ||
"@octokit/rest": "21.0.0", | ||
"aws-cdk": "2.149.0", | ||
"aws-cdk-lib": "2.149.0", | ||
"cdk": "2.149.0", | ||
"@bifravst/prettier-config": "1.1.4", | ||
"@commitlint/config-conventional": "19.6.0", | ||
"@octokit/rest": "21.0.2", | ||
"aws-cdk": "2.173.0", | ||
"aws-cdk-lib": "2.173.0", | ||
"cdk": "2.173.0", | ||
"check-node-version": "4.2.1", | ||
"commitlint": "19.3.0", | ||
"constructs": "10.3.0", | ||
"commitlint": "19.6.0", | ||
"constructs": "10.4.2", | ||
"globstar": "1.0.0", | ||
"husky": "9.0.11", | ||
"tsx": "4.16.2" | ||
"husky": "9.1.7", | ||
"tsx": "4.19.2" | ||
}, | ||
@@ -63,3 +63,3 @@ "lint-staged": { | ||
"engines": { | ||
"node": ">=20", | ||
"node": ">=22", | ||
"npm": ">=9" | ||
@@ -83,3 +83,3 @@ }, | ||
{ | ||
"successComment": false, | ||
"successCommentCondition": false, | ||
"failTitle": false | ||
@@ -101,5 +101,5 @@ } | ||
"peerDependencies": { | ||
"@aws-sdk/client-iam": "^3.614.0", | ||
"@aws-sdk/client-iam": "^3.709.0", | ||
"chalk": "^5.3.0" | ||
} | ||
} |
15612
239