File tree Expand file tree Collapse file tree 5 files changed +21
-3
lines changed
lib/interface/cli/commands/pipeline Expand file tree Collapse file tree 5 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ FROM golang:alpine as go
33RUN apk add --update ca-certificates git
44RUN go get github.com/github/hub
55
6- FROM node:9.2 .0-alpine
6+ FROM node:9.10 .0-alpine
77
88RUN apk add --update ca-certificates git curl jq py-pip bash && pip install yq
99COPY --from=go /go/bin/hub /usr/local/bin/hub
Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ class RunBaseCommand {
2525 const trigger = this . argv [ 'trigger' ] ;
2626 const only = this . argv [ 'only' ] ;
2727 const skip = this . argv [ 'skip' ] ;
28+ if ( process . env . CF_BUILD_ID ) {
29+ this . argv . annotation . push ( `cf_predecessor=${ process . env . CF_BUILD_ID } ` ) ;
30+ }
31+ const annotations = prepareKeyValueFromCLIEnvOption ( this . argv . annotation ) ;
32+
33+
2834
2935 const executionRequestTemplate = {
3036 pipelineName,
@@ -38,7 +44,9 @@ class RunBaseCommand {
3844 noCfCache,
3945 trigger,
4046 only,
41- skip
47+ skip,
48+ annotations,
49+
4250 } ,
4351 } ;
4452 if ( variablesFromFile ) {
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ function _buildBody(data) {
2727 body . options . resetVolume = data . resetVolume ;
2828 }
2929
30+ if ( data . annotations ) {
31+ body . annotations = data . annotations ;
32+ }
33+
3034 if ( data . sha ) {
3135 body . sha = data . sha ;
3236 }
Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ const run = new Command({
4343 alias : 'nc' ,
4444 default : false ,
4545 } )
46+ . option ( 'annotation' , {
47+ describe : 'Add annotations to created build' ,
48+ default : [ ] ,
49+ alias : 'a' ,
50+
51+ } )
4652 . option ( 'enable-notifications' , {
4753 describe : 'Report notifications about pipeline execution' ,
4854 alias : 'en' ,
Original file line number Diff line number Diff line change 11{
22 "name" : " codefresh" ,
3- "version" : " 0.29 .0" ,
3+ "version" : " 0.30 .0" ,
44 "description" : " Codefresh command line utility" ,
55 "main" : " index.js" ,
66 "preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments