RATIS-1860. Add ratis-shell cmd to generate a new raft-meta.conf. #2500
Workflow file for this run
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
# 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: build-branch | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v3 | |
- name: Cache for maven dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: maven-repo-${{ hashFiles('**/pom.xml') }}-${{ github.job }} | |
restore-keys: | | |
maven-repo-${{ hashFiles('**/pom.xml') }} | |
maven-repo- | |
- name: Setup java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 8 | |
- name: Run a full build | |
run: ./dev-support/checks/build.sh -Prelease assembly:single | |
- name: Store source tarball for compilation | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ratis-src | |
path: ratis-assembly/target/apache-ratis-*-src.tar.gz | |
retention-days: 1 | |
- name: Delete temporary build artifacts | |
run: rm -rf ~/.m2/repository/org/apache/ratis | |
if: always() | |
compile: | |
needs: | |
- build | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
java: [ 11 ] | |
fail-fast: false | |
steps: | |
- name: Download source tarball | |
uses: actions/download-artifact@v3 | |
with: | |
name: ratis-src | |
- name: Untar sources | |
run: | | |
tar --strip-components 1 -xzvf apache-ratis-*-src.tar.gz | |
- name: Cache for maven dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: maven-repo-${{ hashFiles('**/pom.xml') }}-${{ github.job }} | |
restore-keys: | | |
maven-repo-${{ hashFiles('**/pom.xml') }} | |
maven-repo- | |
- name: Setup java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
- name: Run a full build | |
run: ./dev-support/checks/build.sh | |
- name: Delete temporary build artifacts | |
run: rm -rf ~/.m2/repository/org/apache/ratis | |
if: always() | |
rat: | |
name: rat | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache for maven dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: maven-repo-${{ hashFiles('**/pom.xml') }}-${{ github.job }} | |
restore-keys: | | |
maven-repo-${{ hashFiles('**/pom.xml') }} | |
maven-repo- | |
- run: ./dev-support/checks/rat.sh | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: rat | |
path: target/rat | |
- name: Delete temporary build artifacts | |
run: rm -rf ~/.m2/repository/org/apache/ratis | |
if: always() | |
author: | |
name: author | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: ./dev-support/checks/author.sh | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: author | |
path: target/author | |
unit: | |
name: unit | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
profile: | |
- grpc | |
- server | |
- misc | |
fail-fast: false | |
steps: | |
# TEMPORARY WHILE GITHUB FIXES https://github.com/actions/virtual-environments/issues/3185 | |
- name: Add the current IP address, long hostname and short hostname record to /etc/hosts file | |
run: | | |
echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts | |
# REMOVE CODE ABOVE WHEN ISSUE IS ADDRESSED! | |
- uses: actions/checkout@v3 | |
- name: Cache for maven dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: maven-repo-${{ hashFiles('**/pom.xml') }}-${{ github.job }} | |
restore-keys: | | |
maven-repo-${{ hashFiles('**/pom.xml') }} | |
maven-repo- | |
- run: ./dev-support/checks/unit.sh -P${{ matrix.profile }}-tests | |
- name: Summary of failures | |
run: cat target/${{ github.job }}/summary.txt | |
if: ${{ !cancelled() }} | |
- uses: actions/upload-artifact@v3 | |
if: ${{ !cancelled() }} | |
with: | |
name: unit-${{ matrix.profile }} | |
path: target/unit | |
- name: Delete temporary build artifacts | |
run: rm -rf ~/.m2/repository/org/apache/ratis | |
if: always() | |
checkstyle: | |
name: checkstyle | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache for maven dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: maven-repo-${{ hashFiles('**/pom.xml') }}-${{ github.job }} | |
restore-keys: | | |
maven-repo-${{ hashFiles('**/pom.xml') }} | |
maven-repo- | |
- run: ./dev-support/checks/checkstyle.sh | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: checkstyle | |
path: target/checkstyle | |
- name: Delete temporary build artifacts | |
run: rm -rf ~/.m2/repository/org/apache/ratis | |
if: always() | |
findbugs: | |
name: findbugs | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Setup java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 8 | |
- uses: actions/checkout@v3 | |
- name: Cache for maven dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: maven-repo-${{ hashFiles('**/pom.xml') }}-${{ github.job }} | |
restore-keys: | | |
maven-repo-${{ hashFiles('**/pom.xml') }} | |
maven-repo- | |
- run: ./dev-support/checks/findbugs.sh | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: findbugs | |
path: target/findbugs | |
- name: Delete temporary build artifacts | |
run: rm -rf ~/.m2/repository/org/apache/ratis | |
if: always() | |
sonar: | |
name: sonar | |
runs-on: ubuntu-20.04 | |
if: (github.repository == 'apache/ratis' || github.repository == 'apache/incubator-ratis') && github.event_name != 'pull_request' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache for maven dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: maven-repo-${{ hashFiles('**/pom.xml') }}-${{ github.job }} | |
restore-keys: | | |
maven-repo-${{ hashFiles('**/pom.xml') }} | |
maven-repo- | |
- name: Setup java 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- run: ./dev-support/checks/sonar.sh | |
env: | |
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Delete temporary build artifacts | |
run: rm -rf ~/.m2/repository/org/apache/ratis | |
if: always() |