forked from wazuh/wazuh-docker
Merge pull request #2344 from wazuh/change/2333-change-new-path-artifact_urls-file
Add new path on artifact_urls file
This commit is contained in:
@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- Add new path on artifact_urls file ([#2344](https://github.com/wazuh/wazuh-docker/pull/2344))
|
||||||
- Presigned URLs generation enhancement ([#2346](https://github.com/wazuh/wazuh-docker/pull/2346))
|
- 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))
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user