diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 68c89f0e20e7a..49295a6a02fee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -279,6 +279,8 @@ 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 @@ -286,10 +288,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.pre-assemble-cache-m2-opensearch-plugins.outputs.cache-hit == 'true'}} name: PRE Cache ${{ env.maven_local_path }} success @@ -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 diff --git a/build-scripts/assemble.sh b/build-scripts/assemble.sh index 78f90ce17a719..9149a5538bf98 100644 --- a/build-scripts/assemble.sh +++ b/build-scripts/assemble.sh @@ -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"