Skip to content

[incubator-kie-issues-1553] Centralize shared vars for different Github actions workflows #1386

[incubator-kie-issues-1553] Centralize shared vars for different Github actions workflows

[incubator-kie-issues-1553] Centralize shared vars for different Github actions workflows #1386

Workflow file for this run

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
name: Kogito Downstream
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- 'LICENSE'
- '**/.gitignore'
- '**.md'
- '**.adoc'
- '*.txt'
- 'docsimg/**'
- '.ci/jenkins/**'
jobs:
shared-vars:
uses: ./.github/workflows/shared-vars.yml
kogito-downstream-build:
needs: shared-vars
concurrency:
group: pr-${{ matrix.job_name }}_${{ matrix.os }}_${{ matrix.java-version }}_${{ matrix.maven-version }}_${{ github.head_ref }}
cancel-in-progress: true
timeout-minutes: 180
strategy:
matrix:
job_name: [ kogito-quarkus-examples, kogito-springboot-examples, serverless-workflow-examples ]
include:
- job_name: kogito-quarkus-examples
repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-quarkus-examples/
os: ${{ needs.shared-vars.outputs.os }}
java-version: ${{ needs.shared-vars.outputs.java-version }}
maven-version: ${{ needs.shared-vars.outputs.maven-version }}
- job_name: kogito-springboot-examples
repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-springboot-examples/
os: ${{ needs.shared-vars.outputs.os }}
java-version: ${{ needs.shared-vars.outputs.java-version }}
maven-version: ${{ needs.shared-vars.outputs.maven-version }}
- job_name: serverless-workflow-examples
repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: serverless-workflow-examples/
os: ${{ needs.shared-vars.outputs.os }}
java-version: ${{ needs.shared-vars.outputs.java-version }}
maven-version: ${{ needs.shared-vars.outputs.maven-version }}
fail-fast: false
runs-on: ${{ matrix.os }}
name: ${{ matrix.job_name }} (${{ matrix.os }} / Java-${{ matrix.java-version }} / Maven-${{ matrix.maven-version }})
steps:
- name: Clean Disk Space
uses: apache/incubator-kie-kogito-pipelines/.ci/actions/ubuntu-disk-space@main
if: ${{ contains(matrix.os, 'ubuntu') }}
- name: Support long paths
if: ${{ matrix.os == 'windows-latest' }}
uses: apache/incubator-kie-kogito-pipelines/.ci/actions/long-paths@main
- name: Java and Maven Setup
uses: apache/incubator-kie-kogito-pipelines/.ci/actions/maven@main
with:
java-version: ${{ matrix.java-version }}
maven-version: ${{ matrix.maven-version }}
cache-key-prefix: ${{ runner.os }}-${{ matrix.java-version }}-maven${{ matrix.maven-version }}
- name: Build Chain
uses: apache/incubator-kie-kogito-pipelines/.ci/actions/build-chain@main
with:
definition-file: https://raw.githubusercontent.com/${GROUP:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/pull-request-config.yaml
annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }}
starting-project: apache/${{ matrix.repository }}
github-token: "${{ secrets.GITHUB_TOKEN }}"
env:
KOGITO_EXAMPLES_SUBFOLDER_POM: ${{ matrix.env_KOGITO_EXAMPLES_SUBFOLDER_POM }}
- name: Surefire Report
uses: apache/incubator-kie-kogito-pipelines/.ci/actions/surefire-report@main
if: ${{ always() }}
with:
report_paths: '**/*-reports/TEST-*.xml'