Skip to content

Commit

Permalink
ci: reusable build-jkube workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
manusa committed Feb 22, 2024
1 parent 03e24ad commit c6ee49e
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 45 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/build-jkube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#
# Copyright (c) 2019 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at:
#
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#

name: Build Eclipse JKube master/main

on:
workflow_call:
inputs:
run-id:
description: The run id of the workflow that triggered this workflow (to be used for caching)
required: true
type: string

env:
JKUBE_REPOSITORY: https://github.com/eclipse/jkube.git
JKUBE_REVISION: master

permissions:
contents: read


jobs:
build-jkube:
name: Build JKube
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@398bb08048482c421b1da00a58a1b472a306eb85
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
downloads.gradle.org:443
github.com:443
repo.gradle.org:443
repo.maven.apache.org:443
repo1.maven.org:443
repository.jboss.org:443
services.gradle.org:443
objects.githubusercontent.com:443
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Java 11
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
with:
java-version: '11'
distribution: 'temurin'
- name: Cache configuration
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: |
~/.m2/repository
./jkube
key: cache-it-${{ inputs.run-id }}
- name: Checkout JKube Repository
run: |
rm -rf jkube \
&& git clone "$JKUBE_REPOSITORY" --branch "$JKUBE_REVISION" jkube
- name: Install JKube
run: |
mvn -B -f "jkube/pom.xml" -DskipTests clean install
- name: Install Integration Tests (Downloads dependencies)
run: |
./mvnw -B -DskipTests clean install \
&& ./mvnw -B -DskipTests clean -P'quarkus','quarkus-native','springboot','webapp','other','dockerfile'
48 changes: 3 additions & 45 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,54 +25,12 @@ on:
permissions:
contents: read

env:
JKUBE_REPOSITORY: https://github.com/eclipse/jkube.git
JKUBE_REVISION: master

jobs:
build-jkube:
name: Build JKube
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@398bb08048482c421b1da00a58a1b472a306eb85
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
downloads.gradle.org:443
github.com:443
repo.gradle.org:443
repo.maven.apache.org:443
repo1.maven.org:443
repository.jboss.org:443
services.gradle.org:443
objects.githubusercontent.com:443
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Java 11
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
with:
java-version: '11'
distribution: 'temurin'
- name: Cache configuration
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: |
~/.m2/repository
./jkube
key: cache-it-${{ github.run_id }}
- name: Checkout JKube Repository
run: |
rm -rf jkube \
&& git clone "$JKUBE_REPOSITORY" --branch "$JKUBE_REVISION" jkube
- name: Install JKube
run: |
mvn -B -f "jkube/pom.xml" -DskipTests clean install
- name: Install Integration Tests (Downloads dependencies)
run: |
./mvnw -B -DskipTests clean install \
&& ./mvnw -B -DskipTests clean -P'quarkus','quarkus-native','springboot','webapp','other','dockerfile'
uses: ./.github/workflows/build-jkube.yml
with:
run-id: ${{ github.run_id }}

minikube:
name: K8S
Expand Down

0 comments on commit c6ee49e

Please sign in to comment.