Skip to content

Commit

Permalink
Try to use json instead of jsonp.
Browse files Browse the repository at this point in the history
This requires proxying the json to prevent cross-domain errors.
  • Loading branch information
tobias committed Mar 27, 2015
1 parent d8e1b1e commit 0c7e98f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
3 changes: 2 additions & 1 deletion builds/.htaccess
@@ -1,10 +1,11 @@

RewriteEngine on

RewriteRule ^([0-9]+)/(.*)$ http://downloads.immutant.org/incremental/immutant/$1/$2 [P]

RewriteRule ^(torquebox-immutant\.zip)$ http://projectodd.ci.cloudbees.com/job/overlay/lastSuccessfulBuild/artifact/target/$1 [P]

RewriteRule ^build-info/(.*)$ http://projectodd.ci.cloudbees.com/$1 [P]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(LATEST/)?(.*)$ http://downloads.immutant.org/incremental/immutant/LATEST/$2 [P]
Expand Down
2 changes: 1 addition & 1 deletion builds/2x/incremental-builds.js
Expand Up @@ -182,5 +182,5 @@ renderer = {

};

j = new Jenkins( renderer, 'http://projectodd.ci.cloudbees.com', 'immutant2-incremental',
j = new Jenkins( renderer, '/builds/build-info', 'immutant2-incremental',
[['', '1_6_0']] );
2 changes: 1 addition & 1 deletion builds/incremental-builds.js
Expand Up @@ -229,7 +229,7 @@ renderer = {

};

j = new Jenkins( renderer, 'http://projectodd.ci.cloudbees.com', 'immutant-incremental',
j = new Jenkins( renderer, '/builds/build-info', 'immutant-incremental',
[['clojure_compat_version=1.4.0,label=m1.large', '1_4_0'],
['clojure_compat_version=1.5.1,label=m1.large', '1_5_1'],
['clojure_compat_version=1.6.0,label=m1.large', '1_6_0']] );
19 changes: 9 additions & 10 deletions javascripts/jenkins.js
@@ -1,4 +1,3 @@

function Jenkins(renderer, url, job, matrix) {
this.renderer = renderer;
this.url = url;
Expand All @@ -12,10 +11,10 @@ function Jenkins(renderer, url, job, matrix) {
Jenkins.prototype = {
initialize: function() {
var self = this;
$.ajax( {
url: self.job_url('/api/json?depth=1' ),
jsonp: 'jsonp',
dataType: 'jsonp',
$.ajax( {
url: self.job_url('api/json?depth=1' ),
//jsonp: 'jsonp',
dataType: 'json',
type: 'GET',
context: self,
async: false,
Expand All @@ -32,10 +31,10 @@ Jenkins.prototype = {
} );

$.each( self.matrix, function(i, matrix_leg ) {
$.ajax( {
url: self.job_url( '/' + matrix_leg[0] + '/api/json?depth=1' ),
jsonp: 'jsonp',
dataType: 'jsonp',
$.ajax( {
url: self.job_url( matrix_leg[0] + '/api/json?depth=1' ),
//jsonp: 'jsonp',
dataType: 'json',
type: 'GET',
context: self,
async: false,
Expand All @@ -61,7 +60,7 @@ Jenkins.prototype = {

locate_artifact: function(build, filename) {
result = null;
$.each( build.artifacts, function(i, artifact) {
$.each( build.artifacts, function(i, artifact) {
if ( artifact.relativePath == filename ) {
result = artifact;
return false;
Expand Down

0 comments on commit 0c7e98f

Please sign in to comment.