Add support for new aws-github connection
This commit is contained in:
@@ -25,9 +25,10 @@ module.exports = {
|
|||||||
if (item.StackName.indexOf('photowall-test-') > -1 && ['CREATE_COMPLETE', 'UPDATE_COMPLETE', 'UPDATE_IN_PROGRESS', 'UPDATE_FAILED', 'CREATE_FAILED', 'CREATE_IN_PROGRESS'].includes(item.StackStatus)) {
|
if (item.StackName.indexOf('photowall-test-') > -1 && ['CREATE_COMPLETE', 'UPDATE_COMPLETE', 'UPDATE_IN_PROGRESS', 'UPDATE_FAILED', 'CREATE_FAILED', 'CREATE_IN_PROGRESS'].includes(item.StackStatus)) {
|
||||||
try {
|
try {
|
||||||
const pipeline = JSON.parse(strings.trim(await system.run(`aws codepipeline get-pipeline --name ${item.StackName}Pipeline`)));
|
const pipeline = JSON.parse(strings.trim(await system.run(`aws codepipeline get-pipeline --name ${item.StackName}Pipeline`)));
|
||||||
const branch = pipeline.pipeline.stages.filter(stage => {
|
const sourceStage = pipeline.pipeline.stages.filter(stage => {
|
||||||
return stage.name === 'Source';
|
return stage.name === 'Source';
|
||||||
})[0].actions[0].configuration.Branch;
|
});
|
||||||
|
const branch = sourceStage[0].actions[0].configuration.Branch ?? sourceStage[0].actions[0].configuration.BranchName;
|
||||||
const lastUpdated = pipeline.metadata.updated;
|
const lastUpdated = pipeline.metadata.updated;
|
||||||
return {
|
return {
|
||||||
name: item.StackName,
|
name: item.StackName,
|
||||||
|
|||||||
Reference in New Issue
Block a user