forked from wazuh/wazuh-docker
Compare commits
29
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93ac3e59f9 | ||
|
|
e3b30d3d23 | ||
|
|
dd1b0e9afa | ||
|
|
601adce637 | ||
|
|
992a78c4a0 | ||
|
|
325371a644 | ||
|
|
8d9afc6037 | ||
|
|
739dbca613 | ||
|
|
6feb42ab07 | ||
|
|
75959484f3 | ||
|
|
ebbf3b585f | ||
|
|
3384ccbc9b | ||
|
|
38a9c54eea | ||
|
|
3f9f48302a | ||
|
|
28fefbc5b6 | ||
|
|
df8c1555ed | ||
|
|
1c527dc643 | ||
|
|
9e086e4eab | ||
|
|
1fddae6f5c | ||
|
|
5950bdc474 | ||
|
|
ad71d8596d | ||
|
|
158aedd989 | ||
|
|
3adc3aedd5 | ||
|
|
6087f14835 | ||
|
|
56c73be50c | ||
|
|
4161af024f | ||
|
|
6aa5015a0b | ||
|
|
2d1c28ca8a | ||
|
|
bab0839cea |
@@ -138,6 +138,10 @@ jobs:
|
|||||||
git add .
|
git add .
|
||||||
git commit -m "feat: bump ${{ github.ref_name }}"
|
git commit -m "feat: bump ${{ github.ref_name }}"
|
||||||
|
|
||||||
|
- name: Fetch full history (Revert)
|
||||||
|
if: inputs.revert == true
|
||||||
|
run: git fetch --unshallow
|
||||||
|
|
||||||
- name: Revert references (Revert)
|
- name: Revert references (Revert)
|
||||||
id: revert_step
|
id: revert_step
|
||||||
if: inputs.revert == true
|
if: inputs.revert == true
|
||||||
@@ -214,4 +218,4 @@ jobs:
|
|||||||
echo "Branch: ${{ steps.vars.outputs.branch_name }}"
|
echo "Branch: ${{ steps.vars.outputs.branch_name }}"
|
||||||
echo "PR: ${{ steps.create_pr.outputs.pull_request_url }}"
|
echo "PR: ${{ steps.create_pr.outputs.pull_request_url }}"
|
||||||
echo "Revert bumper scripts logs:"
|
echo "Revert bumper scripts logs:"
|
||||||
cat ${BUMP_LOG_PATH}/repository_bumper*log || true
|
cat ${BUMP_LOG_PATH}/repository_bumper*log || true
|
||||||
|
|||||||
@@ -233,6 +233,11 @@ jobs:
|
|||||||
source ${{ env.WORKFLOW_VENV }}/bin/activate
|
source ${{ env.WORKFLOW_VENV }}/bin/activate
|
||||||
WAZUH_COMPONENTS='${{ needs.setup.outputs.WAZUH_COMPONENTS }}'
|
WAZUH_COMPONENTS='${{ needs.setup.outputs.WAZUH_COMPONENTS }}'
|
||||||
COMMIT_LIST='${{ needs.setup.outputs.COMMIT_LIST }}'
|
COMMIT_LIST='${{ needs.setup.outputs.COMMIT_LIST }}'
|
||||||
|
SCRIPT_PARAMS="--process ${{ env.PRESIGNED_URLS_SCRIPT_PROCESS }} \
|
||||||
|
--wazuh-version ${{ env.WAZUH_VERSION }} \
|
||||||
|
--aws-s3-bucket-dev ${{ env.LOCAL_AWS_S3_BUCKET_DEV }} \
|
||||||
|
--assistant-revision $ASSISTANT_REVISION "
|
||||||
|
|
||||||
|
|
||||||
# Parse components and their revisions
|
# Parse components and their revisions
|
||||||
COMPONENTS=($(echo "$WAZUH_COMPONENTS" | jq -r '.[]'))
|
COMPONENTS=($(echo "$WAZUH_COMPONENTS" | jq -r '.[]'))
|
||||||
@@ -251,29 +256,22 @@ jobs:
|
|||||||
for i in "${!COMPONENTS[@]}"; do
|
for i in "${!COMPONENTS[@]}"; do
|
||||||
case "${COMPONENTS[$i]}" in
|
case "${COMPONENTS[$i]}" in
|
||||||
wazuh-manager)
|
wazuh-manager)
|
||||||
MANAGER_REVISION="${REVISIONS[$i]}"
|
SCRIPT_PARAMS+="--manager-revision ${REVISIONS[$i]} "
|
||||||
;;
|
;;
|
||||||
wazuh-dashboard)
|
wazuh-dashboard)
|
||||||
DASHBOARD_REVISION="${REVISIONS[$i]}"
|
SCRIPT_PARAMS+="--dashboard-revision ${REVISIONS[$i]} "
|
||||||
;;
|
;;
|
||||||
wazuh-indexer)
|
wazuh-indexer)
|
||||||
INDEXER_REVISION="${REVISIONS[$i]}"
|
SCRIPT_PARAMS+="--indexer-revision ${REVISIONS[$i]} "
|
||||||
;;
|
;;
|
||||||
wazuh-agent)
|
wazuh-agent)
|
||||||
AGENT_REVISION="${REVISIONS[$i]}"
|
SCRIPT_PARAMS+="--agent-revision ${REVISIONS[$i]} "
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
python ${{ env.GENERATE_PRESIGNED_URLS_SCRIPT_PATH }} \
|
python ${{ env.GENERATE_PRESIGNED_URLS_SCRIPT_PATH }} \
|
||||||
--process ${{ env.PRESIGNED_URLS_SCRIPT_PROCESS }} \
|
$SCRIPT_PARAMS
|
||||||
--wazuh-version ${{ env.WAZUH_VERSION }} \
|
|
||||||
--aws-s3-bucket-dev ${{ env.LOCAL_AWS_S3_BUCKET_DEV }} \
|
|
||||||
--indexer-revision $INDEXER_REVISION \
|
|
||||||
--manager-revision $MANAGER_REVISION \
|
|
||||||
--dashboard-revision $DASHBOARD_REVISION \
|
|
||||||
--agent-revision $AGENT_REVISION \
|
|
||||||
--assistant-revision $ASSISTANT_REVISION
|
|
||||||
|
|
||||||
- name: Save presigned URLs file to artifact
|
- name: Save presigned URLs file to artifact
|
||||||
if: ${{ inputs.dev == true }}
|
if: ${{ inputs.dev == true }}
|
||||||
|
|||||||
+6
-3
@@ -5,12 +5,14 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- None
|
- Add revert option into bumper workflow ([#2330](https://github.com/wazuh/wazuh-docker/pull/2330))
|
||||||
|
- Add checks for artifact_urls.yaml download ([#2315](https://github.com/wazuh/wazuh-docker/pull/2315))
|
||||||
|
- Add set_as_main option ([#2293](https://github.com/wazuh/wazuh-docker/pull/2293))
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Add checks for artifact_urls.yaml download ([#2315](https://github.com/wazuh/wazuh-docker/pull/2315))
|
- Add new path on artifact_urls file ([#2344](https://github.com/wazuh/wazuh-docker/pull/2344))
|
||||||
- Add set_as_main option ([#2293](https://github.com/wazuh/wazuh-docker/pull/2293))
|
- Presigned URLs generation enhancement ([#2346](https://github.com/wazuh/wazuh-docker/pull/2346))
|
||||||
- Adapt bumper workflows to change main branch ([#2294](https://github.com/wazuh/wazuh-docker/pull/2294))
|
- Adapt bumper workflows to change main branch ([#2294](https://github.com/wazuh/wazuh-docker/pull/2294))
|
||||||
- Delete all API user and password references and Wazuh agent references ([#2289](https://github.com/wazuh/wazuh-docker/pull/2289))
|
- Delete all API user and password references and Wazuh agent references ([#2289](https://github.com/wazuh/wazuh-docker/pull/2289))
|
||||||
- Create certificate directory with default user and group ([#2287](https://github.com/wazuh/wazuh-docker/pull/2287))
|
- Create certificate directory with default user and group ([#2287](https://github.com/wazuh/wazuh-docker/pull/2287))
|
||||||
@@ -49,6 +51,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Delete setcap command on deprecated file ([#2345](https://github.com/wazuh/wazuh-docker/pull/2345))
|
||||||
- Modify the choice of a correct tag ([#2313](https://github.com/wazuh/wazuh-docker/pull/2313))
|
- Modify the choice of a correct tag ([#2313](https://github.com/wazuh/wazuh-docker/pull/2313))
|
||||||
- Artifact URL download fix ([#2306](https://github.com/wazuh/wazuh-docker/pull/2306))
|
- Artifact URL download fix ([#2306](https://github.com/wazuh/wazuh-docker/pull/2306))
|
||||||
- Change API query method. ([#2275](https://github.com/wazuh/wazuh-docker/pull/2275))
|
- Change API query method. ([#2275](https://github.com/wazuh/wazuh-docker/pull/2275))
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ build() {
|
|||||||
WAZUH_STAGE=$(jq -r '.stage' ../VERSION.json)
|
WAZUH_STAGE=$(jq -r '.stage' ../VERSION.json)
|
||||||
# ARTIFACT_URLS_FILE: The name of the artifact URLs file.
|
# ARTIFACT_URLS_FILE: The name of the artifact URLs file.
|
||||||
ARTIFACT_URLS_FILE="artifact_urls.yaml"
|
ARTIFACT_URLS_FILE="artifact_urls.yaml"
|
||||||
|
# ARTIFACT_URLS_DIR: The name of the artifact URLs directory.
|
||||||
|
ARTIFACT_URLS_DIR="artifact_urls"
|
||||||
|
|
||||||
# Check if the artifact file already exists to prevent redundant downloads
|
# Check if the artifact file already exists to prevent redundant downloads
|
||||||
if [[ -f "$ARTIFACT_URLS_FILE" ]]; then
|
if [[ -f "$ARTIFACT_URLS_FILE" ]]; then
|
||||||
@@ -92,7 +94,7 @@ build() {
|
|||||||
|
|
||||||
# Final download using dynamic variables based on the release type.
|
# Final download using dynamic variables based on the release type.
|
||||||
# Pattern: server / stage / major_version.x / filename
|
# Pattern: server / stage / major_version.x / filename
|
||||||
FULL_URL="https://${PACKAGE_URL}/${RELEASE_STAGE}/${WAZUH_MAJOR_VERSION}.x/${ARTIFACT_URLS_DOWNLOAD}"
|
FULL_URL="https://${PACKAGE_URL}/${RELEASE_STAGE}/${WAZUH_MAJOR_VERSION}.x/${ARTIFACT_URLS_DIR}/${ARTIFACT_URLS_DOWNLOAD}"
|
||||||
echo "Attempting to download: $FULL_URL"
|
echo "Attempting to download: $FULL_URL"
|
||||||
curl -fsSL -o "$ARTIFACT_URLS_FILE" "$FULL_URL" || {
|
curl -fsSL -o "$ARTIFACT_URLS_FILE" "$FULL_URL" || {
|
||||||
echo "Error: Failed to download artifact URLs from $FULL_URL" >&2
|
echo "Error: Failed to download artifact URLs from $FULL_URL" >&2
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ RUN mkdir -p $INSTALL_DIR/data/wazuh && chmod -R 775 $INSTALL_DIR/data/wazuh
|
|||||||
RUN mkdir -p $INSTALL_DIR/data/wazuh/config && chmod -R 775 $INSTALL_DIR/data/wazuh/config
|
RUN mkdir -p $INSTALL_DIR/data/wazuh/config && chmod -R 775 $INSTALL_DIR/data/wazuh/config
|
||||||
RUN mkdir -p $INSTALL_DIR/data/wazuh/logs && chmod -R 775 $INSTALL_DIR/data/wazuh/logs
|
RUN mkdir -p $INSTALL_DIR/data/wazuh/logs && chmod -R 775 $INSTALL_DIR/data/wazuh/logs
|
||||||
RUN setcap 'cap_net_bind_service=-ep' /usr/share/wazuh-dashboard/node/bin/node
|
RUN setcap 'cap_net_bind_service=-ep' /usr/share/wazuh-dashboard/node/bin/node
|
||||||
RUN setcap 'cap_net_bind_service=-ep' /usr/share/wazuh-dashboard/node/fallback/bin/node
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Build stage 1 (the current Wazuh dashboard image):
|
# Build stage 1 (the current Wazuh dashboard image):
|
||||||
@@ -63,13 +62,13 @@ RUN yum install shadow-utils -y && \
|
|||||||
yum clean all && \
|
yum clean all && \
|
||||||
getent group $GROUP || groupadd -r -g 1000 $GROUP && \
|
getent group $GROUP || groupadd -r -g 1000 $GROUP && \
|
||||||
useradd --system \
|
useradd --system \
|
||||||
--uid 1000 \
|
--uid 1000 \
|
||||||
--no-create-home \
|
--no-create-home \
|
||||||
--home-dir $INSTALL_DIR \
|
--home-dir $INSTALL_DIR \
|
||||||
--gid $GROUP \
|
--gid $GROUP \
|
||||||
--shell /sbin/nologin \
|
--shell /sbin/nologin \
|
||||||
--comment "$USER user" \
|
--comment "$USER user" \
|
||||||
$USER && \
|
$USER && \
|
||||||
chmod 700 /entrypoint.sh && \
|
chmod 700 /entrypoint.sh && \
|
||||||
chmod 700 /wazuh_dashboard_config.sh && \
|
chmod 700 /wazuh_dashboard_config.sh && \
|
||||||
mkdir -p $INSTALL_DIR && \
|
mkdir -p $INSTALL_DIR && \
|
||||||
|
|||||||
Reference in New Issue
Block a user