MCPcopy Create free account
hub / github.com/SocketCluster/socketcluster / promptDockerAuthDetails

Function promptDockerAuthDetails

bin/actions/k8s.js:116–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114 };
115
116 let promptDockerAuthDetails = async () => {
117 let username, password;
118
119 // Check if username is specified
120 if (dockerUsername == null) {
121 username = await this.promptInput('Enter your Docker registry username:');
122 dockerUsername = username.toLowerCase();
123 }
124
125 // Check if password is specified
126 if (dockerPassword == null) {
127 password = await this.promptInput(
128 'Enter your Docker registry password:',
129 true,
130 );
131 dockerPassword = password;
132 }
133
134 const confirmation = await this.promptConfirm(
135 `Would you like to save your Docker registry username and password as Base64 to ${socketClusterK8sConfigFilePath}?`,
136 { default: true },
137 );
138
139 if (confirmation) {
140 saveDockerAuthDetails = confirmation;
141 }
142
143 return Promise.resolve({
144 username: dockerUsername,
145 password: dockerPassword,
146 saveDockerAuthDetails,
147 });
148 };
149
150 let performDeployment = function (
151 dockerConfig,

Callers 2

pushToDockerImageRepoFunction · 0.85
k8sDeployAndDeployUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…