From e4fb8e75f965f33b06103686ab7dbbc4b4e507c4 Mon Sep 17 00:00:00 2001
From: Stefan Prodan <stefan.prodan@gmail.com>
Date: Thu, 23 Jun 2022 08:51:53 +0300
Subject: [PATCH] Add e2e tests for artifact commands

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
---
 .github/workflows/e2e.yaml | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml
index 9f4fcb66..2352f2e4 100644
--- a/.github/workflows/e2e.yaml
+++ b/.github/workflows/e2e.yaml
@@ -9,6 +9,11 @@ on:
 jobs:
   kind:
     runs-on: ubuntu-latest
+    services:
+      registry:
+        image: registry:2
+        ports:
+          - 5000:5000
     steps:
       - name: Checkout
         uses: actions/checkout@v3
@@ -168,7 +173,16 @@ jobs:
       - name: flux delete source git
         run: |
           /tmp/flux delete source git podinfo --silent
-      - name: flux oci
+      - name: flux oci artifacts
+        run: |
+          /tmp/flux push artifact localhost:5000/fluxcd/flux:${{ github.sha }} \
+            --path="./manifests" \
+            --source="${{ github.repositoryUrl }}" \
+            --revision="${{ github.ref }}/${{ github.sha }}"
+          /tmp/flux tag artifact localhost:5000/fluxcd/flux:${{ github.sha }} \
+            --tag latest
+          /tmp/flux list artifact localhost:5000/fluxcd/flux
+      - name: flux oci repositories
         run: |
           /tmp/flux create source oci podinfo-oci \
             --url ghcr.io/stefanprodan/manifests/podinfo \
-- 
GitLab