forked from wazuh/wazuh-docker
Merge pull request #1583 from wazuh/merge-4.10.1-into-4.10.2
Merge 4.10.1 into 4.10.2
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
run-name: Launch Push Docker Images - Executed by @${{ github.actor }}
|
run-name: Launch Push Docker Images - ${{ inputs.id }}
|
||||||
name: Push Docker Images
|
name: Push Docker Images
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
IMAGE_TAG:
|
image_tag:
|
||||||
description: 'Docker image tag'
|
description: 'Docker image tag'
|
||||||
default: '4.10.2'
|
default: '4.10.2'
|
||||||
required: true
|
required: true
|
||||||
DOCKER_REFERENCE:
|
docker_reference:
|
||||||
description: 'wazuh-docker reference'
|
description: 'wazuh-docker reference'
|
||||||
default: 'v4.10.2'
|
default: 'v4.10.2'
|
||||||
required: true
|
required: true
|
||||||
@@ -16,18 +16,69 @@ on:
|
|||||||
description: 'Comma-separated list of the image names to build and push'
|
description: 'Comma-separated list of the image names to build and push'
|
||||||
default: 'wazuh-manager,wazuh-dashboard,wazuh-indexer'
|
default: 'wazuh-manager,wazuh-dashboard,wazuh-indexer'
|
||||||
required: true
|
required: true
|
||||||
FILEBEAT_MODULE_VERSION:
|
filebeat_module_version:
|
||||||
description: 'Filebeat module version'
|
description: 'Filebeat module version'
|
||||||
|
default: '0.4'
|
||||||
required: true
|
required: true
|
||||||
REVISION:
|
revision:
|
||||||
description: 'Package revision'
|
description: 'Package revision'
|
||||||
default: '1'
|
default: '1'
|
||||||
required: true
|
required: true
|
||||||
PUSH_IMAGES:
|
push_images:
|
||||||
description: 'Push images'
|
description: 'Push images'
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
required: true
|
required: true
|
||||||
|
id:
|
||||||
|
description: "ID used to identify the workflow uniquely."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
dev:
|
||||||
|
description: "Add tag suffix '-dev' to the image tag ?"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
required: false
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
image_tag:
|
||||||
|
description: 'Docker image tag'
|
||||||
|
default: '4.10.0'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
docker_reference:
|
||||||
|
description: 'wazuh-docker reference'
|
||||||
|
default: 'v4.10.0'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
products:
|
||||||
|
description: 'Comma-separated list of the image names to build and push'
|
||||||
|
default: 'wazuh-manager,wazuh-dashboard,wazuh-indexer'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
filebeat_module_version:
|
||||||
|
description: 'Filebeat module version'
|
||||||
|
default: '0.4'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
revision:
|
||||||
|
description: 'Package revision'
|
||||||
|
default: '1'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
push_images:
|
||||||
|
description: 'Push images'
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
required: true
|
||||||
|
id:
|
||||||
|
description: "ID used to identify the workflow uniquely."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
dev:
|
||||||
|
description: "Add tag suffix '-dev' to the image tag ?"
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
required: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
@@ -44,23 +95,25 @@ jobs:
|
|||||||
echo "---------------------------------------------"
|
echo "---------------------------------------------"
|
||||||
echo "Inputs provided:"
|
echo "Inputs provided:"
|
||||||
echo "---------------------------------------------"
|
echo "---------------------------------------------"
|
||||||
echo "* IMAGE_TAG: ${{ inputs.IMAGE_TAG }}"
|
echo "* id: ${{ inputs.id }}"
|
||||||
echo "* DOCKER_REFERENCE: ${{ inputs.DOCKER_REFERENCE }}"
|
echo "* image_tag: ${{ inputs.image_tag }}"
|
||||||
echo "* PRODUCTS: ${{ inputs.PRODUCTS }}"
|
echo "* docker_reference: ${{ inputs.docker_reference }}"
|
||||||
echo "* FILEBEAT_MODULE_VERSION: ${{ inputs.FILEBEAT_MODULE_VERSION }}"
|
echo "* products: ${{ inputs.products }}"
|
||||||
echo "* REVISION: ${{ inputs.REVISION }}"
|
echo "* filebeat_module_version: ${{ inputs.filebeat_module_version }}"
|
||||||
echo "* PUSH_IMAGES: ${{ inputs.PUSH_IMAGES }}"
|
echo "* revision: ${{ inputs.revision }}"
|
||||||
|
echo "* push_images: ${{ inputs.push_images }}"
|
||||||
|
echo "* dev: ${{ inputs.dev }}"
|
||||||
echo "---------------------------------------------"
|
echo "---------------------------------------------"
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.DOCKER_REFERENCE }}
|
ref: ${{ inputs.docker_reference }}
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: wazuh
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
- name: Install Docker Compose
|
- name: Install Docker Compose
|
||||||
@@ -71,10 +124,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Wazuh images
|
- name: Build Wazuh images
|
||||||
run: |
|
run: |
|
||||||
IMAGE_TAG=${{ inputs.IMAGE_TAG }}
|
IMAGE_TAG=${{ inputs.image_tag }}
|
||||||
FILEBEAT_MODULE_VERSION=${{ inputs.FILEBEAT_MODULE_VERSION }}
|
FILEBEAT_MODULE_VERSION=${{ inputs.filebeat_module_version }}
|
||||||
REVISION=${{ inputs.REVISION }}
|
REVISION=${{ inputs.revision }}
|
||||||
PUSH_IMAGES=${{ inputs.PUSH_IMAGES }}
|
|
||||||
|
|
||||||
if [[ "$IMAGE_TAG" == *"-"* ]]; then
|
if [[ "$IMAGE_TAG" == *"-"* ]]; then
|
||||||
IFS='-' read -r -a tokens <<< "$IMAGE_TAG"
|
IFS='-' read -r -a tokens <<< "$IMAGE_TAG"
|
||||||
@@ -89,8 +141,9 @@ jobs:
|
|||||||
./build-docker-images/build-images.sh -v $IMAGE_TAG -r $REVISION -f $FILEBEAT_MODULE_VERSION
|
./build-docker-images/build-images.sh -v $IMAGE_TAG -r $REVISION -f $FILEBEAT_MODULE_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Save .env file (generated by build-images.sh) contents to $GITHUB_ENV
|
||||||
ENV_FILE_PATH=".env"
|
ENV_FILE_PATH=".env"
|
||||||
# Save .env file contents to $GITHUB_ENV
|
|
||||||
if [ -f $ENV_FILE_PATH ]; then
|
if [ -f $ENV_FILE_PATH ]; then
|
||||||
while IFS= read -r line || [ -n "$line" ]; do
|
while IFS= read -r line || [ -n "$line" ]; do
|
||||||
echo "$line" >> $GITHUB_ENV
|
echo "$line" >> $GITHUB_ENV
|
||||||
@@ -100,15 +153,15 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
- name: Tag and Push Wazuh images
|
- name: Tag and Push Wazuh images
|
||||||
if: ${{ inputs.PUSH_IMAGES }}
|
if: ${{ inputs.push_images }}
|
||||||
run: |
|
run: |
|
||||||
IMAGE_TAG=${{ inputs.IMAGE_TAG }}
|
IMAGE_TAG="${{ inputs.image_tag }}$( [ "${{ inputs.dev }}" == "true" ] && echo '-dev' || true )"
|
||||||
IMAGE_NAMES=${{ inputs.PRODUCTS }}
|
IMAGE_NAMES=${{ inputs.products }}
|
||||||
IFS=',' read -r -a images <<< "$IMAGE_NAMES"
|
IFS=',' read -r -a images <<< "$IMAGE_NAMES"
|
||||||
for image in "${images[@]}"; do
|
for image in "${images[@]}"; do
|
||||||
echo "Tagging and pushing wazuh/$image:${WAZUH_VERSION} to wazuh/$image:$IMAGE_TAG"
|
echo "Tagging and pushing wazuh/$image:${WAZUH_VERSION} to wazuh/$image:$IMAGE_TAG"
|
||||||
docker tag wazuh/$image:${WAZUH_VERSION} wazuh/$image:$IMAGE_TAG
|
docker tag wazuh/$image:${WAZUH_VERSION} wazuh/$image:$IMAGE_TAG
|
||||||
|
echo "Pushing wazuh/$image:$IMAGE_TAG ..."
|
||||||
docker push wazuh/$image:$IMAGE_TAG
|
docker push wazuh/$image:$IMAGE_TAG
|
||||||
done
|
done
|
||||||
|
|||||||
+61
-8
@@ -1,26 +1,79 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## Wazuh Docker v4.10.2
|
## [4.10.2]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Update Wazuh to version [4.10.2](https://github.com/wazuh/wazuh/blob/v4.10.2/CHANGELOG.md#v4101)
|
- none
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Deleted
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
## [4.10.1]
|
||||||
|
|
||||||
## Wazuh Docker v4.10.1
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Update Wazuh to version [4.10.1](https://github.com/wazuh/wazuh/blob/v4.10.1/CHANGELOG.md#v4101)
|
- none
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Deleted
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
## [4.10.0]
|
||||||
|
|
||||||
## Wazuh Docker v4.10.0
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Migrate the push docker images procedure to GitHub Actions ([#5651](https://github.com/wazuh/wazuh-qa/issues/5651))
|
- Migrate the push docker images procedure to GitHub Actions ([#5651](https://github.com/wazuh/wazuh-qa/issues/5651))
|
||||||
- Update Wazuh to version [4.10.0](https://github.com/wazuh/wazuh/blob/v4.10.0/CHANGELOG.md#v4100)
|
|
||||||
|
|
||||||
## Wazuh Docker v4.9.1
|
### Changed
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Deleted
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
## [4.9.1]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Update Wazuh to version [4.9.1](https://github.com/wazuh/wazuh/blob/v4.9.1/CHANGELOG.md#v491)
|
- None
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix typos into Wazuh manager entrypoint ([#1569](https://github.com/wazuh/wazuh-docker/pull/1569))
|
||||||
|
|
||||||
|
### Deleted
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
|
||||||
## Wazuh Docker v4.9.0
|
## Wazuh Docker v4.9.0
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ mount_permanent_data() {
|
|||||||
print "Installing ${permanent_dir}"
|
print "Installing ${permanent_dir}"
|
||||||
exec_cmd "cp -a ${data_tmp}. ${permanent_dir}"
|
exec_cmd "cp -a ${data_tmp}. ${permanent_dir}"
|
||||||
else
|
else
|
||||||
print "The path ${permanent_dir} is empty, skiped"
|
print "The path ${permanent_dir} is empty, skipped"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$INDEXER_URL" != "" ]; then
|
if [ "$INDEXER_URL" != "" ]; then
|
||||||
>&2 echo "Customize Elasticsearch ouput IP"
|
>&2 echo "Customize Elasticsearch output IP"
|
||||||
sed -i "s|hosts:.*|hosts: ['$INDEXER_URL']|g" /etc/filebeat/filebeat.yml
|
sed -i "s|hosts:.*|hosts: ['$INDEXER_URL']|g" /etc/filebeat/filebeat.yml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ EOF
|
|||||||
if /var/ossec/framework/python/bin/python3 /var/ossec/framework/scripts/create_user.py; then
|
if /var/ossec/framework/python/bin/python3 /var/ossec/framework/scripts/create_user.py; then
|
||||||
# remove json if exit code is 0
|
# remove json if exit code is 0
|
||||||
rm /var/ossec/api/configuration/admin.json
|
rm /var/ossec/api/configuration/admin.json
|
||||||
rm /var/ossec/framework/scripts/create_user.py
|
|
||||||
else
|
else
|
||||||
echored "There was an error configuring the API user"
|
echored "There was an error configuring the API user"
|
||||||
# terminate container to avoid unpredictable behavior
|
# terminate container to avoid unpredictable behavior
|
||||||
|
|||||||
Reference in New Issue
Block a user