Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions deploy/googleDeploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const BbPromise = require('bluebird');

const validate = require('../shared/validate');
const utils = require('../shared/utils');
const setDeploymentBucketName = require('../shared/setDeploymentBucketName');
const createDeployment = require('./lib/createDeployment');
const setDeploymentBucketName = require('../shared/setDeploymentBucketName');
const monitorDeployment = require('../shared/monitorDeployment');
const uploadArtifacts = require('./lib/uploadArtifacts');
const updateDeployment = require('./lib/updateDeployment');
Expand All @@ -21,8 +21,8 @@ class GoogleDeploy {
this,
validate,
utils,
setDeploymentBucketName,
createDeployment,
setDeploymentBucketName,
monitorDeployment,
uploadArtifacts,
updateDeployment,
Expand All @@ -34,8 +34,8 @@ class GoogleDeploy {
.then(this.setDefaults),

'deploy:deploy': () => BbPromise.bind(this)
.then(this.setDeploymentBucketName)
.then(this.createDeployment)
.then(this.setDeploymentBucketName)
.then(this.uploadArtifacts)
.then(this.updateDeployment),

Expand Down
12 changes: 6 additions & 6 deletions deploy/googleDeploy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ describe('GoogleDeploy', () => {
describe('hooks', () => {
let validateStub;
let setDefaultsStub;
let setDeploymentBucketNameStub;
let createDeploymentStub;
let setDeploymentBucketNameStub;
let uploadArtifactsStub;
let updateDeploymentStub;
let cleanupDeploymentBucketStub;
Expand All @@ -49,10 +49,10 @@ describe('GoogleDeploy', () => {
.returns(BbPromise.resolve());
setDefaultsStub = sinon.stub(googleDeploy, 'setDefaults')
.returns(BbPromise.resolve());
setDeploymentBucketNameStub = sinon.stub(googleDeploy, 'setDeploymentBucketName')
.returns(BbPromise.resolve());
createDeploymentStub = sinon.stub(googleDeploy, 'createDeployment')
.returns(BbPromise.resolve());
setDeploymentBucketNameStub = sinon.stub(googleDeploy, 'setDeploymentBucketName')
.returns(BbPromise.resolve());
uploadArtifactsStub = sinon.stub(googleDeploy, 'uploadArtifacts')
.returns(BbPromise.resolve());
updateDeploymentStub = sinon.stub(googleDeploy, 'updateDeployment')
Expand All @@ -64,8 +64,8 @@ describe('GoogleDeploy', () => {
afterEach(() => {
googleDeploy.validate.restore();
googleDeploy.setDefaults.restore();
googleDeploy.setDeploymentBucketName.restore();
googleDeploy.createDeployment.restore();
googleDeploy.setDeploymentBucketName.restore();
googleDeploy.uploadArtifacts.restore();
googleDeploy.updateDeployment.restore();
googleDeploy.cleanupDeploymentBucket.restore();
Expand All @@ -79,8 +79,8 @@ describe('GoogleDeploy', () => {

it('should run "deploy:deploy" promise chain', () => googleDeploy
.hooks['deploy:deploy']().then(() => {
expect(setDeploymentBucketNameStub.calledOnce).toEqual(true);
expect(createDeploymentStub.calledAfter(setDeploymentBucketNameStub)).toEqual(true);
expect(createDeploymentStub.calledOnce).toEqual(true);
expect(setDeploymentBucketNameStub.calledAfter(createDeploymentStub)).toEqual(true);
expect(uploadArtifactsStub.calledAfter(createDeploymentStub)).toEqual(true);
expect(updateDeploymentStub.calledAfter(uploadArtifactsStub)).toEqual(true);
}));
Expand Down