forked from apache/ozone
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HDDS-6717. Allow running flaky-test-check with specific Ratis commit (a…
- Loading branch information
1 parent
47c58c3
commit e385e8f
Showing
2 changed files
with
190 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
# 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. | ||
|
||
# This workflow can be called by other workflows to build Ratis. | ||
# | ||
# Inputs: | ||
# - Ratis repo | ||
# - the commit to build | ||
# Outputs: | ||
# - various version numbers that need to be provided to the Ozone build process. | ||
# - Ratis repository is uploaded as an artifact named `ratis-jars` | ||
# | ||
# See `intermittent-test-check.yml` as an example use of this workflow. | ||
|
||
name: build-ratis | ||
on: | ||
workflow_call: | ||
inputs: | ||
repo: | ||
description: Ratis repository | ||
default: apache/ratis | ||
required: true | ||
type: string | ||
ref: | ||
description: Ratis ref (branch, tag or commit SHA) | ||
default: master | ||
required: true | ||
type: string | ||
outputs: | ||
ratis-version: | ||
description: "Ratis Version" | ||
value: ${{ jobs.ratis.outputs.ratis-version }} | ||
thirdparty-version: | ||
description: "Ratis Third-Party Version" | ||
value: ${{ jobs.ratis.outputs.thirdparty-version }} | ||
grpc-version: | ||
description: "gRPC Version" | ||
value: ${{ jobs.ratis-thirdparty.outputs.grpc-version }} | ||
netty-version: | ||
description: "Netty Version" | ||
value: ${{ jobs.ratis-thirdparty.outputs.netty-version }} | ||
protobuf-version: | ||
description: "Protobuf Version" | ||
value: ${{ jobs.ratis-thirdparty.outputs.protobuf-version }} | ||
env: | ||
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 | ||
jobs: | ||
ratis: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 60 | ||
outputs: | ||
ratis-version: ${{ steps.versions.outputs.ratis }} | ||
thirdparty-version: ${{ steps.versions.outputs.thirdparty }} | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ inputs.repo }} | ||
ref: ${{ inputs.ref }} | ||
- name: Cache for maven dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
!~/.m2/repository/org/apache/ratis | ||
key: ratis-dependencies-${{ hashFiles('**/pom.xml') }} | ||
- name: Setup java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 8 | ||
- name: Get component versions | ||
id: versions | ||
run: | | ||
thirdparty_version="$(mvn help:evaluate -N -q -DforceStdout -Dexpression=ratis.thirdparty.version)" | ||
echo "thirdparty=${thirdparty_version}" >> $GITHUB_OUTPUT | ||
ratis_sha=$(git rev-parse --short HEAD) | ||
ratis_version="$(mvn help:evaluate -N -q -DforceStdout -Dexpression=project.version | sed -e "s/-SNAPSHOT/-${ratis_sha}-SNAPSHOT/")" | ||
echo "ratis=${ratis_version}" >> $GITHUB_OUTPUT | ||
- name: Run a full build | ||
run: | | ||
mvn versions:set -DnewVersion=${{ steps.versions.outputs.ratis }} | ||
dev-support/checks/build.sh | ||
- name: Store Maven repo for tests | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ratis-jars | ||
path: | | ||
~/.m2/repository/org/apache/ratis | ||
retention-days: 1 | ||
ratis-thirdparty: | ||
runs-on: ubuntu-20.04 | ||
needs: | ||
- ratis | ||
timeout-minutes: 30 | ||
outputs: | ||
grpc-version: ${{ steps.versions.outputs.grpc }} | ||
netty-version: ${{ steps.versions.outputs.netty }} | ||
protobuf-version: ${{ steps.versions.outputs.protobuf }} | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: apache/ratis-thirdparty | ||
ref: ${{ needs.ratis.outputs.thirdparty-version }} | ||
- name: Get component versions | ||
id: versions | ||
run: | | ||
echo "grpc=$(mvn help:evaluate -N -q -DforceStdout -Dexpression=shaded.grpc.version)" >> $GITHUB_OUTPUT | ||
echo "netty=$(mvn help:evaluate -N -q -DforceStdout -Dexpression=shaded.netty.version)" >> $GITHUB_OUTPUT | ||
echo "protobuf=$(mvn help:evaluate -N -q -DforceStdout -Dexpression=shaded.protobuf.version)" >> $GITHUB_OUTPUT | ||
debug: | ||
runs-on: ubuntu-20.04 | ||
needs: | ||
- ratis | ||
- ratis-thirdparty | ||
steps: | ||
- name: Print versions | ||
run: | | ||
echo ${{ needs.ratis.outputs.ratis-version }} | ||
echo ${{ needs.ratis.outputs.thirdparty-version }} | ||
echo ${{ needs.ratis-thirdparty.outputs.grpc-version }} | ||
echo ${{ needs.ratis-thirdparty.outputs.netty-version }} | ||
echo ${{ needs.ratis-thirdparty.outputs.protobuf-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters