mirror of
https://github.com/harness/drone.git
synced 2025-05-15 00:19:58 +08:00
fix run step
This commit is contained in:
parent
839b3e3bb6
commit
9bb1185331
@ -47,28 +47,12 @@ const PluginCategories: PluginCategoryInterface[] = [
|
|||||||
{ category: PluginCategory.Drone, name: 'Drone', description: 'Run Drone plugins', icon: 'ci-infra' }
|
{ category: PluginCategory.Drone, name: 'Drone', description: 'Run Drone plugins', icon: 'ci-infra' }
|
||||||
]
|
]
|
||||||
|
|
||||||
const StepNameInput: PluginInput = {
|
const RunStep: TypesPlugin = {
|
||||||
type: 'string',
|
uid: 'run',
|
||||||
description: 'Name of the step'
|
description: 'Run a script',
|
||||||
|
spec: '{"kind":"run","type":"step","name":"Run","spec":{"name":"run","description":"Run a script","inputs":{"image":{"type":"string","description":"Container image","required":true},"script":{"type":"string","description":"Script to execute","required":true,"options":{"isExtended":true}}}}}'
|
||||||
}
|
}
|
||||||
|
|
||||||
// const RunStep: Plugin = {
|
|
||||||
// name: 'run',
|
|
||||||
// spec: {
|
|
||||||
// name: 'Run',
|
|
||||||
// inputs: {
|
|
||||||
// name: StepNameInput,
|
|
||||||
// image: {
|
|
||||||
// type: 'string'
|
|
||||||
// },
|
|
||||||
// script: {
|
|
||||||
// type: 'string',
|
|
||||||
// options: { isExtended: true }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
interface PluginInsertionTemplateInterface {
|
interface PluginInsertionTemplateInterface {
|
||||||
name?: string
|
name?: string
|
||||||
type: 'plugins'
|
type: 'plugins'
|
||||||
@ -134,7 +118,7 @@ export const PluginsPanel = ({ onPluginAddUpdate }: PluginsPanelInterface): JSX.
|
|||||||
if (pluginCategory === PluginCategory.Drone) {
|
if (pluginCategory === PluginCategory.Drone) {
|
||||||
setPanelView(PluginPanelView.Listing)
|
setPanelView(PluginPanelView.Listing)
|
||||||
} else if (pluginCategory === PluginCategory.Harness) {
|
} else if (pluginCategory === PluginCategory.Harness) {
|
||||||
// setPlugin(RunStep)
|
setPlugin(RunStep)
|
||||||
setPanelView(PluginPanelView.Configuration)
|
setPanelView(PluginPanelView.Configuration)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@ -292,7 +276,10 @@ export const PluginsPanel = ({ onPluginAddUpdate }: PluginsPanelInterface): JSX.
|
|||||||
}): { [key: string]: PluginInput } => {
|
}): { [key: string]: PluginInput } => {
|
||||||
const inputsClone = Object.assign(
|
const inputsClone = Object.assign(
|
||||||
{
|
{
|
||||||
name: StepNameInput
|
name: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Name of the step'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
existingInputs
|
existingInputs
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user