1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
I've figured out that we can use AfterInstall for this Install will copy the artifacts to a common folder The AfterInstall script can then read "DEPLOYMENT_GROUP_NAME" environment variable in a script to copy files from the common folder to the respective directory
Example "AfterInstall" script file for Windows here:
@echo off
setlocal
REM Set source and destination directories based on DEPLOYMENT_GROUP_NAME
set "source_dir=c:\web\codedeploy"
if "%DEPLOYMENT_GROUP_NAME%"=="staging" (
set "dest_dir=C:\web\staging-app\"
) else (
set "dest_dir=C:\web\prod-app\"
)
REM Copy files from source directory to destination directory
xcopy /s /e /y "%source_dir%" "%dest_dir%"
echo "Files copied successfully!"
répondu il y a 2 ans
Contenus pertinents
- demandé il y a 2 ans
- demandé il y a 4 mois
- demandé il y a 7 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 7 mois