Hi,
I’ve given a lot of posts a read about this - but as yet haven’t found a solution.
I’ve got a file at .circleci/config.yml which seems to be the correct location and it validates using the circleci cli tool.
It looks like the below… but it won’t build as v2 - only as v1.
I can’t work out what is going wrong - anyone got any ideas?
As I said I’ve checked everything I’ve read in the other posts about this stuff.
version: 2
jobs:
build:
working_directory: /go/src/github.com/repo...
docker:
- image: circleci/golang:1.9
# Start test and build process.
steps:
- checkout
- run: ls -lart
- run: make test
# Ensure we can use Docker.
- setup_remote_docker
# Save the Docker image.
#
# Only pushes to the unstable branch for now.
- deploy:
name: Save Docker image to AWS.
command: |
sudo apt-get install python-pip
pip install awscli --upgrade --user
ls -lart ~
export PATH=~/.local/bin:$PATH
if [ "${CIRCLE_BRANCH}" == "develop" ] || [ "${CIRCLE_BRANCH}" == "master" ]; then
# run the build script - build and push to AWS
./scripts/build.sh ${CIRCLE_BRANCH}
else
echo "no valid deployment branch"
fi