Skip to content

Commit

Permalink
Change path to cache
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasas993 committed Nov 13, 2024
1 parent 27f880e commit b6ec170
Showing 1 changed file with 15 additions and 30 deletions.
45 changes: 15 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,53 +272,38 @@ jobs:
-d ${{ matrix.distribution }} \
-n ${{ steps.min_package.outputs.name }}
# Cache OpenSearch plugins
- name: Run `assemble.sh`
run: |
bash build-scripts/assemble.sh \
-a ${{ matrix.architecture }} \
-d ${{ matrix.distribution }} \
-r ${{ inputs.revision }}
- name: Get Opensearch Version
run: |
VERSION=$(bash build-scripts/upstream-version.sh)
echo "versionOpenSearch_inBuild=$VERSION" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_ENV
# Cache OpenSearch plugins
- name: Cache OpenSearch plugins
id: cache-opensearch-plugins
uses: actions/cache@v4
with:
path: |
//$HOME/.m2/org/opensearch/plugin/performance-analyzer/${{ env.VERSION }}.0/
~/.m2/org/opensearch/plugin
//$HOME/.m2/org/opensearch/plugin/performance-analyzer/${{ env.VERSION }}.0
$HOME/.m2/org/opensearch/plugin/performance-analyzer/${{ env.VERSION }}.0
key: ${{ runner.os }}-opensearch-performance-analyzer-${{ hashFiles('performance-analyzer**.xml') }}
$HOME/runner/.m2/org/opensearch/plugin/performance-analyzer/${{ env.VERSION }}.0
key: ${{ runner.os }}-opensearch-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-opensearch-performance-analyzer
${{ runner.os }}-opensearch-
${{ runner.os }}-opensearch
- if: ${{steps.cache-opensearch-plugins.cache-hit != 'true'}}
name: Cache OpenSearch plugins fail
run: echo "Failed to cache OpenSearch plugins. DIRECTORYY $HOME/.m2/org/opensearch/plugin/performance-analyzer/${{ env.VERSION }}.0/ "

- name: Run `assemble.sh`
run: |
bash build-scripts/assemble.sh \
-a ${{ matrix.architecture }} \
-d ${{ matrix.distribution }} \
-r ${{ inputs.revision }}
- name: Cache OpenSearch plugins POST
id: cache-opensearch-plugins-post
uses: actions/cache@v4
with:
path: |
//$HOME/.m2/org/opensearch/plugin/performance-analyzer/${{ env.VERSION }}.0/
$HOME/.m2/org/opensearch/plugin/performance-analyzer/${{ env.VERSION }}.0/
$HOME/runner/.m2/org/opensearch/plugin/performance-analyzer/${{ env.VERSION }}.0/
key: ${{ runner.os }}-opensearch-performance-analyzer-${{ hashFiles('performance-analyzer**.xml') }}
restore-keys: |
${{ runner.os }}-opensearch-performance-analyzer
${{ runner.os }}-opensearch
- if: ${{steps.cache-opensearch-plugins-post.cache-hit != 'true'}}
- if: ${{steps.cache-opensearch-plugins.outputs.cache-hit != 'true'}}
name: Cache OpenSearch plugins fail
run: echo "Failed to cache OpenSearch plugins post assemble script. DIRECTORYY $HOME/.m2/org/opensearch/plugin/performance-analyzer/${{ env.VERSION }}.0/ "

- name: Test RPM package
if: ${{ matrix.distribution == 'rpm' }}
uses: addnab/docker-run-action@v3
Expand Down

0 comments on commit b6ec170

Please sign in to comment.