Hey thanks for the quick response, I didn’t realise you could do that sort of thing.
But I did try this and I can’t get it to work, the command format is right. I chose to use
--format=oneline. But I can’t get it to actually return a value.
When I have this:
GIT_COMMIT_DESC: git log --format=oneline -n 1 $CIRCLE_SHA1
It just seems to return “git”, i guess not executing it. I’ve tried also enclosing it in
$() (which just makes it blank) and also using the UI for env vars but still no luck.
Bit of a newbie with all this so apologies for any stupidity.
Update: for completeness I should say I’m then passing this env var to a script like in this circlei documentation:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- ./deploy.sh $CIRCLE_SHA1 $GIT_COMMIT_DESC
and then passing the var down in the script:
aws elasticbeanstalk create-application-version \
--description "$GIT_COMMIT_DESC" \