diff --git a/.github/actions/prepare/action.yml b/.github/actions/prepare/action.yml deleted file mode 100644 index bfcc20aec0..0000000000 --- a/.github/actions/prepare/action.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: "prepare" -description: "Prepare environment" -runs: - using: "composite" - steps: - - shell: bash - run: ${{ github.action_path }}/prepare.sh \ No newline at end of file diff --git a/.github/actions/prepare/prepare.sh b/.github/actions/prepare/prepare.sh deleted file mode 100755 index 454151de31..0000000000 --- a/.github/actions/prepare/prepare.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -set -e - -M2_REPO_DIR="$HOME/.m2/repository" -M2_REPO_TTL_MINUTES=10080 -M2_REPO_EXPIRED="$(find $M2_REPO_DIR -type f -mmin +$M2_REPO_TTL_MINUTES 2>/dev/null | head -n 1 | wc -l)" -M2_REPO_FILE_COUNT="$(find $M2_REPO_DIR -type f 2>/dev/null | wc -l)" - -ORG_ALFRESCO_M2_REPO_DIR="$M2_REPO_DIR/org/alfresco" -ORG_ALFRESCO_M2_REPO_TTL_MINUTES=1440 -ORG_ALFRESCO_M2_REPO_EXPIRED="$(find $ORG_ALFRESCO_M2_REPO_DIR -type f -mmin +$ORG_ALFRESCO_M2_REPO_TTL_MINUTES 2>/dev/null | head -n 1 | wc -l)" - -echo "Files in the maven repo: $M2_REPO_FILE_COUNT" - -if [ $ORG_ALFRESCO_M2_REPO_EXPIRED -eq 1 ];then - echo "Invalidating org/alfresco maven local cache." - rm -rf "$ORG_ALFRESCO_M2_REPO_DIR" -fi - -if [ $M2_REPO_EXPIRED -eq 1 ];then - echo "Invalidating maven local cache." - rm -rf "$M2_REPO_DIR" -fi - -if [ $M2_REPO_FILE_COUNT -lt 1000 ] || [ $ORG_ALFRESCO_M2_REPO_EXPIRED -eq 1 ] || [ $M2_REPO_EXPIRED -eq 1 ];then - echo "Populating maven cache." - export BUILD_PROFILES="-Pall-tas-tests,ags" - export BUILD_OPTIONS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dmaven.artifact.threads=8" - source "$(dirname "${BASH_SOURCE[0]}")/build.sh" -fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45d6e19d25..918f616048 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ env: DEVELOPMENT_VERSION: "17.92-SNAPSHOT" # The version that will be set in pom files after the release (next dev version) RELEASE_VERSION: "17.91" # The version of the release (tag). GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 - MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} JAVA_VERSION: "17" @@ -20,12 +20,12 @@ jobs: - name: "Clean cache" run: bash scripts/travis/cleanup_cache.sh - name: "Prepare environment" - - uses: ./.github/actions/prepare + run: bash scripts/travis/prepare.sh veracode: runs-on: ubuntu-latest needs: - - pre-commit + - prepare if: > (github.ref_name == 'master' || contains(github.ref_name, 'release')) && ! contains(github.event.head_commit.message, '[skip build]') diff --git a/.travis.yml b/.travis.yml index 87e81c2be4..69772f89fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,9 +20,6 @@ before_cache: bash scripts/travis/cleanup_cache.sh branches: only: - master - - /release\/.*/ - - /feature\/.*/ - - /fix\/.*/ env: global: