Skip to content

Commit

Permalink
Update jenkins url with new job name
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Zoldak committed Oct 4, 2013
1 parent 70c9e93 commit cab3f61
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.9.3-p392
5 changes: 3 additions & 2 deletions jobs/edx-violations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
require "nokogiri"

JENKINS_BASE_URL = 'https://jenkins.testeng.edx.org'

JENKINS_JOB_NAME = 'edx-all-tests-auto-master'
JENKINS_JOB_URL = JENKINS_BASE_URL + '/job/' + JENKINS_JOB_NAME

SCHEDULER.every '1m', :first_in => 0 do |job|

violations_uri = JENKINS_BASE_URL + '/job/edx-platform-master/SHARD=1,TEST_SUITE=quality/violations/?'
violations_uri = JENKINS_JOB_URL + '/SHARD=1,TEST_SUITE=quality/violations/?'

violations_data = open(violations_uri, :ssl_verify_mode=>OpenSSL::SSL::VERIFY_NONE).read

Expand Down
5 changes: 3 additions & 2 deletions jobs/edx_jenkins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
require 'openssl'
require 'json'

JENKINS_BASE_URL = 'https://jenkins.testeng.edx.org'
JENKINS_JOB_NAME = 'edx-all-tests-auto-master'
JENKINS_JOB_URL = JENKINS_BASE_URL + '/job/' + JENKINS_JOB_NAME

current_status = nil
SCHEDULER.every '10s', :first_in => 0 do
last_status = current_status

build_uri = JENKINS_BASE_URL + "/job/edx-platform-master/lastBuild/api/json"
build_uri = JENKINS_JOB_URL + "/lastBuild/api/json"

# Once SSL certificates are set up correctly, we can remove the :ssl_verify_mode option
data = open(build_uri, :ssl_verify_mode=>OpenSSL::SSL::VERIFY_NONE).read
Expand Down
6 changes: 4 additions & 2 deletions jobs/js_coverage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
require 'json'

JENKINS_BASE_URL = 'https://jenkins.testeng.edx.org'
JENKINS_JOB_NAME = 'edx-all-tests-auto-master'
JENKINS_JOB_URL = JENKINS_BASE_URL + '/job/' + JENKINS_JOB_NAME

# :first_in sets how long it takes before the job is first run. In this case, it is run immediately
SCHEDULER.every '5m', :first_in => 0 do |job|

# Retrieve the number of the last stable build
last_build_uri = JENKINS_BASE_URL + '/job/edx-platform-master/lastStableBuild/buildNumber'
last_build_uri = JENKINS_JOB_URL + '/lastStableBuild/buildNumber'

# Once SSL certificates are set up correctly, we can remove the :ssl_verify_mode option
response = open(last_build_uri, :ssl_verify_mode=>OpenSSL::SSL::VERIFY_NONE).read
last_build_num = response.to_i

# Retrieve the coverage info as JSON
coverage_uri = JENKINS_BASE_URL + "/job/edx-platform-master/SHARD=1,TEST_SUITE=unit/#{last_build_num}/cobertura/javascript/api/json?depth=2"
coverage_uri = JENKINS_JOB_URL + "/SHARD=1,TEST_SUITE=unit/#{last_build_num}/cobertura/javascript/api/json?depth=2"
coverage_data = open(coverage_uri, :ssl_verify_mode=>OpenSSL::SSL::VERIFY_NONE).read

# Parse the JSON
Expand Down
4 changes: 2 additions & 2 deletions jobs/mitx_hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
]
s_hosts = ["stage-edge-edxapp-001",
"stage-edge-edxapp-002",
"stage-edxapp-001",
"stage-edxapp-002"
"stage-edxapp-002",
"stage-edxapp-004"
]

suffix = '.m.edx.org'
Expand Down
8 changes: 4 additions & 4 deletions jobs/python_coverage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@


JENKINS_BASE_URL = 'https://jenkins.testeng.edx.org'

uri_base = '/view/Code/job/edx-deploy-branch-tests/coveragepy/reports/'
JENKINS_JOB_NAME = 'edx-all-tests-auto-master'
JENKINS_JOB_URL = JENKINS_BASE_URL + '/job/' + JENKINS_JOB_NAME

# :first_in sets how long it takes before the job is first run. In this case, it is run immediately
SCHEDULER.every '5m', :first_in => 0 do |job|

# Retrieve the number of the last stable build
last_build_uri = JENKINS_BASE_URL + '/job/edx-platform-master/lastStableBuild/buildNumber'
last_build_uri = JENKINS_JOB_URL + '/lastStableBuild/buildNumber'

# Once SSL certificates are set up correctly, we can remove the :ssl_verify_mode option
response = open(last_build_uri, :ssl_verify_mode=>OpenSSL::SSL::VERIFY_NONE).read
last_build_num = response.to_i

# Retrieve all Python coverage info for the last successful job
coverage_uri = JENKINS_BASE_URL + "/job/edx-platform-master/SHARD=1,TEST_SUITE=unit/#{last_build_num}/cobertura/_default_/api/json?depth=3"
coverage_uri = JENKINS_JOB_URL + "/SHARD=1,TEST_SUITE=unit/#{last_build_num}/cobertura/_default_/api/json?depth=3"
coverage_data = open(coverage_uri, :ssl_verify_mode=>OpenSSL::SSL::VERIFY_NONE).read

# Parse the JSON
Expand Down

0 comments on commit cab3f61

Please sign in to comment.