Skip to content

Commit

Permalink
fix(triggers): Pass image as an artifact when using Docker trigger (#…
Browse files Browse the repository at this point in the history
…4968)

This is similar to the fix in spinnaker/echo#219
  • Loading branch information
wjoel authored and anotherchrisberry committed Mar 9, 2018
1 parent fda1f45 commit 9bc82e6
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,22 @@ module.exports = angular
}));
};

this.updateSelectedTag = (item) => {
this.command.extraFields.tag = item;
this.updateSelectedTag = (tag) => {
this.command.extraFields.tag = tag;

if (this.command.trigger && this.command.trigger.repository) {
let imageName = '';
if (this.command.trigger.registry) {
imageName += this.command.trigger.registry + '/';
}
imageName += this.command.trigger.repository;
this.command.extraFields.artifacts = [{
type: 'docker/image',
name: imageName,
version: tag,
reference: imageName + ':' + tag,
}];
}
};

let queryStream = new Subject();
Expand Down

0 comments on commit 9bc82e6

Please sign in to comment.