diff --git a/bdd.sql b/bdd.sql index c8aae15..20d4295 100644 --- a/bdd.sql +++ b/bdd.sql @@ -10,6 +10,36 @@ SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; + +-- +-- Structure de la table `BUILD_list` +-- + +CREATE TABLE IF NOT EXISTS `BUILD_list` ( + `id` int(11) NOT NULL, + `time` int(11) NOT NULL, + `id-group` int(32) NOT NULL, + `sha1` varchar(512) NOT NULL, + `tag` varchar(512) NOT NULL, + `status` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW' +) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; + + +-- +-- Structure de la table `BUILD_snapshot` +-- + +CREATE TABLE IF NOT EXISTS `BUILD_snapshot` ( + `id-build` varchar(256) NOT NULL, + `id-group` int(11) NOT NULL DEFAULT '0', + `Linux` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW', + `Windows` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW', + `MacOs` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW', + `IOs` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW', + `Android` enum('UNKNOW','START','ERROR','OK') NOT NULL DEFAULT 'UNKNOW' +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + -- -- Structure de la table `CI_group` -- diff --git a/build_inject.php b/build_inject.php index dfc2c44..b6e7705 100644 --- a/build_inject.php +++ b/build_inject.php @@ -115,7 +115,7 @@ if ($idGroup <= -1) { if ($result == TRUE) { echo("[OK] registered done (new entry)"); } else { - echo("[ERROR] Can not register in db ... (snapshot)"); + echo("[ERROR] Can not register in db ... (snapshot 1)"); } } else { // try to update the curent values: @@ -126,7 +126,7 @@ if ($idGroup <= -1) { if ($result == TRUE) { echo("[OK] registered done (update)"); } else { - echo("[ERROR] Can not register in db ... (snapshot)"); + echo("[ERROR] Can not register in db ... (snapshot 2)"); } } } diff --git a/build_send.py b/build_send.py index c94783b..37e7dc9 100755 --- a/build_send.py +++ b/build_send.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 ## ## @author Edouard DUPIN ## @@ -42,7 +42,7 @@ if args.status not in ['START', 'OK', 'ERROR']: args.status = 'ERROR' if args.test == True: - args.url = 'http://127.0.0.1/build/inject.php' + args.url = 'http://atria-soft.com/ci/build/inject' args.repo = 'HeeroYui/test' args.sha1 = '' args.branch = 'master' @@ -102,10 +102,10 @@ data = urllib.urlencode({'REPO':args.repo, req = urllib2.Request(args.url, data) response = urllib2.urlopen(req) -#print response.geturl() -#print response.info() +#print(response.geturl()) +#print(response.info()) return_data = response.read() -print return_data +print(return_data) if return_data[:7] == "[ERROR]": exit(-1)