Skip to content

Commit

Permalink
feat:流水线变量语法支持两种风格 TencentBlueKing#10576
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 15875
  • Loading branch information
useryuyu committed Aug 20, 2024
1 parent 820410d commit e00b1b7
Showing 1 changed file with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,6 @@
})
}
},
watch: {
pipelineSetting: {
handler (newVal) {
if (newVal) {
this.initializePipelineAsCodeSettings(newVal.pipelineAsCodeSettings)
}
}
}
},
created () {
this.requestGrouptLists()
this.requestPipelineDialect()
Expand Down Expand Up @@ -181,12 +171,19 @@
}
},
async requestPipelineDialect () {
try {
const { data } = await this.getPipelineDialect(this.projectId)
this.currentPipelineDialect = data
this.settings.pipelineDialect = data
} catch (err) {
console.log(err)
this.initializePipelineAsCodeSettings(this.pipelineSetting.pipelineAsCodeSettings)
const isInherited = this.pipelineSetting.pipelineAsCodeSettings.inheritedDialect
if (isInherited) {
try {
const { data } = await this.getPipelineDialect(this.projectId)
this.currentPipelineDialect = data
this.settings.pipelineDialect = data
} catch (err) {
console.log(err)
}
} else {
this.currentPipelineDialect = this.pipelineSetting.pipelineAsCodeSettings.pipelineDialect
}
},
inheritedChange (value) {
Expand Down

0 comments on commit e00b1b7

Please sign in to comment.