feat: add input parameters to pipeline
This commit is contained in:
parent
fe37adca52
commit
f7596d6ecf
1 changed files with 23 additions and 5 deletions
|
|
@ -2,10 +2,26 @@ name: createapp
|
|||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
a_app_version:
|
||||
type: string
|
||||
description: "Application Version e.g. 1.0.0"
|
||||
required: true
|
||||
b_app_region:
|
||||
type: string
|
||||
description: "Application Region e.g. EU"
|
||||
default: EU
|
||||
c_app_flavor:
|
||||
type: string
|
||||
description: "Application Flavor e.g. EU.small"
|
||||
default: EU.small
|
||||
|
||||
env:
|
||||
EDGEXR_PLATFORM_USERNAME: ${{ secrets.EDGEXR_PLATFORM_USERNAME }}
|
||||
EDGEXR_PLATFORM_PASSWORD: ${{ secrets.EDGEXR_PLATFORM_PASSWORD }}
|
||||
APP_VERSION: ${{ inputs.a_app_version }}
|
||||
APP_REGION: ${{ inputs.b_app_region }}
|
||||
APP_FLAVOR: ${{ inputs.c_app_flavor }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -46,22 +62,24 @@ jobs:
|
|||
"App": {
|
||||
"key": {
|
||||
"organization": "edp-developer-framework",
|
||||
"name": "HelloWorldAuto",
|
||||
"version": "1.0"
|
||||
"name": "${{ steps.repository.outputs.repository }}",
|
||||
"version": "${APP_VERSION}"
|
||||
},
|
||||
"image_path": "edp.buildth.ing/devfw-cicd/fibonacci_pipeline:development",
|
||||
"image_path": "${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}:${{ steps.docker.outputs.tags }}",
|
||||
"image_type": "Docker",
|
||||
"access_ports": "tcp:80",
|
||||
"default_flavor": {
|
||||
"name": "EU.small"
|
||||
"name": "${APP_FLAVOR}"
|
||||
},
|
||||
"deployment": "docker",
|
||||
"required_outbound_connections": null
|
||||
},
|
||||
"Region": "EU"
|
||||
"Region": "${APP_REGION}"
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
echo $CREATEAPP_JSON
|
||||
|
||||
echo create app
|
||||
curl -X POST https://hub.apps.edge.platform.mg3.mdb.osc.live/api/v1/auth/ctrl/CreateApp -H 'Content-Type: application/json' -H "Authorization: Bearer $EDGEXR_TOKEN" -Sf --data "$CREATEAPP_JSON"
|
||||
Loading…
Add table
Add a link
Reference in a new issue