Skip to content

Commit

Permalink
Merge pull request #6 from che-samples/main
Browse files Browse the repository at this point in the history
chore: merge with main branch
  • Loading branch information
svor authored Jun 8, 2022
2 parents 743501d + 3a0ac30 commit 552f9a4
Show file tree
Hide file tree
Showing 1,460 changed files with 112,443 additions and 14,935 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Declare files that will always have CRLF line endings on checkout.
*.cmd text eol=crlf
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
time: "23:00"
timezone: Europe/Paris
open-pull-requests-limit: 6
target-branch: "development"
allow:
- dependency-name: io.quarkiverse.*:*
rebase-strategy: disabled
29 changes: 29 additions & 0 deletions .github/generate-native-matrix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#! /bin/bash

IFS=$'\n'
modules=($(grep -LR --include=pom.xml '<packaging>pom</packaging>' */ | xargs dirname | sort))
count=${#modules[@]}
partition=$(expr $count / 4 + 1)

json=$'{\n'
json+=$' "include": [\n'
json+=$' {\n'
i=0
partition_index=1
for module in ${modules[@]}; do
if [ $i -gt $partition ]; then
json+=$'"\n },\n {\n'
i=0
fi
if [ $i -eq 0 ]; then
json+=" \"category\": \"Native Tests - $partition_index\","
json+=$'\n "test-modules": "'
((partition_index=partition_index+1))
i=0
fi
json+="$module,"
((i=i+1))
done
json+=$'"\n }\n ]\n}\n'

echo "$json"
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Your pull request:
- [ ] uses the `999-SNAPSHOT` version of Quarkus
- [ ] has tests (`mvn clean test`)
- [ ] works in native (`mvn clean package -Pnative`)
- [ ] has native tests (`mvn clean verify -Pnative`)
- [ ] has integration/native tests (`mvn clean verify -Pnative`)
- [ ] makes sure the associated guide must not be updated
- [ ] links the guide update pull request (if needed)
- [ ] updates or creates the `README.md` file (with build and run instructions)
Expand Down
6 changes: 6 additions & 0 deletions .github/quarkus-github-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# The format of this file is documented here:
# https://github.com/quarkusio/quarkus-bot#triage-issues
features: [ANALYZE_WORKFLOW_RUN_RESULTS]
workflowRunAnalysis:
workflows: ["Pull Request Build - development"]
48 changes: 41 additions & 7 deletions .github/workflows/build-pr-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,37 @@ on:
pull_request:
branches:
- development
- "2.2"
- "2.7"

jobs:
# This is a hack to work around a GitHub API limitation:
# when the PR is coming from another fork, the pull_requests field of the
# workflow_run payload is empty.
# For more details, see
# https://github.community/t/pull-request-attribute-empty-in-workflow-run-event-object-for-pr-from-forked-repo/154682
attach-pr-number:
runs-on: ubuntu-latest
name: Attach pull request number
if: github.event_name == 'pull_request'
steps:
- name: Create file
shell: bash
run: |
echo -n ${{ github.event.number }} > pull-request-number
- name: Upload pull request number
uses: actions/upload-artifact@v2
with:
name: pull-request-number-${{ github.event.number }}
path: pull-request-number
retention-days: 1
build:
runs-on: ubuntu-18.04
name: Build - JDK ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ 8, 11 ]
java: [ 11 ]
steps:
- uses: actions/checkout@v2
- name: Get Date
Expand All @@ -28,23 +51,34 @@ jobs:
key: q2maven-pr-jdk-${{ matrix.java }}-${{ steps.get-date.outputs.date }}
- name: Check Wildcards
run: |
if [ $(git grep import | grep '\*;' | grep -E -v '(.mvn/|README.md|CONTRIBUTING.md)' | wc -l) != 0 ]; then
if [ $(git grep import -- '*.java' | grep '\*;' | grep -E -v '(.mvn/|README.md|CONTRIBUTING.md)' | wc -l) != 0 ]; then
echo "Please don't use star imports in your Java files: "
git grep import | grep '\*;' | grep -E -v '(.mvn/|README.md|CONTRIBUTING.md)'
exit 1
fi
- name: Install JDK ${{ matrix.java }}
# Uses sha for added security since tags can be updated
uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Build Quarkus main
if: ${{ github.base_ref == 'development' }}
run: |
git clone https://github.com/quarkusio/quarkus.git
cd quarkus
mvn -T1C -e -B --settings .github/mvn-settings.xml clean install -Dquickly-ci
./mvnw -T1C -e -B --settings .github/mvn-settings.xml clean install -Dquickly-ci
- name: Build with Maven
run: export LANG=en_US && mvn --settings .github/mvn-settings.xml -B clean install -Dstart-containers
run: export LANG=en_US && ./mvnw -e -B -fae --settings .github/mvn-settings.xml clean install -Dstart-containers
- name: Delete Local Artifacts From Cache
shell: bash
run: rm -rf ~/.m2/repository/org/acme
- name: Upload build reports (if build failed)
uses: actions/upload-artifact@v2
if: ${{ failure() || cancelled() }}
with:
name: "build-reports-Build - JDK ${{ matrix.java }}"
path: |
**/target/*-reports/TEST-*.xml
target/build-report.json
LICENSE
retention-days: 2
45 changes: 36 additions & 9 deletions .github/workflows/native-build-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,27 @@ on:
workflow_dispatch:

jobs:
build_with_native:
generate-json-matrix:
name: Native Tests - Read JSON matrix
runs-on: ubuntu-latest
if: "github.repository == 'quarkusio/quarkus-quickstarts' || github.event_name == 'workflow_dispatch'"
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- id: generate
run: |
json=$(.github/generate-native-matrix.sh | tr -d '\n')
echo "::set-output name=matrix::${json}"
build-with-native:
name: ${{matrix.category}}
runs-on: ubuntu-latest
needs: [generate-json-matrix]
if: "github.repository == 'quarkusio/quarkus-quickstarts' || github.event_name == 'workflow_dispatch'"
strategy:
max-parallel: 5
fail-fast: false
matrix: ${{ fromJson(needs.generate-json-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -34,20 +52,21 @@ jobs:
key: q2maven-native-${{ steps.get-date.outputs.date }}

- name: Install JDK 11
uses: joschi/setup-jdk@e87a7cec853d2dd7066adf837fe12bf0f3d45e52
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: temurin
java-version: 11

- name: Build Quarkus main
run: |
git clone https://github.com/quarkusio/quarkus.git
cd quarkus
mvn -T1C -e -B --settings .github/mvn-settings.xml clean install -Dquickly-ci
./mvnw -T1C -e -B --settings .github/mvn-settings.xml clean install -Dquickly-ci
- name: Build Quickstart with native
- name: Build Quickstarts with Native
run: |
mvn --settings .github/mvn-settings.xml -B clean install --fail-at-end -Pnative -Dstart-containers \
-Dquarkus.native.container-build=true
./mvnw -e -B --settings .github/mvn-settings.xml clean install --fail-at-end -Dnative -Dstart-containers \
-Dquarkus.native.container-build=true -am -pl "${{ matrix.test-modules }}"
#- name: Check RSS
# env:
Expand Down Expand Up @@ -90,11 +109,19 @@ jobs:
shell: bash
run: rm -rf ~/.m2/repository/org/acme

report:
name: Report
runs-on: ubuntu-latest
needs: [build-with-native]
if: "always() && github.repository == 'quarkusio/quarkus-quickstarts'"
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.ref || 'development' }}
- name: Report
if: "always() && github.repository == 'quarkusio/quarkus-quickstarts'"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_API_TOKEN }}
STATUS: ${{ job.status }}
STATUS: ${{ needs.build-with-native.result }}
run: |
echo "The report step got status: ${STATUS}"
sudo apt-get update -o Dir::Etc::sourcelist="sources.list" \
Expand Down
Loading

0 comments on commit 552f9a4

Please sign in to comment.