machine: services: - docker node: version: 4.5.0 environment: PORT: 3100 dependencies: pre: - pip install awscli - ./pre-deploy.sh - docker build -t mark/button:$CIRCLE_SHA1 . deployment: testing: branch: $STAGING_BRANCH commands: - docker login -u $DOCKER_USER -p $DOCKER_PASS -e $DOCKER_EMAIL - chmod +x deploy.sh - ./deploy.sh $CIRCLE_SHA1 staging $PORT
Basically I want to do something like this, where $STAGING_BRANCH is set in the pre-deploy.sh file depending on a few different factors. I’ve verified that $STAGING_BRANCH is set correctly in the pre-deploy file, but I can’t get it to trigger a deployment.
What I don’t want to do is have a build system that’s triggered by certain matching branch names, that kind of deployment won’t fit our use case.
Any help/advice is greatly appreciated!