Scheduling Build

build-image
ruby
cucumber
circle.yml

#1

Hi All,
I tried to schedule my build to run every night, i am using circle.yml and shell script to run the build.

Below are my circle.yml

# Customize dependencies
dependencies:
  pre:
    
 
## Running Tests

  
  test:
  override:
  - bundle install
  - bundle exec cucumber --format html --out reports.html features/workflow_1.feature:6 --format progress

and i am running the script from linux box are:

#!/bin/bash
#Src: https://circleci.com/docs/nightly-builds
 
_project=$1
_branch=$2
_circle_token=$3
 
trigger_build_url=https://circleci.com/api/v1/project/${_project}/tree/${_branch}?circle-token=${_circle_token}
 
post_data=$(cat <<EOF
{
  "build_parameters": {
    "NIGHTLY_BUILD": "true"
  }
}
EOF)
 
curl \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--request POST ${trigger_build_url}

And i am getting below errors;

[ec2-user@ip-172-31-35-230 circleci]$ sh script_circle.sh myproject1 master "APIKEY"
scripting starting
curl: (1) Protocol "“https" not supported or disabled in libcurl
{
  "message" : "{\"message\":\"API rate limit exceeded for 52.3.220.44. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)\",\"documentation_url\":\"https://developer.github.com/v3/#rate-limiting\"}"
}script completing:

Also advise me if i am doing any thing incorrect.


#3

Can you try to update the URL to match the v1.1 API and let me know if you still run into this issue?


#4

We have launched a first-class way to run scheduled jobs on CircleCI.

Below, please find the links to get started:
https://circleci.com/docs/2.0/workflows/#scheduling-a-workflow
https://circleci.com/docs/2.0/configuration-reference/#schedule


#5

What happens when the schedules are in conflict?
To be precise, if I push develop with branches->only->develop, and master with branches->only->master, which one wins? The most recent push?


#7