Hi I am trying to deploy after the branch is merge but for reason i am getting this error: Config does not conform to schema: {:workflows {:build-and-deploy {:jobs [{:build (not (map? nil))} {:deploy {:requires [(not (instance? java.lang.String #ordered/map ([:build nil])))]}}]}}}
I have tried many indentation fixed and none of them work, the configuration was working fine from line 1 to line 59 which is the build and run some test. But i wanted to add the automated deployment and now i am stuck on this. can someone help please? Thank you.
# Ruby CircleCI 2.0 configuration file
#
version: 2
general:
branches:
only:
- master
- rapid-screen
- lens-3
- rs-staging
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/ruby:2.3.7-node-browsers
- image: circleci/mongo:3.0.15
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Gemfile.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
# Install mongotools
- run:
name: Install mongotools
command: |
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2.27_amd64.deb
sudo dpkg -i libssl1.0.0_1.0.1f-1ubuntu2.27_amd64.deb
sudo apt-get install -y apt-transport-https apt-utils
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org-shell=3.0.15 mongodb-org-tools=3.0.15
- run:
name: install dependencies
command: |
gem install bundler -v 1.17.3
bundle install --jobs=4 --retry=3 --path vendor/bundle
- save_cache:
paths:
- ./vendor/bundle
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
# run tests!
- run:
name: run tests
command: |
mkdir /tmp/test-results
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
bundle exec rspec
deploy:
machine:
enabled: true
steps:
- checkout
- run:
name: Deploy to Testing
command: |
if [ "${CIRCLE_BRANCH}" == "sc-test" ]; then ssh SSH_USER@SSH_HOST 'cd /srv/staging_ucm && STAGE=staging-ucm cap deploy'; else echo "Skipped"; fi:
- run:
name: Deploy to Staging
command: |
if [ "${CIRCLE_BRANCH}" == "rs-staging" ]; then ssh SSH_USER@SSH_HOST 'cd /srv/staging_rapid_screen && STAGE=staging-rapid-screen cap deploy'; else echo "Skipped"; fi:
workflows:
version: 2
build-and-deploy:
jobs:
- build:
- deploy:
requires:
- build:
filters:
branches:
only:
- sc-test
- rs-staging