@@ -23,9 +23,9 @@ const DefaultLogFormatter = 'plain';
23
23
24
24
const defaultOpenIssueMessage = 'If you had any issues with this process please report them at: ' +
25
25
`${ colors . blue ( 'https://github.com/codefresh-io/cli/issues/new' ) } ` ;
26
- const url = _ . get ( sdk , 'config.context.url' , 'https://g.codefresh.io' ) ;
27
26
28
27
async function createTestPipeline ( runtimeName , pipelineName , pipelineCommands , progressReporter ) {
28
+ const url = _ . get ( sdk , 'config.context.url' , 'https://g.codefresh.io' ) ;
29
29
console . log ( `Creating test pipeline with the name: "${ colors . cyan ( pipelineName ) } "` ) ;
30
30
const pipeline = await sdk . pipelines . create ( { metadata : { name : pipelineName } } ) ;
31
31
@@ -62,14 +62,17 @@ async function createTestPipeline(runtimeName, pipelineName, pipelineCommands, p
62
62
}
63
63
64
64
async function getTestPipelineLink ( pipelineName ) {
65
+ const url = _ . get ( sdk , 'config.context.url' , 'https://g.codefresh.io' ) ;
65
66
const pipelines = await sdk . pipelines . list ( { id : pipelineName } ) ;
66
67
if ( _ . get ( pipelines , 'docs.length' ) ) {
67
68
const pipeline = pipelines . docs [ 0 ] ;
68
69
return `${ url } /pipelines/edit/workflow?id=${ pipeline . metadata . id } &pipeline=${ encodeURI ( pipeline . metadata . name ) } ` ;
69
70
}
71
+ return '' ;
70
72
}
71
73
72
74
async function getTestPipeline ( pipelineName ) {
75
+ const url = _ . get ( sdk , 'config.context.url' , 'https://g.codefresh.io' ) ;
73
76
const pipelines = await sdk . pipelines . list ( { id : pipelineName } ) ;
74
77
if ( _ . get ( pipelines , 'docs.length' ) ) {
75
78
const pipeline = pipelines . docs [ 0 ] ;
@@ -84,6 +87,7 @@ async function getTestPipeline(pipelineName) {
84
87
}
85
88
86
89
async function executeTestPipeline ( runtimeName , pipeline , progressReporter ) {
90
+ const url = _ . get ( sdk , 'config.context.url' , 'https://g.codefresh.io' ) ;
87
91
const pipelineName = _ . get ( pipeline , 'metadata.name' ) ;
88
92
89
93
const workflowId = await pipelinesRunCmd . handler ( {
0 commit comments