Skip to content

Commit

Permalink
Add global CI
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian von Feilitzsch <[email protected]>
  • Loading branch information
fabianvf committed Dec 11, 2023
1 parent bccc43b commit 12d63af
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/global-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Global CI

on: ["push", "pull_request", "workflow_dispatch"]

jobs:
build-addon:
name: Build tackle2-addon-analyzer
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- name: Extract pull request number from PR description
id: extract_analyzer_pull_request_number
run: |
PULL_REQUEST_NUMBER=$(echo "${{ github.event.pull_request.body }}" | grep -oP '[A|a]nalyzer.?[P|p][R|r]: \K\d+' || true)
if [ -z "$PULL_REQUEST_NUMBER" ]; then
echo "::set-output name=ref::main"
else
echo "::set-output name=ref::refs/pull/$PULL_REQUEST_NUMBER/merge"
fi
- name: checkout
uses: actions/checkout@v3
- name: Checkout tools repo
uses: actions/checkout@v3
with:
repository: konveyor/analyzer-lsp
path: analyzer-lsp
ref: "${{ steps.extract_analyzer_pull_request_number.outputs.ref }}"
- uses: actions/checkout@v3
with:
fetch-depth: 0
repository: konveyor/tackle2-addon-analyzer
ref: main
path: tackle2-addon-analyzer

- name: Build bundle base image
run: |
docker build -t quay.io/konveyor/jdtls-server-base:latest .
- name: build analyzer-lsp Dockerfile
run: |
docker build -f analyzer-lsp/Dockerfile -t quay.io/konveyor/analyzer-lsp:latest analyzer-lsp
docker tag quay.io/konveyor/analyzer-lsp:latest analyzer-lsp
- name: Build addon and save image
working-directory: tackle2-addon-analyzer
run: |
IMG=quay.io/konveyor/tackle2-addon-analyzer:latest make image-podman
podman save -o /tmp/tackle2-addon-analyzer.tar quay.io/konveyor/tackle2-addon-analyzer:latest
- name: Upload image as artifact
uses: actions/upload-artifact@v3
with:
name: tackle2-addon-analyzer
path: /tmp/tackle2-addon-analyzer.tar
retention-days: 1
e2e:
needs: build-addon
uses: konveyor/ci/.github/workflows/global-ci.yml@main
with:
component_name: tackle2-addon-analyzer

0 comments on commit 12d63af

Please sign in to comment.