Skip to content

Commit 06e132b

Browse files
git revision (#506)
1 parent 3d0ef0f commit 06e132b

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

workflows/codefresh-csdp/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## v1.1.8 (28.02.2023)
44
* Using @codefresh-io/cf-report-image-toolbox library
5+
* Adding commit sha as `revision` input
56

67
## v1.1.7 (16.01.2023)
78
### report-image-info

workflows/codefresh-csdp/versions/1.1.8/docs/image-enricher-git-info.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Enrich images with metadata and annotation such as PR, commits, committers.
1010
* GIT_PROVIDER (required) - One of the supported git providers: github, gitlab, bitbucket, bitbucket-server
1111
* BRANCH (required) - The git branch to use to enrich
1212
* REPO (required) - The repo to use to enrich
13+
* REVISION - The commit sha to use to enrich
1314
* CF_API_KEY (required) - The Kubernetes secret containing the Codefresh API key created by **runtime**
1415
* CF_API_KEY_SECRET_KEY (optional) - The key in the Kubernetes secret that has the Codefresh API key created by **runtime**. Default is 'token'
1516
* CF_HOST_URL (optional) - The URL to reach Codefresh (support on-premises Codefresh). Default is 'https://g.codefresh.io'
@@ -61,6 +62,8 @@ spec:
6162
value: 'codefresh/cfstep-helm'
6263
- name: BRANCH
6364
value: 'main'
65+
- name: REVISION
66+
value: 'ec8cdced58869a9cbd315a1297a702bbd744a9ed'
6467
- name: GITHUB_TOKEN_SECRET_NAME
6568
value: 'github-creds'
6669
- name: GITHUB_TOKEN_SECRET_KEY

workflows/codefresh-csdp/versions/1.1.8/images/image-enricher-git-info/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"node": "18.12.1"
1010
},
1111
"dependencies": {
12-
"@codefresh-io/cf-report-image-toolbox": "^1.0.0",
12+
"@codefresh-io/cf-report-image-toolbox": "^1.0.3",
1313
"joi": "^17.6.0",
1414
"lodash": "^4.17.21"
1515
}

workflows/codefresh-csdp/versions/1.1.8/images/image-enricher-git-info/src/configuration/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const inputs = {
2020
imageName: process.env.IMAGE_NAME?.trim(),
2121
repo: process.env.REPO?.trim(),
2222
branch: process.env.BRANCH?.trim(),
23+
revision: process.env.REVISION?.trim(),
2324

2425
// github
2526
githubApiHost: process.env.GITHUB_API_HOST_URL?.trim() || 'https://api.github.com',
@@ -46,6 +47,7 @@ const schema = Joi.object({
4647
IMAGE_NAME: Joi.string().required(),
4748
REPO: Joi.string().required(),
4849
BRANCH: Joi.string().required(),
50+
REVISION: Joi.string(),
4951

5052
// others
5153
CF_COMMITS_BY_USER_LIMIT: Joi.number(),

workflows/codefresh-csdp/versions/1.1.8/images/image-enricher-git-info/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -665,10 +665,10 @@
665665
"@aws-sdk/util-buffer-from" "3.208.0"
666666
tslib "^2.3.1"
667667

668-
"@codefresh-io/cf-report-image-toolbox@^1.0.0":
669-
version "1.0.0"
670-
resolved "https://registry.yarnpkg.com/@codefresh-io/cf-report-image-toolbox/-/cf-report-image-toolbox-1.0.0.tgz#3f8c6394e5e82d044826f2d751b04a9c776b153f"
671-
integrity sha512-LncgfLcTv+M4aPqOl+rUU0PoMIwRP1pe6OIvd9yAiZYC52cY5FV7gfApGrKFtGtTMqbLK4MBW2/f03DzF4qp2Q==
668+
"@codefresh-io/cf-report-image-toolbox@^1.0.3":
669+
version "1.0.3"
670+
resolved "https://registry.yarnpkg.com/@codefresh-io/cf-report-image-toolbox/-/cf-report-image-toolbox-1.0.3.tgz#e82ac7712a9c1f970b91f8f59d9f23b9093f112e"
671+
integrity sha512-wwsKPAMEcu06hu5xRadNKMlO+XMh/Mwvydym2QHBewtaXu18LlM6DAABIiipsNNckhPmA0eOQRfUPlKkM3mGhg==
672672
dependencies:
673673
"@aws-sdk/client-sts" "^3.272.0"
674674
"@codefresh-io/docker-reference" "^0.0.11"

0 commit comments

Comments
 (0)