Skip to content

Commit

Permalink
Add versión of OpenSearch to key of cache
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasas993 committed Nov 14, 2024
1 parent cbd4cf0 commit 5ae005a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,17 +279,18 @@ jobs:
VERSION=$(bash build-scripts/upstream-version.sh)
echo "versionOpenSearch_inBuild=$VERSION" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_ENV
env:
opensearch_version: bash build-scripts/upstream-version.sh

- name: PRE Cache ${{ env.maven_local_path }}
id: pre-assemble-cache-m2-opensearch-plugins
uses: actions/cache@v4
with:
path: |
${{ env.maven_local_path }}
key: ${{ runner.os }}-m2-opensearch-plugin-${{ hashFiles('**.sha1') }}
key: ${{ runner.os }}-m2-opensearch-${{ opensearch_version }}-plugin-${{ hashFiles('**.sha1') }}
restore-keys: |
${{ runner.os }}-m2-opensearch-plugin-
${{ runner.os }}-m2-opensearch-plugin
${{ runner.os }}-m2-opensearch-plugin-${{ opensearch_version }}-
- if: ${{steps.pre-assemble-cache-m2-opensearch-plugins.outputs.cache-hit == 'true'}}
name: PRE Cache ${{ env.maven_local_path }} success
Expand All @@ -308,10 +309,9 @@ jobs:
with:
path: |
${{ env.maven_local_path }}
key: ${{ runner.os }}-m2-opensearch-plugin-${{ hashFiles('**.sha1') }}
key: ${{ runner.os }}-m2-opensearch-${{ opensearch_version }}-plugin-${{ hashFiles('**.sha1') }}
restore-keys: |
${{ runner.os }}-m2-opensearch-plugin-
${{ runner.os }}-m2-opensearch-plugin
${{ runner.os }}-m2-opensearch-plugin-${{ opensearch_version }}-
- if: ${{steps.post-assemble-cache-m2-opensearch-plugins.outputs.cache-hit == 'true'}}
name: POST Cache ${{ env.maven_local_path }} success
Expand Down
1 change: 0 additions & 1 deletion build-scripts/assemble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ function install_plugins() {
echo "Download ${plugin} plugin."
mvn -Dmaven.repo.local="${maven_repo_local}" org.apache.maven.plugins:maven-dependency-plugin:2.1:get -DrepoUrl=https://repo1.maven.org/maven2 -Dartifact="${plugin_from_maven}:zip"
OPENSEARCH_PATH_CONF=$PATH_CONF "${PATH_BIN}/opensearch-plugin" install --batch --verbose "file:${maven_repo_local}/org/opensearch/plugin/${plugin}/${VERSION}.0/${plugin}-${VERSION}.0.zip"

done

echo "Installing Wazuh plugins"
Expand Down

0 comments on commit 5ae005a

Please sign in to comment.