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.
Thank you very much Halfer, After removing those colon from build, i am getting this error now. Not really sure what part of the code is not being supported.
Build-agent version 0.1.1480-7a5183d3 (2019-01-22T18:14:45+0000)
Configuration errors: 1 error occurred:
* Error migrating config to version 2: 2 errors occurred:
* in job 'deploy': steps is not a list
* in job 'deploy': steps is not a list
Use this parser to see the problem in your deploy job. The commands are not indented in the same way as the other job, and they are malformed as a result.
I also don’t recognise the general: device - remove that for now. It does not appear to be a job or a workflow.
Hi Halfer, I was not really sure about the command being malformed, can you help me with that.
I modified the file and it seem that now the error are in the commands. this is the error i am getting:
#!/bin/bash -eo pipefail if [ “${CIRCLE_BRANCH}” == “sc-test” ]; then ssh SSH_USER@SSH_HOST ‘cd /srv/staging_ucm && STAGE=staging-ucm cap deploy’; else echo “Skipped”; fi:
/bin/bash: -c: line 1: syntax error: unexpected end of file Exited with code 2
This is the current configuration and with this the build/test passed but when i do the merge it fail after the successful test.
I’d add that if you’re struggling with YAML, or CI, then try to get the smallest possible configuration working. Don’t try to fix ten problems at once. When you get an error, don’t come straight back to the help forum to ask about the new problem - you will not learn anything that way. Cut the problem down, debug it, and ask when you are properly stuck.
Going through the pain of debugging anything is one of the best ways you can learn. Good luck!
Ok thank you very much halfer, quick question, when trying to deploy through ssh I have to connect to the IP of the container that circle is using or the actual server that i have ?
Even with a reasonable experience level with CircleCI, I spend a long time getting the schema right. Sometimes I get a somewhat useful error from CircleCI that guides me to my error, but it’s a slow development iteration.
Feature request for CircleCI! How about an online tool where you can paste in your script and it will lint it, and describe in a more consumable way what the script does so that you can spot any errors?
Thank you very much for your help Levlaz, I was able to make it work using ssh but i think that is not the right way to trigger a deployment from the sever, so i decided to use the same container in order to execute the deployment command to the server. I am running into a problem because the capistrano command can not be found using absolute path or just executing bundle exec cap deploy noticed that i am executing bundle exec rspec to trigger the test, do you guys have any idea why this is happening or how i could run capistrano from the container image ?