diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9f7f5b43c..9e99967c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,88 +12,75 @@ jobs: fmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-go@v3 with: go-version: '1.19' - run: make fmt + vet: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-go@v3 with: go-version: '1.19' - run: make vet + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-go@v3 with: go-version: '1.19' - run: make cmd - build-image: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - run: make podman-build test-unit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-go@v3 with: go-version: '1.19' - run: make test test-api: + needs: + - fmt + - vet + - build + - test-unit runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-go@v3 with: go-version: '1.19' - run: | - make vet DISCONNECTED=1 make run & sleep 15 # probably a dirty solution DISCONNECTED=1 HUB_BASE_URL=http://localhost:8080 make test-api DISCONNECTED=1 HUB_BASE_URL=http://localhost:8080 make test-api # Intentionaly run 2x to catch data left in Hub DB. - test-e2e: + build-image: + needs: + - fmt + - vet + - build + - test-unit + - test-api runs-on: ubuntu-latest + env: + IMG: ttl.sh/konveyor-hub-${{ github.sha }}:2h steps: - - uses: actions/checkout@v3 - - name: start-minikube - uses: konveyor/tackle2-operator/.github/actions/start-minikube@main - - name: Build image in minikube - run: | - export SHELL=/bin/bash - eval $(minikube -p minikube docker-env) - make docker-build - - name: install-tackle - uses: konveyor/tackle2-operator/.github/actions/install-tackle@main - with: - tackle-hub-image: tackle2-hub:latest - tackle-image-pull-policy: IfNotPresent - - - name: save image - run: | - IMG=quay.io/konveyor/tackle2-hub:latest make docker-build - docker save -o /tmp/tackle2-hub.tar quay.io/konveyor/tackle2-hub:latest - - - name: Upload image as artifact - uses: actions/upload-artifact@v3 - with: - name: tackle2-hub - path: /tmp/tackle2-hub.tar - retention-days: 1 + - uses: actions/checkout@v4 + - run: make docker-build + - run: docker push ${IMG} test-integration: - needs: test-e2e - uses: konveyor/ci/.github/workflows/global-ci.yml@main + needs: build-image + uses: konveyor/ci/.github/workflows/global-ci-bundle.yml@main with: - component_name: tackle2-hub + tackle_hub: ttl.sh/konveyor-hub-${{ github.sha }}:2h api_hub_tests_ref: ${{ github.ref }} diff --git a/.github/workflows/march-image-build-push.yml b/.github/workflows/march-image-build-push.yml index 8729d4cda..25bbcf065 100644 --- a/.github/workflows/march-image-build-push.yml +++ b/.github/workflows/march-image-build-push.yml @@ -19,15 +19,9 @@ jobs: runs-on: ubuntu-20.04 strategy: fail-fast: false - steps: - - name: Checkout Push to Registry action - uses: konveyor/release-tools/build-push-quay@main - with: - architectures: "amd64, arm64" - containerfile: "./Dockerfile" - image_name: "tackle2-hub" - image_namespace: "konveyor" - image_registry: "quay.io" - quay_publish_robot: ${{ secrets.QUAY_PUBLISH_ROBOT }} - quay_publish_token: ${{ secrets.QUAY_PUBLISH_TOKEN }} - ref: ${{ github.ref }} + uses: konveyor/release-tools/build-push-images.yaml@main + with: + registry: "quay.io/konveyor" + image_name: "tackle2-hub" + containerfile: "./Dockerfile" + architectures: '[ "amd64", "arm64" ]'