|
| 1 | +# report-image-info |
| 2 | + |
| 3 | +## Summary |
| 4 | +Report image info to argo platform. |
| 5 | + |
| 6 | +## Inputs/Outputs |
| 7 | + |
| 8 | +### Inputs |
| 9 | +* IMAGE_NAME (required) - your image to which you want to report |
| 10 | +* CF_API_KEY (required) - Codefresh API key created by runtime |
| 11 | +* CF_HOST_URL (optional) - support on-premises Codefresh URL |
| 12 | +* WORKFLOW_URL (optional) - external url for the workflow |
| 13 | +* LOGS_URL (optional) - external url for the logs |
| 14 | +* REGISTRY_INSECURE (optional) - security flag for standard registry protocol, when set to true it enables http protocol. |
| 15 | +* RETRIEVE_CREDENTIALS_BY_DOMAIN (optional) - decide about the authentication method based on the image domain |
| 16 | +#### Specify one from following required registry parameters: |
| 17 | +* GCR_KEY_FILE_PATH (required) - JSON key for authenticating to a Google GCR |
| 18 | +* GCR_KEY_SECRET (required) - The Kubernetes secret containing the GCR key information. Default is 'gcr-key-file' |
| 19 | +* GCR_KEY_SECRET_KEY (optional) - The key in the Kubernetes secret containing the GCR key information. Default is '.keyjson' |
| 20 | +* AWS_ACCESS_KEY (required) - The Kubernetes secret with the Amazon access key |
| 21 | +* AWS_ACCESS_KEY_SECRET_KEY (optional) - The key in the Kubernetes secret with the Amazon access key. Default is 'aws-access-key' |
| 22 | +* AWS_SECRET_KEY (required) - The Kubernetes secret with the Amazon secret key |
| 23 | +* AWS_SECRET_KEY_SECRET_KEY (optional) - The key in the Kubernetes secret with the Amazon secret key. Default is 'aws-secret-key' |
| 24 | +* AWS_REGION (required) - The Kubernetes secret with the Amazon region |
| 25 | +* AWS_REGION_SECRET_KEY (optional) - The key in the Kubernetes secret with the Amazon region. Default is 'aws-region' |
| 26 | +* DOCKER_CONFIG_FILE_PATH (required) - docker config json for authenticating to a registry (GCR, ECR, ACR not supported) |
| 27 | +* DOCKER_CONFIG_SECRET (required) - The Kubernetes secret containing the docker config json information. Default is 'docker-registry' |
| 28 | +* DOCKER_CONFIG_SECRET_KEY (optional) - The key in the Kubernetes secret containing the docker config json information. Default is '.dockerconfigjson' |
| 29 | +* DOCKERHUB_USERNAME (required) - The Kubernetes secret with the docker username |
| 30 | +* DOCKERHUB_USERNAME_SECRET_KEY (optional) The key in the Kubernetes secret with the docker username. Default is 'username' |
| 31 | +* DOCKERHUB_PASSWORD (required) - The Kubernetes secret with the docker password |
| 32 | +* DOCKERHUB_PASSWORD_SECRET_KEY (optional) The key in the Kubernetes secret with the docker password. Default is 'password' |
| 33 | +* REGISTRY_USERNAME (required) - The Kubernetes secret with the standard registry username |
| 34 | +* USERNAME_SECRET_KEY (optional) The key in the Kubernetes secret with the standard registry username. Default is 'username' |
| 35 | +* REGISTRY_PASSWORD (required) - The Kubernetes secret with the standard registry password |
| 36 | +* PASSWORD_SECRET_KEY (optional) The key in the Kubernetes secret with the standard registry password. Default is 'password' |
| 37 | +* REGISTRY_DOMAIN (required) - The Kubernetes secret with the standard registry domain |
| 38 | +* REGISTRY_DOMAIN_SECRET_KEY (optional) - The key in the Kubernetes secret with the standard registry domain. Default is 'domain' |
| 39 | +* AWS_ROLE_SECRET (required) - The Kubernetes secret with the Amazon role |
| 40 | +* AWS_ROLE_SECRET_KEY (optional) -The key in the Kubernetes secret with the standard Amazon role. Default is 'role' |
| 41 | + |
| 42 | +### Outputs |
| 43 | +* `image-name` – name of the reported image |
| 44 | +* `image-sha` – SHA of the reported image |
| 45 | + |
| 46 | +## Examples |
| 47 | + |
| 48 | +### task Example |
| 49 | +``` |
| 50 | +apiVersion: argoproj.io/v1alpha1 |
| 51 | +kind: Workflow |
| 52 | +metadata: |
| 53 | + generateName: report-image-info- |
| 54 | +spec: |
| 55 | + entrypoint: main |
| 56 | + templates: |
| 57 | + - name: main |
| 58 | + dag: |
| 59 | + tasks: |
| 60 | + - name: report-image-info |
| 61 | + templateRef: |
| 62 | + name: argo-hub.codefresh-csdp.1.0.1 |
| 63 | + template: report-image-info |
| 64 | + arguments: |
| 65 | + parameters: |
| 66 | + - name: CF_API_KEY |
| 67 | + value: 'codefresh-token' |
| 68 | + - name: CF_API_KEY_SECRET_KEY |
| 69 | + value: 'token' |
| 70 | + - name: IMAGE_NAME |
| 71 | + value: 'deniscodefresh/ppid-inspector:latest' |
| 72 | + - name: DOCKERHUB_USERNAME |
| 73 | + value: 'dockerhub-creds' |
| 74 | + - name: USERNAME_SECRET_KEY |
| 75 | + value: 'username' |
| 76 | + - name: DOCKERHUB_PASSWORD |
| 77 | + value: 'dockerhub-creds' |
| 78 | + - name: PASSWORD_SECRET_KEY |
| 79 | + value: 'password' |
| 80 | +``` |
0 commit comments