File tree Expand file tree Collapse file tree 4 files changed +18
-35
lines changed Expand file tree Collapse file tree 4 files changed +18
-35
lines changed Original file line number Diff line number Diff line change 4
4
VERSION :
5
5
description : specify client version
6
6
required : false
7
- default : 0.0.71
7
+ default : 0.0.80
8
8
CF_API_KEY :
9
9
description : " Codefresh API KEY"
10
10
required : true
@@ -144,19 +144,22 @@ runs:
144
144
145
145
run : |
146
146
# add defaults
147
- CF_GIT_BRANCH="${CF_GIT_BRANCH:-$CF_GITHUB_REF_NAME}"
148
- CF_GIT_REPO="${CF_GIT_REPO:-$CF_GITHUB_REPOSITORY}"
147
+ export CF_GIT_BRANCH="${CF_GIT_BRANCH:-$CF_GITHUB_REF_NAME}"
148
+ export CF_GIT_REPO="${CF_GIT_REPO:-$CF_GITHUB_REPOSITORY}"
149
149
# built vars
150
- CF_WORKFLOW_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
151
- CF_GIT_PROVIDER="${CF_GIT_PROVIDER:-github}"
152
- CF_CI_TYPE=github-actions
150
+ export CF_WORKFLOW_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
151
+ export CF_GIT_PROVIDER="${CF_GIT_PROVIDER:-github}"
152
+ export CF_CI_TYPE=github-actions
153
153
154
- env>cf_env
155
- echo "CF_CI_TYPE=$CF_CI_TYPE" >> cf_env
156
- echo "CF_WORKFLOW_URL=$CF_WORKFLOW_URL" >> cf_env
157
- echo "CF_GIT_PROVIDER=${CF_GIT_PROVIDER}" >> cf_env
158
- # EXTERNAL_ENV=$(jq -n 'env'|base64)
159
- echo "EXTERNAL_ENV=$EXTERNAL_ENV">>cf_env
154
+ # convert env vars to -e var1 -e var 2 string
155
+ KEYS=($(jq -n 'env' -S -M -c | jq 'keys' -M -c))
156
+ arr=()
157
+ for i in $(echo $KEYS | tr "[" "\n" | tr "]" "\n" | tr '"' '\n' | tr "," "\n")
158
+ do
159
+ if [[ $i == CF_* ]]
160
+ then
161
+ arr+=" -e $i "
162
+ fi
163
+ done
160
164
161
- docker run --env-file=cf_env "quay.io/codefresh/codefresh-report-image:$VERSION"
162
-
165
+ docker run $arr "quay.io/codefresh/codefresh-report-image:$VERSION"
Original file line number Diff line number Diff line change 1
1
name : csdp-report-image
2
- version : 0.0.71
2
+ version : 0.0.80
3
3
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import { errors } from './utils'
2
- import { atob } from 'buffer'
3
2
4
3
/**
5
4
* Validate mandatory env vars. address host default
6
5
*/
7
6
export function validate ( payload : Record < string , string | undefined > ) : Record < string , string | undefined > {
8
- if ( payload [ 'EXTERNAL_ENV' ] ) {
9
- try {
10
- payload = JSON . parse ( atob ( payload [ 'EXTERNAL_ENV' ] ) )
11
- } catch ( error ) {
12
- console . log ( `could not handle ${ JSON . stringify ( payload [ 'EXTERNAL_ENV' ] ) } , Error ${ JSON . stringify ( error ) } ` )
13
- }
14
- }
15
7
const filtered = filterEnvVarPattern ( payload )
16
8
const messages : string [ ] = [ ]
17
9
if ( ! filtered [ 'CF_API_KEY' ] ) {
You can’t perform that action at this time.
0 commit comments