kef-cloudbuild-runner
Version:
runner for cloudbuild
35 lines (32 loc) • 1.04 kB
JavaScript
;
const path = require('path');
const main = require('../lib/index');
const s_log = require('../lib/log');
describe("run build", function () {
it('should run command ok', function () {
this.timeout(1000 * 60 * 30);
return main.run({
projectDir: path.join(__dirname, 'source'),
sourceUrl: 'http://tsb.cn-hangzhou.oss.aliyun-inc.com/cloudbuild/assets/src/DEF+Engine/src-1501211067308-298238',
buildType: 1,
builderDir: `/Users/maxingchi/.def/def_modules/.builders/@ali/builder-cake/node_modules/@ali/builder-cake`,
buildDest: '.package',
gitGroup: 'test',
gitProject: 'cake',
gitBranch: '0.0.1',
upload: true,
containerResultFile: path.join(__dirname, 'source', 'container.json'),
ossSecret: '',
ossToken:''
});
});
});
describe('util', function() {
it('should log error', function() {
const e = new Error('测试错误log');
s_log.error(e);
})
it('should log string', function() {
s_log.info("绿色文字");
})
})