@bifravst/ci 2.0.2 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/dist/ContinuousDeployment.d.ts +2 -1
- package/dist/ContinuousDeployment.js +2 -2
- package/dist/ci.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/loadRepoList.spec.js +2 -2
- package/package.json +17 -16
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
PBSD 3-Clause License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2023-
|
|
3
|
+
Copyright (c) 2023-2025, Nordic Semiconductor ASA | nordicsemi.no
|
|
4
4
|
All rights reserved.
|
|
5
5
|
|
|
6
6
|
Redistribution and use in source and binary forms, with or without
|
|
@@ -2,11 +2,12 @@ import { aws_iam as IAM } from 'aws-cdk-lib';
|
|
|
2
2
|
import { Construct } from 'constructs';
|
|
3
3
|
export declare class ContinuousDeployment extends Construct {
|
|
4
4
|
readonly role: IAM.IRole;
|
|
5
|
-
constructor(parent: Construct, { repository: { owner, repo }, gitHubOICDProviderArn, }: {
|
|
5
|
+
constructor(parent: Construct, { repository: { owner, repo }, gitHubOICDProviderArn, environment, }: {
|
|
6
6
|
repository: {
|
|
7
7
|
owner: string;
|
|
8
8
|
repo: string;
|
|
9
9
|
};
|
|
10
10
|
gitHubOICDProviderArn: string;
|
|
11
|
+
environment?: string;
|
|
11
12
|
});
|
|
12
13
|
}
|
|
@@ -2,14 +2,14 @@ import { Duration, aws_iam as IAM, Stack } from 'aws-cdk-lib';
|
|
|
2
2
|
import { Construct } from 'constructs';
|
|
3
3
|
export class ContinuousDeployment extends Construct {
|
|
4
4
|
role;
|
|
5
|
-
constructor(parent, { repository: { owner, repo }, gitHubOICDProviderArn, }) {
|
|
5
|
+
constructor(parent, { repository: { owner, repo }, gitHubOICDProviderArn, environment, }) {
|
|
6
6
|
super(parent, 'cd');
|
|
7
7
|
const gitHubOIDC = IAM.OpenIdConnectProvider.fromOpenIdConnectProviderArn(this, 'gitHubOICDProvider', gitHubOICDProviderArn);
|
|
8
8
|
this.role = new IAM.Role(this, 'ghRole', {
|
|
9
9
|
roleName: `${Stack.of(this).stackName}-cd`,
|
|
10
10
|
assumedBy: new IAM.WebIdentityPrincipal(gitHubOIDC.openIdConnectProviderArn, {
|
|
11
11
|
StringEquals: {
|
|
12
|
-
[`token.actions.githubusercontent.com:sub`]: `repo:${owner}/${repo}:environment
|
|
12
|
+
[`token.actions.githubusercontent.com:sub`]: `repo:${owner}/${repo}:environment:${environment ?? 'production'}`,
|
|
13
13
|
[`token.actions.githubusercontent.com:aud`]: 'sts.amazonaws.com',
|
|
14
14
|
},
|
|
15
15
|
}),
|
package/dist/ci.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IAMClient } from '@aws-sdk/client-iam';
|
|
2
|
-
import { ensureGitHubOIDCProvider } from './ensureGitHubOIDCProvider.js';
|
|
3
2
|
import { fromEnv } from '@bifravst/from-env';
|
|
4
3
|
import { CIApp } from './CIApp.js';
|
|
4
|
+
import { ensureGitHubOIDCProvider } from './ensureGitHubOIDCProvider.js';
|
|
5
5
|
import { listRepos } from './listRepos.js';
|
|
6
6
|
import { loadRepoList } from './loadRepoList.js';
|
|
7
7
|
const { token } = fromEnv({
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { describe, it } from 'node:test';
|
|
2
1
|
import assert from 'node:assert/strict';
|
|
3
|
-
import { loadRepoList } from './loadRepoList.js';
|
|
4
2
|
import path from 'node:path';
|
|
3
|
+
import { describe, it } from 'node:test';
|
|
4
|
+
import { loadRepoList } from './loadRepoList.js';
|
|
5
5
|
void describe('loadRepoList()', () => {
|
|
6
6
|
void it('should load the list of repos', async () => {
|
|
7
7
|
assert.deepEqual(await loadRepoList(path.join(process.cwd(), 'cdk', 'test', 'repos.txt')), [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifravst/ci",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Sets up the permissions in our CI account for all repositories in this account to be able to use it for CI runs.",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -34,20 +34,21 @@
|
|
|
34
34
|
"author": "Nordic Semiconductor ASA | nordicsemi.no",
|
|
35
35
|
"license": "BSD-3-Clause",
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@bifravst/eslint-config-typescript": "6.1.
|
|
37
|
+
"@bifravst/eslint-config-typescript": "6.1.21",
|
|
38
38
|
"@bifravst/from-env": "3.0.2",
|
|
39
|
-
"@bifravst/prettier-config": "1.
|
|
40
|
-
"@commitlint/config-conventional": "19.
|
|
41
|
-
"@octokit/rest": "21.
|
|
42
|
-
"aws-cdk": "2.
|
|
43
|
-
"aws-cdk-lib": "2.
|
|
44
|
-
"cdk": "2.
|
|
39
|
+
"@bifravst/prettier-config": "1.1.8",
|
|
40
|
+
"@commitlint/config-conventional": "19.8.0",
|
|
41
|
+
"@octokit/rest": "21.1.1",
|
|
42
|
+
"aws-cdk": "2.1004.0",
|
|
43
|
+
"aws-cdk-lib": "2.184.1",
|
|
44
|
+
"cdk": "2.1004.0",
|
|
45
45
|
"check-node-version": "4.2.1",
|
|
46
|
-
"commitlint": "19.
|
|
47
|
-
"constructs": "10.
|
|
46
|
+
"commitlint": "19.8.0",
|
|
47
|
+
"constructs": "10.4.2",
|
|
48
48
|
"globstar": "1.0.0",
|
|
49
|
-
"husky": "9.
|
|
50
|
-
"
|
|
49
|
+
"husky": "9.1.7",
|
|
50
|
+
"lint-staged": "15.5.0",
|
|
51
|
+
"tsx": "4.19.3"
|
|
51
52
|
},
|
|
52
53
|
"lint-staged": {
|
|
53
54
|
"*.{md,json,yaml,yml}": [
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
]
|
|
60
61
|
},
|
|
61
62
|
"engines": {
|
|
62
|
-
"node": ">=
|
|
63
|
+
"node": ">=22",
|
|
63
64
|
"npm": ">=9"
|
|
64
65
|
},
|
|
65
66
|
"release": {
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
[
|
|
79
80
|
"@semantic-release/github",
|
|
80
81
|
{
|
|
81
|
-
"
|
|
82
|
+
"successCommentCondition": false,
|
|
82
83
|
"failTitle": false
|
|
83
84
|
}
|
|
84
85
|
]
|
|
@@ -95,7 +96,7 @@
|
|
|
95
96
|
],
|
|
96
97
|
"prettier": "@bifravst/prettier-config",
|
|
97
98
|
"peerDependencies": {
|
|
98
|
-
"@aws-sdk/client-iam": "^3.
|
|
99
|
-
"chalk": "^5.
|
|
99
|
+
"@aws-sdk/client-iam": "^3.758.0",
|
|
100
|
+
"chalk": "^5.4.1"
|
|
100
101
|
}
|
|
101
102
|
}
|