Files
Imago/docker/deploy-img.ps1
T
bruno d916b63b62
CI / Lint & Format (push) Failing after 10s
CI / Tests (push) Has been skipped
CI / Security Scan (push) Failing after 8s
CI / Docker Build (push) Has been skipped
Add Docker build/deploy scripts, .dockerignore, and registry skill
2026-06-22 20:16:53 -04:00

39 lines
1014 B
PowerShell

<#
.SYNOPSIS
Exécute deploy-img.sh dans WSL Debian pour pousser Imago vers le registre.
.DESCRIPTION
Lance le script Bash deploy-img.sh sous WSL Debian qui tague et pousse
l'image vers dev.lab.home:5000 avec versioning semver.
.EXEMPLE
.\deploy-img.ps1
#>
param()
$ErrorActionPreference = 'Stop'
try {
$scriptDir = $PSScriptRoot
$wslScriptDir = $scriptDir -replace '^([A-Za-z]):\\', '/mnt/$1/' -replace '\\', '/'
$wslScriptDir = $wslScriptDir.ToLower()
Write-Host "Déploiement de l'image Imago vers le registre..." -ForegroundColor Cyan
# Rendre le script exécutable
wsl -d Debian -- chmod +x "$wslScriptDir/deploy-img.sh"
# Exécuter
$innerCmd = "cd '$wslScriptDir' && ./deploy-img.sh"
wsl -d Debian bash -lc $innerCmd
if ($LASTEXITCODE -ne 0) {
throw "Le déploiement a échoué (code: $LASTEXITCODE)"
}
Write-Host "Déploiement terminé avec succès." -ForegroundColor Green
}
catch {
Write-Error "Erreur : $_"
exit 1
}