Commands to replace the Windows agent vars in repo_vars.yml
This commit is contained in:
parent
6e646748fb
commit
a7c4f3ea7e
@ -19,14 +19,17 @@ checkPackages(){
|
|||||||
CHECK_WIN_PACKAGE=$(grep windows ../files/packages_uri_new.txt)
|
CHECK_WIN_PACKAGE=$(grep windows ../files/packages_uri_new.txt)
|
||||||
echo $CHECK_WIN_PACKAGE
|
echo $CHECK_WIN_PACKAGE
|
||||||
if [ -n "$CHECK_WIN_PACKAGE" ]; then
|
if [ -n "$CHECK_WIN_PACKAGE" ]; then
|
||||||
WIN_AGENT_URI="windows/"$(aws s3 ls s3://packages-dev.wazuh.com/staging/windows/wazuh-agent-$VERSION --region=us-west-1 | tail -1 | awk '{printf $4}')
|
WIN_AGENT_NAME=$(aws s3 ls s3://packages-dev.wazuh.com/staging/windows/wazuh-agent-$VERSION --region=us-west-1 | tail -1 | awk '{printf $4}')
|
||||||
if [ $WIN_AGENT_URI == "windows/" ]; then
|
if [ -z $WIN_AGENT_NAME ]; then
|
||||||
echo "Windows agent package for version " $VERSION " does not exist in the staging repository"
|
echo "Windows agent package for version " $VERSION " does not exist in the staging repository"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
WIN_AGENT_URI="windows/"$WIN_AGENT_NAME
|
||||||
echo $WIN_AGENT_URI "check"
|
echo $PACKAGES_URL$WIN_AGENT_URI "check"
|
||||||
sed -i 's,windows/.*,'$WIN_AGENT_URI',g' ../files/packages_uri_new.txt
|
sed -i 's,windows/.*,'$WIN_AGENT_URI',g' ../files/packages_uri_new.txt
|
||||||
|
sed -i 's,wazuh_winagent_config_url.*,wazuh_winagent_config_url: \"'$PACKAGES_URL$WIN_AGENT_URI'\",g' ../../vars/repo_staging.yml
|
||||||
|
sed -i 's,wazuh_winagent_package_name.*,wazuh_winagent_package_name: \"'$WIN_AGENT_NAME'\",g' ../../vars/repo_staging.yml
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Set EXISTS to 0 (true)
|
## Set EXISTS to 0 (true)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user