File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,23 @@ export class FabricNetworkDeploymentSteps extends BaseStepClass {
154154 } ) ;
155155 }
156156
157+ private setGitUserInfo ( ) {
158+ if ( ! process . env . GIT_USER || ! process . env . GIT_PASSWORD ) return ;
159+
160+ const commandsList = [
161+ `kubectl -n test-network delete secret git || true` ,
162+ `kubectl -n test-network create secret generic git --from-literal=username="${ process . env . GIT_USER } " --from-literal=password="${ process . env . GIT_PASSWORD } "` ] ;
163+
164+ for ( const commands of commandsList ) {
165+ execSync ( commands , {
166+ cwd : this . pathToExample ( ) ,
167+ env : {
168+ ...process . env ,
169+ }
170+ } ) ;
171+ }
172+ }
173+
157174 private loadDockerImagesForOpsSCIntoKIND ( ) {
158175 const imageNames = [ `fabric-opssc/opssc-api-server:${ FabricNetworkDeploymentSteps . opsSCImageTag ( ) } ` ,
159176 `fabric-opssc/opssc-agent:${ FabricNetworkDeploymentSteps . opsSCImageTag ( ) } ` ] ;
@@ -242,6 +259,7 @@ export class FabricNetworkDeploymentSteps extends BaseStepClass {
242259 ...envs ,
243260 }
244261 } ) ;
262+ this . setGitUserInfo ( ) ;
245263 }
246264
247265 @given ( / c r e a t e ( .+ ) c h a n n e l / , 'on-k8s' )
You can’t perform that action at this time.
0 commit comments