forked from wazuh/wazuh-docker
Add support for generate_presigned_dev_urls srcipt
This commit is contained in:
@@ -410,6 +410,7 @@ jobs:
|
||||
pip install -r wazuh-automation/deployability/deps/requirements.txt
|
||||
pip install -r wazuh-automation/integration-test-module/requirements.txt
|
||||
pip install -e wazuh-automation/integration-test-module/
|
||||
pip install pyyaml
|
||||
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
@@ -418,6 +419,19 @@ jobs:
|
||||
role-session-name: docker-test-${{ github.run_id }}-${{ matrix.deployment_type }}
|
||||
aws-region: ${{ env.REGION }}
|
||||
|
||||
- name: Generate presigned cert tool URL
|
||||
run: |
|
||||
python wazuh-automation/tools/sign_urls/generate_presigned_dev_urls.py \
|
||||
--process build_docker \
|
||||
--wazuh-version "${{ env.DOCKER_VERSION }}" \
|
||||
--aws-s3-bucket-dev "${{ vars.AWS_S3_BUCKET_DEV }}"
|
||||
|
||||
python3 -c "
|
||||
import yaml
|
||||
data = yaml.safe_load(open('/tmp/artifact_urls.yaml'))
|
||||
print(f'wazuh_certs_tool={data[\"wazuh_certs_tool\"]}')
|
||||
" >> "$GITHUB_ENV"
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Provision: allocate VM and extract SSH credentials
|
||||
# -----------------------------------------------------------------------
|
||||
@@ -503,20 +517,10 @@ jobs:
|
||||
- name: Prepare cert tool and config
|
||||
run: |
|
||||
DEPLOYMENT="${{ matrix.deployment_type }}"
|
||||
VERSION="${{ env.WAZUH_VERSION }}"
|
||||
STAGE="${{ env.WAZUH_STAGE }}"
|
||||
MAJOR=$(echo "$VERSION" | cut -d. -f1)
|
||||
|
||||
echo "Cert tool: ${VERSION}-${STAGE} Docker image: ${{ env.DOCKER_TAG }}"
|
||||
echo "Cert tool: ${{ env.wazuh_certs_tool }} Docker image: ${{ env.DOCKER_TAG }}"
|
||||
|
||||
# Download cert tool once on the runner
|
||||
if [ -n "$STAGE" ]; then
|
||||
CERT_TOOL_URL="https://packages-staging.xdrsiem.wazuh.info/pre-release/${MAJOR}.x/installation-assistant/wazuh-certs-tool-${VERSION}-${STAGE}.sh"
|
||||
else
|
||||
CERT_TOOL_URL="https://packages.wazuh.com/${MAJOR}.$(echo "$VERSION" | cut -d. -f2)/wazuh-certs-tool-${VERSION}-1.sh"
|
||||
fi
|
||||
echo "Downloading cert tool: $CERT_TOOL_URL"
|
||||
curl -fsSL -o "wazuh-docker/${DEPLOYMENT}/wazuh-certs-tool.sh" "$CERT_TOOL_URL"
|
||||
curl --output "wazuh-docker/${DEPLOYMENT}/wazuh-certs-tool.sh" "${{ env.wazuh_certs_tool }}"
|
||||
chmod +x "wazuh-docker/${DEPLOYMENT}/wazuh-certs-tool.sh"
|
||||
echo "Downloaded OK"
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
|
||||
## wazuh-docker
|
||||
Archivo: `.github/workflows/5_check_integration_tools.yml`
|
||||
Step: **"Resolve context"** (job `prepare`)
|
||||
|
||||
A partir de la línea **179**, cambiar:
|
||||
|
||||
```yaml
|
||||
echo "pr_head_ref=${{ needs.get_pr_info.outputs.pr_head_ref }}" >> $GITHUB_OUTPUT
|
||||
echo "deployment_matrix=${{ needs.get_pr_info.outputs.deployment_matrix }}" >> $GITHUB_OUTPUT
|
||||
```
|
||||
|
||||
por:
|
||||
|
||||
```yaml
|
||||
echo 'pr_head_ref=${{ needs.get_pr_info.outputs.pr_head_ref }}' >> $GITHUB_OUTPUT
|
||||
echo 'deployment_matrix=${{ needs.get_pr_info.outputs.deployment_matrix }}' >> $GITHUB_OUTPUT
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## wazuh-ansible
|
||||
Archivo: `.github/workflows/5_check_integration_tools.yaml`
|
||||
Step: **"Resolve context"** (job `prepare`)
|
||||
|
||||
A partir de la línea **216**, cambiar:
|
||||
|
||||
```yaml
|
||||
echo "pr_head_ref=${{ needs.get_pr_info.outputs.pr_head_ref }}" >> $GITHUB_OUTPUT
|
||||
echo "deployment_matrix=${{ needs.get_pr_info.outputs.deployment_matrix }}" >> $GITHUB_OUTPUT
|
||||
```
|
||||
|
||||
por:
|
||||
|
||||
```yaml
|
||||
echo 'pr_head_ref=${{ needs.get_pr_info.outputs.pr_head_ref }}' >> $GITHUB_OUTPUT
|
||||
echo 'deployment_matrix=${{ needs.get_pr_info.outputs.deployment_matrix }}' >> $GITHUB_OUTPUT
|
||||
```
|
||||
|
||||
(Las 4 líneas siguientes del mismo `else` — `os_list`, `environment`, `commit_list`,
|
||||
`issue_url` — no se tocan, ya están bien.)
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user