提交 af1c77dd 编写于 作者: S Sebastian Florek 提交者: Marcin Maciaszczyk

Move docker push to after success to push only when all tests pass (#1751)

上级 31646f56
......@@ -55,12 +55,14 @@ before_script:
script:
- 'if [ ${BUILD_SUITE} = "cluster-test" ]; then
./node_modules/.bin/gulp ci --heapsterServerHost "http://localhost:8082";
./node_modules/.bin/gulp check:local-cluster --heapsterServerHost "http://localhost:8082";
else
./node_modules/.bin/gulp check:code-quality;
fi'
after_script:
- 'if [ ${BUILD_SUITE} = "code-test" ]; then
after_success:
- 'if [ ${BUILD_SUITE} = "cluster-test" ]; then
./node_modules/.bin/gulp ci-push-to-docker:head:cross;
else
./node_modules/.bin/gulp coverage-codecov-upload;
fi'
......@@ -19,11 +19,11 @@ import childProcess from 'child_process';
import gulp from 'gulp';
/**
* Entry point task for CI environments.
* Entry point for CI to push head images to Docker Hub when master builds successfully.
*/
gulp.task('ci', ['check:local-cluster'], (doneFn) => {
gulp.task('ci-push-to-docker:head:cross', function(doneFn) {
if (process.env.TRAVIS) {
// Pushe head images when docker user and password are available.
// Pushes head images when docker user and password are available.
if (process.env.TRAVIS_PULL_REQUEST === 'false' && process.env.DOCKER_USER &&
process.env.DOCKER_PASS) {
childProcess.exec('docker login -u $DOCKER_USER -p $DOCKER_PASS', (err, stdout, stderr) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册