From f56df242cb2e0ef4058fde7dfaf69394b5d0363a Mon Sep 17 00:00:00 2001 From: Quentin Date: Fri, 28 Apr 2023 09:49:06 +0000 Subject: [PATCH] =?UTF-8?q?Update=20Article=20=E2=80=9C2023-04-17-automati?= =?UTF-8?q?ser-la-publication-des-artefacts=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...utomatiser-la-publication-des-artefacts.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/_posts/2023-04-17-automatiser-la-publication-des-artefacts.md b/_posts/2023-04-17-automatiser-la-publication-des-artefacts.md index 56e395e..a8af337 100644 --- a/_posts/2023-04-17-automatiser-la-publication-des-artefacts.md +++ b/_posts/2023-04-17-automatiser-la-publication-des-artefacts.md @@ -59,6 +59,33 @@ J'ai choisi d'utiliser un petit panel de bibliothèques pour faire la glue entre - Cobra comme framework CLI - skopeo comme bibliothèque de manipulation des conteneurs +## Publier un binaire statique + +Après implémentation, voici la trace de la commande : + +``` +$ ./alba static push -t albatros:0.9 df/ 's3://download.deuxfleurs.org?endpoint=garage.deuxfleurs.fr&s3ForcePathStyle=true®ion=garage' +df/linux/386/albatros -> df-dist-v1/albatros/0.9/linux/386/albatros +df/linux/amd64/albatros -> df-dist-v1/albatros/0.9/linux/amd64/albatros +df/linux/arm/albatros -> df-dist-v1/albatros/0.9/linux/arm/albatros +df/linux/arm64/albatros -> df-dist-v1/albatros/0.9/linux/arm64/albatros +tag -> df-dist-v1/albatros/0.9 +manifest -> df-dist-v1/albatros +✅ push succeeded +``` + +On peut vérifier que tout fonctionne avec curl : + +``` +$ curl https://download.deuxfleurs.org/df-dist-v1/albatros +{"name":"albatros","tags":["0.9"]} +$ curl https://download.deuxfleurs.org/df-dist-v1/albatros/0.9 +{"flavors":[{"resources":[{"path":"albatros"}],"platform":{"architecture":"386","os":"linux"}},{"resources":[{"path":"albatros"}],"platform":{"architecture":"amd64","os":"linux"}},{"resources":[{"path":"albatros"}],"platform":{"architecture":"arm","os":"linux"}},{"resources":[{"path":"albatros"}],"platform":{"architecture":"arm64","os":"linux"}}]} +$ curl -I https://download.deuxfleurs.org/df-dist-v1/albatros/0.9/linux/amd64/albatros +HTTP/2 200 +content-type: application/octet-stream +``` +