Skip to content

Commit

Permalink
Simplify plugins build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
QU3B1M committed Nov 25, 2024
1 parent ed6ea6d commit 038d77d
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions docker/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,10 @@ RUN export VERSION=$(cat /opt/wazuh-indexer/VERSION) && \
cd /opt/wazuh-indexer-plugins/plugins/setup && \
./gradlew build -Dversion=${VERSION} -Drevision=${REVISION} && \
cd /opt/wazuh-indexer-plugins/plugins/command-manager && \
./gradlew build -Dversion=${VERSION} -Drevision=${REVISION}

# Build reporting
RUN export VERSION=$(cat /opt/wazuh-indexer/VERSION) && \
./gradlew build -Dversion=${VERSION} -Drevision=${REVISION} && \
cd /opt/wazuh-indexer-reporting && \
./gradlew build -Dversion=${VERSION} -Drevision=${REVISION}

# Copy builds /opt/wazuh-indexer/artifacts
RUN export VERSION=$(cat /opt/wazuh-indexer/VERSION) && \
./gradlew build -Dversion=${VERSION} -Drevision=${REVISION} && \
# Copy the buit packages
cp /opt/wazuh-indexer-plugins/plugins/setup/build/distributions/wazuh-indexer-setup-${VERSION}.${REVISION}.zip /opt/wazuh-indexer/artifacts/plugins/ && \
cp /opt/wazuh-indexer-plugins/plugins/command-manager/build/distributions/wazuh-indexer-command-manager-${VERSION}.${REVISION}.zip /opt/wazuh-indexer/artifacts/plugins/ && \
cp /opt/wazuh-indexer-reporting/build/distributions/wazuh-indexer-reports-scheduler-${VERSION}.${REVISION}.zip /opt/wazuh-indexer/artifacts/plugins/
Expand All @@ -127,12 +122,12 @@ USER root
# Configure Git to trust the repositories' directories
RUN git config --global --add safe.directory /opt/wazuh-indexer-plugins && \
git config --global --add safe.directory /opt/wazuh-indexer-reporting && \
git config --global --add safe.directory /opt/wazuh-indexer \
git config --global --add safe.directory /opt/wazuh-indexer

# Combined RUN command
RUN cd /opt/wazuh-indexer-plugins && PLUGINS_HASH=$(git rev-parse --short HEAD) && \
cd /opt/wazuh-indexer-reporting && REPORTING_HASH=$(git rev-parse --short HEAD) && \
cd /opt/wazuh-indexer && INDEXER_HASH=$(git rev-parse --short HEAD) && \
cd /opt/wazuh-indexer && \
PACKAGE_MIN_NAME=$(bash build-scripts/baptizer.sh -m \
-a ${ARCHITECTURE} \
-d ${DISTRIBUTION} \
Expand Down

0 comments on commit 038d77d

Please sign in to comment.