You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to use this scaffolder to create a form that will trigger a pipeline with some configuration options.
We have done this in the pipeline using a parameter, this parameter is an object. We want to pass the content of the filled in form as an object to this pipeline parameter.
In the readme we see:
- title: Choose Pipeline Parameters
description: Please select some pipeline parameters
properties:
pipelineParameters:
title: Pipeline Parameters
type: object
properties:
name:
type: string
id:
type: number
foo:
type: string
***note these properties for parameters are just examples, you can use whatever key values that your pi
We thought perhaps we would be able to pass an object like above, so pipelineParameters to this parameter in the pipeline.
This led us to this solution:
# template.yaml
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: create-azure-pipeline-1
title: Run Azure Pipeline
description: Create Azure pipeline 3
spec:
owner: parfuemerie-douglas
type: service
parameters:
- title: Backstage Information
required:
- name
- owner
properties:
name:
title: Project name
type: string
description: Choose a unique project name.
ui:field: EntityNamePicker
ui:autofocus: true
owner:
title: Owner
type: string
description: Select an owner for the Backstage component.
ui:field: OwnerPicker
ui:options:
allowedKinds:
- Group
- title: Dashboard Configuration
required:
- dbConfig
properties:
dbConfig:
title: Dashboard Configuration
type: object
properties:
version:
title: Version
type: string
description: Version of the dashboard to be deployed
default: test1
project_name:
title: Project Name
type: string
description: Squad name
default: test2
admin_group:
title: Admin Group
type: string
description: Assignment group
default: test3
application_ci:
title: Application CI
type: string
description: App CI
default: test4
steps:
- id: runAzurePipeline
name: Run Azure Pipeline
action: azure:pipeline:run
input:
organization: <ORGANIZATION>
pipelineId: <PIPELINEID>
project: <PROJECT>
pipelineParameters:
json_object: {{ parameters.dbConfig }}
output:
links:
- title: Open in catalog
icon: catalog
entityRef: ${{ steps.register.output.entityRef }}
However, when we try to run this template through backstage, the pipeline is not triggered. We get a screen like below:
The pipeline seems to insta-run and succeed, however, I know for a fact the pipeline never ran through azure devops UI.
We have tried to hard-code an object, but this also does not succeed. Some options we have tried:
I found out that pipelineParameters will only work if the parameters being passed into the azure pipeline YAML are the exact same as in the azure pipeline YAML
For your case of passing in objects, however, I'm not sure if you can pass in an object. You would need to treat pipelineParameters as its own object and pass in key-value pairs
We want to use this scaffolder to create a form that will trigger a pipeline with some configuration options.
We have done this in the pipeline using a parameter, this parameter is an object. We want to pass the content of the filled in form as an object to this pipeline parameter.
In the readme we see:
We thought perhaps we would be able to pass an object like above, so pipelineParameters to this parameter in the pipeline.
This led us to this solution:
However, when we try to run this template through backstage, the pipeline is not triggered. We get a screen like below:
The pipeline seems to insta-run and succeed, however, I know for a fact the pipeline never ran through azure devops UI.
We have tried to hard-code an object, but this also does not succeed. Some options we have tried:
We have verified that we can work with the PAT, as when we drop the json_object from pipeline_parameters the pipeline can be run through Backstage.
Any help is appreciated, since we are not getting any error message we are kind of shooting in the dark. How are we supposed to form this?
The text was updated successfully, but these errors were encountered: