Greetings!
I’m currently trying to test my local config.yml file using the CircleCI Testing Config Files Locally instructions.
Here’s my bash script used to trigger the test (token and repo name changed for security):
CIRCLE_TOKEN=1234
LATEST_REVISION=$(git rev-parse HEAD)
CURRENT_BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
curl --user ${CIRCLE_TOKEN}: \
--request POST \
--form revision=${LATEST_REVISION}\
--form config=@".circleci/config.yml" \
--form notify=false \
https://circleci.com/api/v1.1/project/github/org/project/tree/${CURRENT_BRANCH}
When I run this it returns a long JSON response:
{
"compare" : null,
"previous_successful_build" : {
"build_num" : 60,
"status" : "success",
"build_time_millis" : 25894
},
"build_parameters" : { },
"oss" : false,
"committer_date" : null,
"body" : null,
"usage_queued_at" : "2019-04-30T16:30:34.991Z",
"fail_reason" : null,
"retry_of" : null,
"reponame" : [redacted],
"ssh_users" : [ ],
"build_url" : "https://circleci.com/gh/[org/project]/63",
"parallel" : 1,
"failed" : null,
"branch" : "develop",
"username" : [redacted],
"author_date" : null,
"why" : "api",
"user" : {
"is_user" : true,
"login" : [redacted],
"avatar_url" : [redacted],
"name" : "Jason Adams",
"vcs_type" : "github",
"id" : [redacted]
},
"vcs_revision" : "e739febfe3c4ec60c296463dd0f3048614c52a3f",
"vcs_tag" : null,
"build_num" : 63,
"infrastructure_fail" : false,
"committer_email" : null,
"previous" : {
"build_num" : 62,
"status" : "canceled",
"build_time_millis" : 635264
},
"status" : "not_running",
"committer_name" : null,
"retries" : null,
"subject" : null,
"vcs_type" : "github",
"timedout" : false,
"dont_build" : null,
"lifecycle" : "not_running",
"no_dependency_cache" : false,
"stop_time" : null,
"ssh_disabled" : true,
"build_time_millis" : null,
"picard" : null,
"circle_yml" : {
"string" : "[removed to shorten snippet]"
},
"messages" : [ {
"type" : "warning",
"message" : "Your config file has errors and may not run correctly:<br/><pre>jobs: 12 schema violations found<br/> jobs: checkout: -codeonly 0 subschema matches out of 2<br/> jobs: checkout: -codeextraneous key [executor] is not permitted<br/> jobs: checkout: -code0 subschemas matched instead of one<br/> jobs: checkout: -coderequired key [machine] not found<br/> jobs: checkout: -coderequired key [docker] not found<br/> jobs: checkout: -coderequired key [macos] not found<br/> jobs: build: only 0 subschema matches out of 2<br/> jobs: build: extraneous key [executor] is not permitted<br/> jobs: build: 0 subschemas matched instead of one<br/> jobs: build: required key [machine] not found<br/> jobs: build: required key [docker] not found<br/> jobs: build: required key [macos] not found<br/> jobs: deploy: -devonly 0 subschema matches out of 2<br/> jobs: deploy: -devextraneous key [executor] is not permitted<br/> jobs: deploy: -dev0 subschemas matched instead of one<br/> jobs: deploy: -devrequired key [machine] not found<br/> jobs: deploy: -devrequired key [docker] not found<br/> jobs: deploy: -devrequired key [macos] not found</pre>"
} ],
"is_first_green_build" : false,
"job_name" : null,
"start_time" : null,
"canceler" : null,
"platform" : "2.0",
"outcome" : null,
"vcs_url" : "https://github.com/[org/project]",
"author_name" : null,
"node" : null,
"canceled" : false,
"author_email" : null
}
What’s confusing is that when I run circleci config validate
it says everything is great. Furthermore, the workflow does not get run. I’m not really sure what the issue is. Any help would be appreciated!
Thank you!