2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
I have fixed this by change single quote to double quote: echo "[{\ "name\ ":\ "$CONTAINER_NAME\ ",\ "imageUri\ ":\ "$IMAGE_URI\ "}]" > imagedefinitions.json
- Each " inside "" add \ before example: \ " (no space because comment not show \ before " so I add space)
répondu il y a 4 mois
1
Hi, to better investigate the issue I would recommend to add a command into your post_build step in order to show the content to the "imagedefinitions.json" file to double check if the interpolation of the variable actually works correctly.
version: 0.2
phases:
post_build:
commands:
- echo '[{ "imageUri":"$IMAGE_URI" , "name":"$CONTAINER_NAME" }]' > imagedefinitions.json
- cat imagedefinitions.json
artifacts:
files:
- imagedefinitions.json
répondu il y a 4 mois
Contenus pertinents
- demandé il y a un an
- Réponse acceptéedemandé il y a 7 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
Thanks for comment. I fixed by change ' to " in echo. I worked