Rename e Refactor e Fix
This commit is contained in:
@@ -15,7 +15,7 @@ $mainStopWatch = [system.diagnostics.stopwatch]::StartNew()
|
||||
#contatore ciclo do while
|
||||
$projectCount = 1
|
||||
#numero massimo di progetti da analizzare
|
||||
$projectNumber = 200
|
||||
$projectNumber = 300
|
||||
#conteggio progetti trovati
|
||||
$projectsFound = 0
|
||||
#conteggio progetti con commit negli ultimi giorni
|
||||
|
||||
@@ -15,7 +15,7 @@ $mainStopWatch = [system.diagnostics.stopwatch]::StartNew()
|
||||
#contatore ciclo do while
|
||||
$projectCount = 1
|
||||
#numero massimo di progetti da analizzare
|
||||
$projectNumber = 1
|
||||
$projectNumber = 300
|
||||
#conteggio progetti trovati
|
||||
$existingProjects = 0
|
||||
#conteggio mirroring in errore
|
||||
|
||||
@@ -13,9 +13,9 @@ $startTime = (Get-Date).toString("yyyy/MM/dd HH:mm:ss")
|
||||
# avvio stopwatch
|
||||
$mainStopWatch = [system.diagnostics.stopwatch]::StartNew()
|
||||
#contatore ciclo do while
|
||||
$projectCount = 170
|
||||
$projectCount = 1
|
||||
#numero massimo di progetti da analizzare
|
||||
$projectNumber = 250
|
||||
$projectNumber = 300
|
||||
#nome file di log
|
||||
$logFile = "GiteaNewMirrors.log"
|
||||
|
||||
|
||||
+9
-4
@@ -11,14 +11,14 @@
|
||||
$startTime = (Get-Date).toString("yyyy/MM/dd HH:mm:ss")
|
||||
# avvio stopwatch
|
||||
$mainStopWatch = [system.diagnostics.stopwatch]::StartNew()
|
||||
#contatore mirror trovati
|
||||
$mirrorCount = 0
|
||||
#contatore ciclo do while
|
||||
$projectCount = 1
|
||||
#numero massimo di progetti
|
||||
$projectNumber = 2
|
||||
$projectNumber = 300
|
||||
#conteggio progetti trovati
|
||||
$existingProjects = 0
|
||||
#contatore mirror trovati
|
||||
$mirrorCount = 0
|
||||
#nome file di log
|
||||
$logFile = "GitlabForcePushMirror.log"
|
||||
|
||||
@@ -58,7 +58,12 @@ do {
|
||||
#compongo URL per chiamata POST per forzare PUSH
|
||||
$callUrlForcePush = "https://gitlab.steamware.net/api/v4/projects/" + $projectCount + "/remote_mirrors/" + $item.id + "/sync"
|
||||
$PushResponse = Invoke-WebRequest -URI $callUrlForcePush -Method POST -Headers $gitlabHead -ContentType "application/json" -UseBasicParsing
|
||||
WriteLogOutput $logFile 0 $("Status: " + $PushResponse.StatusCode + " - " + $item.url)
|
||||
if ($PushResponse.StatusCode -eq 204){
|
||||
WriteLogOutput $logFile 0 $("Mirror Push: Success - " + $item.url)
|
||||
}
|
||||
else {
|
||||
WriteLogOutput $logFile 0 $("Mirror Push: Unknown - " + $item.url)
|
||||
}
|
||||
$mirrorCount = $mirrorCount + 1
|
||||
}
|
||||
$existingProjects = $existingProjects + 1
|
||||
Reference in New Issue
Block a user