Update Article “2023-04-17-automatiser-la-publication-des-artefacts”
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Quentin 2023-04-28 09:49:06 +00:00
parent d9e037a409
commit f56df242cb

View file

@ -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&region=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
```