This is an automated email from the ASF dual-hosted git repository. madhan pushed a commit to branch ranger-2.6 in repository https://gitbox.apache.org/repos/asf/ranger.git
commit c87e8077146c2a0392557039b7a8bafe3a20df40 Author: Doroszlai, Attila <[email protected]> AuthorDate: Tue Dec 10 01:33:57 2024 +0100 RANGER-5066. Improve CI workflow (#438) Changes include: - using actions/cache v4 - remove apache repos (let them be inherited) - add MAVEN_OPTS with http retry - build `build-11` only after `build-8` and initiate `docker-build` after `build-8` succeeds - Run the workflow on push for any branch (cherry picked from commit 6f57f2f696d1c302af7e2f3258d1ddad33e7a3e8) --- .github/workflows/maven.yml | 38 +++++++++++++++++++++++++++++++------- pom.xml | 22 ---------------------- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7aa7d6e52..c4183c260 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -26,36 +26,61 @@ name: CI on: push: - branches: [ "master" ] pull_request: branches: [ "master" ] +env: + MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 + jobs: build-8: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Cache for maven dependencies + uses: actions/cache@v4 + with: + path: | + ~/.m2/repository/*/*/* + !~/.m2/repository/org/apache/ranger + key: maven-repo-${{ hashFiles('**/pom.xml') }} + restore-keys: | + maven-repo- - name: Set up JDK 8 uses: actions/setup-java@v4 with: java-version: '8' distribution: 'temurin' - cache: maven - name: build (8) - run: mvn -T 8 clean install --no-transfer-progress -B -V + run: mvn -T 8 clean verify --no-transfer-progress -B -V + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: target-8 + path: target/* build-11: + needs: + - build-8 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Cache for maven dependencies + uses: actions/cache/restore@v4 + with: + path: | + ~/.m2/repository/*/*/* + !~/.m2/repository/org/apache/ranger + key: maven-repo-${{ hashFiles('**/pom.xml') }} + restore-keys: | + maven-repo- - name: Set up JDK 11 uses: actions/setup-java@v4 with: java-version: '11' distribution: 'temurin' - cache: maven - name: build (11) - run: mvn -T 8 clean install -pl '!knox-agent' --no-transfer-progress -B -V + run: mvn -T 8 clean verify -pl '!knox-agent' --no-transfer-progress -B -V - name: Upload artifacts uses: actions/upload-artifact@v4 with: @@ -65,7 +90,6 @@ jobs: docker-build: needs: - build-8 - - build-11 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -80,7 +104,7 @@ jobs: cp version dev-support/ranger-docker/dist - name: Cache downloaded archives - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: dev-support/ranger-docker/downloads key: ${{ runner.os }}-ranger-downloads-${{ hashFiles('dev-support/ranger-docker/.env') }} diff --git a/pom.xml b/pom.xml index b83f8a5a0..7e92ce405 100644 --- a/pom.xml +++ b/pom.xml @@ -777,28 +777,6 @@ <url>https://issues.apache.org/jira/browse/ranger</url> </issueManagement> <repositories> - <repository> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - <id>apache.snapshots.https</id> - <name>Apache Development Snapshot Repository</name> - <url>https://repository.apache.org/content/repositories/snapshots</url> - </repository> - <repository> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - <id>apache.public.https</id> - <name>Apache Development Snapshot Repository</name> - <url>https://repository.apache.org/content/repositories/public</url> - </repository> <repository> <id>jetbrains-pty4j</id> <name>jetbrains-intellij-dependencies</name>
