RenewGitlabMirroring TESTED & OK

This commit is contained in:
marco.locatelli@steamware.net
2023-09-22 15:40:49 +02:00
parent 99879dc716
commit 8fe1ac872a
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -12,17 +12,17 @@ $head = @{"PRIVATE-TOKEN"="glpat-pmkiVSJMhNyAySEKp2nA"}
#nome utente che effettua i mirror push
$userName = "replica"
#token autenticazione azzano
#token autenticazione utente replica azzano
$tokenAzzano = "glpat-gADkrEhkEsvQxGxKez4y"
#token autenticazione nembro
#token autenticazione utente replica nembro
$tokenNembro = "glpat-TzZkRUoYAdKikgwFXW_E"
#contatore ciclo do while
$projectCount = 1
#numero massimo di progetti
$projectNumber = 1
$projectNumber = 200
#livello di log: 0=log sintetico, 1=log errori, 2=log full, 3=log ampolloso
$logLevel = 3
@@ -142,7 +142,7 @@ do
$jsonBody = ConvertTo-Json -InputObject $body
#chiamata api POST che crea mirror con url e body specificati
Invoke-WebRequest -Method Post -URI $callUrlCreateMirror -Headers $head -ContentType "application/json" -Body $jsonBody -UseBasicParsing
WriteLogOutput 1 "Mirror ricostruito con successo"
WriteLogOutput 1 "ID: $mirrorId - URL: $mirrorUrl - Mirror ricostruito con successo"
}
}
}
+1 -1
View File
@@ -9,6 +9,6 @@
#Write-Output($Response)
$url = "https://*****:*****@gitlab-nembro.steamware.net/steamware/NKC.git"
$splitUrl = $url -split '.net'
$splitUrl = $url -split '.steamware.net/'
Write-Output $splitUrl[0]
Write-Output $splitUrl[1]