Skip to content

Commit

Permalink
#516 Publish github output (#541)
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph Kuhnke <[email protected]>
  • Loading branch information
kaklakariada and ckunki authored Mar 11, 2024
1 parent 0567daa commit fcba3e9
Show file tree
Hide file tree
Showing 50 changed files with 1,412 additions and 1,107 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/ci-build-next-java.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,44 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Run project-keeper itself
id: pk-verify
run: mvn --batch-mode com.exasol:project-keeper-maven-plugin:verify --projects .

- name: Verify Release Artifacts
run: |
print_message() {
local -r message=$1
echo "$message"
echo "$message" >> "$GITHUB_STEP_SUMMARY"
}
print_message "# Release Artifacts"
IFS=$'\n' artifacts_array=($ARTIFACTS)
missing_files=()
for file in "${artifacts_array[@]}";
do
echo "Checking if file $file exists..."
if ! [[ -f "$file" ]]; then
print_message "* ⚠️ \`$file\` does not exist ⚠️"
echo "Content of directory $(dirname "$file"):"
ls "$(dirname "$file")"
missing_files+=("$file")
else
print_message "* \`$file\` ✅"
fi
done
print_message ""
number_of_missing_files=${#missing_files[@]}
if [[ $number_of_missing_files -gt 0 ]]; then
print_message "⚠️ $number_of_missing_files release artifact(s) missing ⚠️"
exit 1
else
print_message "All ${#artifacts_array[@]} artifact(s) present ✅"
fi
env:
ARTIFACTS: ${{ steps.pk-verify.outputs.release-artifacts }}

start_release:
needs: build
if: ${{ github.ref == 'refs/heads/main' }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test_linux_build_on_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
jobs:
build-on-linux:
runs-on: ubuntu-latest
defaults:
run:
shell: "bash"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
42 changes: 40 additions & 2 deletions .github/workflows/test_on_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
jobs:
test:
runs-on: windows-latest
defaults:
run:
shell: "bash"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -35,13 +38,48 @@ jobs:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go }}
${{ runner.os }}-go-
- name: Install Go tools
run: go install github.com/google/[email protected]
- name: Build and install
run: mvn --batch-mode -DtrimStackTrace=false clean install
- name: Run project-keeper itself
id: pk-verify
run: mvn --batch-mode -DtrimStackTrace=false com.exasol:project-keeper-maven-plugin:verify --projects .

- name: Verify Release Artifacts
run: |
print_message() {
local -r message=$1
echo "$message"
echo "$message" >> "$GITHUB_STEP_SUMMARY"
}
print_message "# Release Artifacts"
IFS=$'\n' artifacts_array=($ARTIFACTS)
missing_files=()
for file in "${artifacts_array[@]}";
do
echo "Checking if file $file exists..."
if ! [[ -f "$file" ]]; then
print_message "* ⚠️ \`$file\` does not exist ⚠️"
echo "Content of directory $(dirname "$file"):"
ls "$(dirname "$file")"
missing_files+=("$file")
else
print_message "* \`$file\` ✅"
fi
done
print_message ""
number_of_missing_files=${#missing_files[@]}
if [[ $number_of_missing_files -gt 0 ]]; then
print_message "⚠️ $number_of_missing_files release artifact(s) missing ⚠️"
exit 1
else
print_message "All ${#artifacts_array[@]} artifact(s) present ✅"
fi
env:
ARTIFACTS: ${{ steps.pk-verify.outputs.release-artifacts }}
17 changes: 15 additions & 2 deletions .project-keeper.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
sources:
- type: maven
path: pom.xml
- type: maven
path: shared-model-classes/pom.xml
modules:
Expand Down Expand Up @@ -65,8 +67,19 @@ sources:
version:
fromSource: project-keeper/pom.xml
excludes:
# PK can't use itself as a Maven plugin
- regex: "W-PK-CORE-151: Pom file .* contains no reference to project-keeper-maven-plugin."
- "E-PK-CORE-17: Missing required file: '.github/workflows/project-keeper-verify.yml'"
- "E-PK-CORE-17: Missing required file: '.github/workflows/project-keeper.sh'"
# PK already uses Java 17 for building
- "E-PK-CORE-17: Missing required file: '.github/workflows/ci-build-next-java.yml'"
# Workflows must install PK itself before using it in the build
- "E-PK-CORE-18: Outdated content: '.github/workflows/dependencies_check.yml'"
- "E-PK-CORE-18: Outdated content: '.github/workflows/dependencies_update.yml'"
- "E-PK-CORE-18: Outdated content: '.github/workflows/ci-build.yml'"
- "E-PK-CORE-18: Outdated content: '.github/workflows/release.yml'"
# No configuration necessary for aggregator POM
- "E-PK-CORE-103: Missing parent declaration in 'pom.xml'"
- "E-PK-CORE-17: Missing required file: 'pk_generated_parent.pom'"
- regex: "E-PK-CORE-17: Missing required file: 'src/test/resources/.*'"
- regex: "E-PK-CORE-17: Missing required file: '.settings/.*'"
linkReplacements:
- https://eclipse-ee4j.github.io/jsonb-api|https://projects.eclipse.org/projects/ee4j.jsonp
Loading

0 comments on commit fcba3e9

Please sign in to comment.