gitgreen 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/init.js +0 -14
- package/package.json +1 -1
package/dist/init.js
CHANGED
|
@@ -944,20 +944,6 @@ systemctl start gitlab-runner
|
|
|
944
944
|
try {
|
|
945
945
|
(0, child_process_1.execSync)(`gcloud compute instances create ${vmName} --project=${gcpProjectId} --zone=${gcpZone} --machine-type=${vmMachineType} --service-account=${saEmail} --scopes=https://www.googleapis.com/auth/cloud-platform --metadata=runner-token="${runnerToken}" --metadata-from-file=startup-script=${tmpFile} --image-family=debian-12 --image-project=debian-cloud`, { stdio: 'inherit' });
|
|
946
946
|
console.log((0, kleur_1.green)(`VM ${vmName} created. Runner will register in 2-3 minutes.`));
|
|
947
|
-
console.log((0, kleur_1.gray)('Waiting for runner to register...'));
|
|
948
|
-
// Wait for instance ID file
|
|
949
|
-
for (let i = 0; i < 30; i++) {
|
|
950
|
-
await new Promise(r => setTimeout(r, 10000));
|
|
951
|
-
try {
|
|
952
|
-
gcpInstanceId = (0, child_process_1.execSync)(`gcloud compute ssh ${vmName} --project=${gcpProjectId} --zone=${gcpZone} --command="cat /opt/gitlab-runner-instance-id.txt 2>/dev/null"`, { encoding: 'utf8' }).trim();
|
|
953
|
-
if (gcpInstanceId) {
|
|
954
|
-
console.log((0, kleur_1.green)(`Runner registered. Instance ID: ${gcpInstanceId}`));
|
|
955
|
-
break;
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
catch { }
|
|
959
|
-
console.log((0, kleur_1.gray)(`Waiting... (${i + 1}/30)`));
|
|
960
|
-
}
|
|
961
947
|
}
|
|
962
948
|
catch (err) {
|
|
963
949
|
console.log((0, kleur_1.red)('Failed to create VM: ' + err.message));
|