Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
凌波微步_大先生
dashboard
提交
bd1da510
D
dashboard
项目概览
凌波微步_大先生
/
dashboard
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dashboard
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bd1da510
编写于
11月 06, 2015
作者:
P
Przemek Więch
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #50 from kubernetes/full-checks-on-travis
Run test, build and lint checks on Travis CI
上级
16b10076
b49939cf
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
97 addition
and
38 deletion
+97
-38
.travis.yml
.travis.yml
+6
-1
build/build.js
build/build.js
+13
-13
build/check.js
build/check.js
+46
-0
build/conf.js
build/conf.js
+2
-2
build/gocommand.js
build/gocommand.js
+8
-4
build/karma.conf.js
build/karma.conf.js
+14
-0
build/protractor.conf.js
build/protractor.conf.js
+6
-2
build/script.js
build/script.js
+0
-15
gulpfile.babel.js
gulpfile.babel.js
+1
-0
src/test/backend/apiserverclient_test.go
src/test/backend/apiserverclient_test.go
+1
-1
未找到文件。
.travis.yml
浏览文件 @
bd1da510
...
...
@@ -27,6 +27,11 @@ cache:
# Use Node.js as primary language because Gulp is the build system used in the project.
language
:
node_js
before_script
:
# Prepare environment for the Chrome browser.
-
export CHROME_BIN=chromium-browser
-
export DISPLAY=:99.0
-
sh -e /etc/init.d/xvfb start
# Install frontend dependencies to be able to build the project.
-
./node_modules/.bin/bower install
...
...
@@ -35,4 +40,4 @@ before_script:
# Download godep tool and make add it to PATH environment variable.
-
go get github.com/tools/godep
-
export PATH=$PATH:$GOPATH/bin
script
:
./node_modules/.bin/gulp
build
script
:
./node_modules/.bin/gulp
check
build/build.js
浏览文件 @
bd1da510
...
...
@@ -33,7 +33,19 @@ import conf from './conf';
/**
* Builds production package and places it in the dist directory.
*/
gulp
.
task
(
'
build
'
,
[
'
backend:prod
'
,
'
build-frontend
'
],
function
()
{
gulp
.
task
(
'
build
'
,
[
'
backend:prod
'
,
'
build-frontend
'
]);
/**
* Builds production version of the frontend application.
*
* Following steps are done here:
* 1. Vendor CSS and JS files are concatenated and minified.
* 2. index.html is minified.
* 3. CSS and JS assets are suffixed with version hash.
* 4. Everything is saved in the dist directory.
*/
gulp
.
task
(
'
build-frontend
'
,
[
'
assets
'
,
'
index:prod
'
],
function
()
{
let
htmlFilter
=
gulpFilter
(
'
*.html
'
,
{
restore
:
true
});
let
vendorCssFilter
=
gulpFilter
(
'
**/vendor.css
'
,
{
restore
:
true
});
let
vendorJsFilter
=
gulpFilter
(
'
**/vendor.js
'
,
{
restore
:
true
});
...
...
@@ -69,18 +81,6 @@ gulp.task('build', ['backend:prod', 'build-frontend'], function () {
});
/**
* Builds production version of the frontend application.
*
* Following steps are done here:
* 1. Vendor CSS and JS files are concatenated and minified.
* 2. index.html is minified.
* 3. CSS and JS assets are suffixed with version hash.
* 4. Everything is saved in the dist directory.
*/
gulp
.
task
(
'
build-frontend
'
,
[
'
assets
'
,
'
index:prod
'
]);
/**
* Copies assets to the dist directory.
*/
...
...
build/check.js
0 → 100644
浏览文件 @
bd1da510
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @fileoverview Gulp tasks for checking and validating the code or a commit.
*/
import
gulp
from
'
gulp
'
;
import
gulpEslint
from
'
gulp-eslint
'
;
import
path
from
'
path
'
;
import
conf
from
'
./conf
'
;
/**
* Checks whether codebase is in a state that is ready for submission. This means that code
* follows the style guide, it is buildable and all tests pass.
*
* This task should be used prior to publishing a change.
*/
gulp
.
task
(
'
check
'
,
[
'
lint
'
,
'
build
'
,
'
test
'
,
'
integration-test:prod
'
]);
/**
* Lints all projects code files. This includes frontend source code, as well as, build scripts.
*/
gulp
.
task
(
'
lint
'
,
function
()
{
// TODO(bryk): Also lint Go files here.
return
gulp
.
src
([
path
.
join
(
conf
.
paths
.
src
,
'
**/*.js
'
),
path
.
join
(
conf
.
paths
.
build
,
'
**/*.js
'
)])
// Attach lint output to the eslint property of the file.
.
pipe
(
gulpEslint
())
// Output the lint results to the console.
.
pipe
(
gulpEslint
.
format
())
// Exit with an error code (1) on a lint error.
.
pipe
(
gulpEslint
.
failOnError
());
});
build/conf.js
浏览文件 @
bd1da510
...
...
@@ -39,11 +39,11 @@ export default {
/**
* Name of the main backend package that is used in go build command.
*/
packageName
:
'
./src/
app/backend
'
,
packageName
:
'
app/backend
'
,
/**
* Name of the test backend package that is used in go test command.
*/
testPackageName
:
'
./src/
test/backend
'
,
testPackageName
:
'
test/backend
'
,
},
/**
...
...
build/gocommand.js
浏览文件 @
bd1da510
...
...
@@ -18,18 +18,22 @@
import
child
from
'
child_process
'
;
import
lodash
from
'
lodash
'
;
import
conf
from
'
./conf
'
;
/**
* Spawns Go process wrapped with the Godep command.
*
* @param {!Array<string>} args
* @param {function(?Error=)} doneFn
* @param {!Object<string, string>=} opt_env Optional environment variables to be concatenated with
* default ones.
*/
export
default
function
spawnGoProcess
(
args
,
doneFn
,
opt_env
)
{
export
default
function
spawnGoProcess
(
args
,
doneFn
)
{
// Add base directory to the gopath so that local imports work.
let
sourceGopath
=
`
${
process
.
env
.
GOPATH
}
:
${
conf
.
paths
.
base
}
`
;
let
env
=
lodash
.
merge
(
process
.
env
,
{
GOPATH
:
sourceGopath
});
let
goTask
=
child
.
spawn
(
'
godep
'
,
[
'
go
'
].
concat
(
args
),
{
env
:
lodash
.
merge
(
process
.
env
,
opt_env
||
{})
,
env
:
env
,
});
// Call Gulp callback on task exit. This has to be done to make Gulp dependency management
...
...
build/karma.conf.js
浏览文件 @
bd1da510
...
...
@@ -62,6 +62,15 @@ export default function(config) {
browsers
:
[
'
Chrome
'
],
customLaunchers
:
{
// Custom launcher for Travis CI. It is required because Travis environment cannot use
// sandbox.
chromeTravis
:
{
base
:
'
Chrome
'
,
flags
:
[
'
--no-sandbox
'
],
},
},
reporters
:
[
'
progress
'
],
preprocessors
:
{},
// This field is filled with values later.
...
...
@@ -93,6 +102,11 @@ export default function(config) {
},
};
// Use custom browser configuration when running on Travis CI.
if
(
process
.
env
.
TRAVIS
)
{
configuration
.
browsers
=
[
'
chromeTravis
'
];
}
// Convert all JS code written ES6 with modules to ES5 bundles that browsers can digest.
configuration
.
preprocessors
[
path
.
join
(
conf
.
paths
.
frontendTest
,
'
**/*.js
'
)]
=
[
'
browserify
'
];
configuration
.
preprocessors
[
path
.
join
(
conf
.
paths
.
frontendSrc
,
'
**/*.js
'
)]
=
[
'
browserify
'
];
...
...
build/protractor.conf.js
浏览文件 @
bd1da510
...
...
@@ -29,11 +29,15 @@ var path = require('path');
* Schema can be found here: https://github.com/angular/protractor/blob/master/docs/referenceConf.js
*/
exports
.
config
=
{
baseUrl
:
'
http://localhost:3000
'
,
capabilities
:
{
'
browserName
'
:
'
chrome
'
,
// Firefox is used instead of Chrome, because that's what Travis supports best.
// The browser that is used in the integration tests should not affect the results, anyway.
'
browserName
'
:
'
firefox
'
,
},
baseUrl
:
'
http://localhost:3000
'
,
framework
:
'
jasmine
'
,
specs
:
[
path
.
join
(
conf
.
paths
.
integrationTest
,
'
**/*.js
'
)],
};
build/script.js
浏览文件 @
bd1da510
...
...
@@ -18,7 +18,6 @@
import
gulp
from
'
gulp
'
;
import
gulpAngularTemplatecache
from
'
gulp-angular-templatecache
'
;
import
gulpClosureCompiler
from
'
gulp-closure-compiler
'
;
import
gulpEslint
from
'
gulp-eslint
'
;
import
gulpMinifyHtml
from
'
gulp-minify-html
'
;
import
path
from
'
path
'
;
import
webpackStream
from
'
webpack-stream
'
;
...
...
@@ -134,17 +133,3 @@ gulp.task('angular-templates', function () {
gulp
.
task
(
'
create-serve-folders
'
,
function
()
{
return
gulp
.
src
(
''
).
pipe
(
gulp
.
dest
(
conf
.
paths
.
serve
));
});
/**
* Lints all projects code files. This includes frontend source code, as well as, build scripts.
*/
gulp
.
task
(
'
lint
'
,
function
()
{
return
gulp
.
src
([
path
.
join
(
conf
.
paths
.
src
,
'
**/*.js
'
),
path
.
join
(
conf
.
paths
.
build
,
'
**/*.js
'
)])
// Attach lint output to the eslint property of the file.
.
pipe
(
gulpEslint
())
// Output the lint results to the console.
.
pipe
(
gulpEslint
.
format
())
// Exit with an error code (1) on a lint error.
.
pipe
(
gulpEslint
.
failOnError
());
});
gulpfile.babel.js
浏览文件 @
bd1da510
...
...
@@ -18,6 +18,7 @@
*
* Learn more at: http://gulpjs.com
*/
import
'
./build/check
'
;
import
'
./build/backend
'
;
import
'
./build/build
'
;
import
'
./build/deploy
'
;
...
...
src/test/backend/apiserverclient_test.go
浏览文件 @
bd1da510
...
...
@@ -15,7 +15,7 @@
package
main
import
(
backend
"
github.com/dashboard/src/
app/backend"
backend
"app/backend"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"testing"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录