Skip to content

Commit 050c07d

Browse files
update readme
1 parent ad59437 commit 050c07d

File tree

1 file changed

+80
-38
lines changed

1 file changed

+80
-38
lines changed

README.md

Lines changed: 80 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,59 @@
1-
# csdp-report-image
2-
This repository builds a container image that reports created image to Codefresh, for CI tools use.
3-
Providing parameters is done by having CF_ prefixed environment variables.
1+
# codefresh-report-image
2+
This image allows you to enrich images reported to Codefresh GitOps Platform.
3+
Using this action you are able to report an image to Codefresh and enrich it with valuable information that will be displayed in Codefresh dashboards.
44

5+
### Image Metadata
6+
* Name
7+
* Size
8+
* Operating System and Architecture
9+
* Last Updated date
10+
11+
### Git
12+
Commit that resulted in the image being built
13+
* Repository + Branch
14+
* Commit Message
15+
* Committer
16+
17+
### Build
18+
* Image Size
19+
* Link to Job
20+
21+
### Jira - Associated Jira issue
22+
* Issue ID
23+
* Title
24+
* Assigned to
25+
* Status
26+
27+
## Example - github-actions
28+
```
29+
- name: report image by action
30+
with:
31+
CF_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/my-image-name:tag
32+
CF_ENRICHERS: "jira, git"
33+
CF_HOST: "https://my-runtime-url"
34+
CF_API_KEY: ${{ secrets.CF_TOKEN }}
35+
36+
#Codefresh Integrations to USE
37+
CF_CONTAINER_REGISTRY_INTEGRATION: "dockerhub"
38+
CF_JIRA_INTEGRATION: "jira"
39+
40+
41+
"CF_GITHUB_TOKEN": ${{ secrets.GIT_TOKEN }}
42+
43+
#Github metadata
44+
"CF_GIT_PROVIDER": "github"
45+
"CF_GIT_REPO": "idan-codefresh/example-github-action-use-csdp-report-image"
46+
"CF_GIT_BRANCH": "main"
47+
48+
#Jira issues that match
49+
"CF_JIRA_MESSAGE": "CR-12293"
50+
"CF_JIRA_PROJECT_PREFIX": "CR"
51+
uses: codefresh-io/csdp-report-image@0.0.46
52+
53+
```
54+
55+
56+
# Complete List of Arguments
557
## Required
658
* CF_API_KEY
759
* CF_IMAGE
@@ -20,40 +72,33 @@ For each specific connection (such as jira) parameters can be provided explicitl
2072
* Bellow is the list of all the CF_ environment variables.
2173

2274

75+
### service
76+
- #### CF_HOST
77+
- **description**: The url for reaching you codefresh cluster runtime
78+
- required
79+
- ["example",["https://codefresh.yourdoamin.com:80"]]
80+
- #### CF_API_KEY
81+
- **description**: Codefresh user token - authenticating with the codefresh runtime.
82+
- required
2383
### mandatory
2484
- #### CF_IMAGE
2585
- **description**: Image name reported
2686
- required
87+
- ["examples",["mydockerhub/pushedimage:fix"]]
2788
- #### CF_CONTAINER_REGISTRY_INTEGRATION
2889
- **description**: Registry integration name
29-
- #### CF_DOCKERHUB_PASSWORD
30-
- **description**: When no registry integration is specified: dockerhub token as password
31-
- ["examples",["****"]]
32-
- #### CF_DOCKERHUB_USERNAME
33-
- **description**: When no registry integration is specified: dockerhub username
34-
- ["examples",["username"]]
35-
- #### CF_REGISTRY_PASSWORD
36-
- **description**: When no registry integration is specified: registry token/password
37-
- ["examples",["****"]]
38-
- #### CF_REGISTRY_USERNAME
39-
- **description**: When no registry integration is specified: registry username
40-
- ["examples",["username"]]
41-
- #### CF_REGISTRY_DOMAIN
42-
- **description**: When no registry integration is specified: registry domain
43-
- ["examples",["quay.com"]]
4490
- #### CF_ENRICHERS
45-
- **description**: List of integrations for collecting metadata on the build image
46-
- #### CF_REGISTRY_INSECURE
47-
- **description**:
48-
- #### CF_WORKFLOW_NAME
49-
- **description**: Given workflow name parameter.
91+
- **description**: List of integrations for collecting metadata on the build image, specify blank for no integrated services, by default does both jira and git
92+
- ["examples",["jira, git"]]
5093
- #### CF_WORKFLOW_URL
5194
- **description**: Reported url of the workflow building the image.
5295
- ["examples",["https://github.com/saffi-codefresh/csdp-report-image-github-action/actions/runs/2389116616"]]
53-
- #### CF_LOGS_URL
54-
- **description**: Logs url
96+
- #### CF_WORKFLOW_NAME
97+
- **description**: Given workflow name parameter, Optional name to appear on codefresh platform page.
98+
- ["examples",["Staging build step"]]
5599
- #### CF_CI_TYPE
56-
- **description**: Name of integration type i.e: git-action
100+
- **description**: Name of integration type, used for filtering results by the reporting tool type
101+
- ["examples",["git-action","classic","jenkins",""]]
57102
### git
58103
- #### CF_GIT_BRANCH
59104
- **description**: The git branch which is related for the commit
@@ -66,12 +111,20 @@ For each specific connection (such as jira) parameters can be provided explicitl
66111
- required
67112
### github
68113
- #### CF_GITHUB_TOKEN
69-
- **description**: Github authentication token
114+
- **description**: When explicit authentication used: For github use, authenticate with a github-token
70115
- required
71116
- ["examples",["ghp_vVvA6oh5iCO...."]]
72117
- #### CF_GITHUB_API_URL
73118
- **description**: Specify github host api url
74119
- ["examples",["https://api.github.com"]]
120+
### gitlab
121+
- #### CF_GITLAB_TOKEN
122+
- **description**: When explicit authentication used: For gitlab use, authenticate with a gitlab-token
123+
- required
124+
- ["examples",["glpat-CzJ...."]]
125+
- #### GITLAB_HOST_URL
126+
- **description**: Specify gitlab host url
127+
- ["examples",["https://gitlab.com"]]
75128
### jira
76129
- #### CF_JIRA_PROJECT_PREFIX
77130
- **description**: Jira prefix for identifying the ticket number to use
@@ -85,14 +138,3 @@ For each specific connection (such as jira) parameters can be provided explicitl
85138
- **description**: Fail pipeline if 'issue' not found
86139
- #### CF_JIRA_INTEGRATION
87140
- **description**: When jira integration name is specified instead of providing explicit credentials
88-
### explicit-jira-setup
89-
- #### CF_JIRA_API_TOKEN
90-
- **description**: When no jira integration is specified: Jira token for authenticating
91-
- required
92-
- #### CF_JIRA_EMAIL
93-
- **description**: When no jira integration is specified: user email for authenticating with jira
94-
- required
95-
- #### CF_JIRA_HOST_URL
96-
- **description**: When no jira integration is specified: The jira server url
97-
- required
98-
- ["examples",["https://codefresh-io.atlassian.net"]]

0 commit comments

Comments
 (0)