Skip to content

Commit

Permalink
Added logs to s3 publish
Browse files Browse the repository at this point in the history
  • Loading branch information
ashiddo11 committed Jul 2, 2017
1 parent f07a6d1 commit 04796a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ docker.push = function(image, buildId, uuid, branch, registry, buildLogger) {
*/
docker.copy = function(container, containerPath, hostPath) {
return Q.Promise(function(resolve, reject) {
container.copy({Resource: containerPath}, function(err, data) {
container.export(function(err, data) {
if (err) {
reject(err);
return;
Expand Down
5 changes: 3 additions & 2 deletions src/publisher/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ function uploadDirectoryToS3(options) {
module.exports = function(dockerClient, buildId, project, logger, options){
return Q.Promise(function(resolve, reject){
var command = options.command || "sleep 1";

console.info('Started publishing to S3');
console.info(buildId);
dockerClient.run(buildId, command.split(' '), process.stdout, function (err, data, container) {
if (err) {
reject(err);
Expand All @@ -118,7 +119,7 @@ module.exports = function(dockerClient, buildId, project, logger, options){
logger.info("[%s] Copied %s outside of the container, in %s, preparing to upload it to S3", buildId, options.copy, artifactPath);
var o = _.clone(options);
o.buildId = buildId;
o.dir = artifactPath;
o.dir = path.join(artifactPath, options.copy);
o.logger = logger;

uploadDirectoryToS3(o).then(function(){
Expand Down

0 comments on commit 04796a5

Please sign in to comment.