Skip to content

Commit

Permalink
🌱 oil the pr ci workflow (#709)
Browse files Browse the repository at this point in the history
Needs konveyor/ci#54

Signed-off-by: David Zager <[email protected]>
  • Loading branch information
djzager authored Aug 5, 2024
1 parent f30698a commit 92bde32
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 52 deletions.
67 changes: 27 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
18 changes: 6 additions & 12 deletions .github/workflows/march-image-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]'

0 comments on commit 92bde32

Please sign in to comment.