-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
90 lines (86 loc) · 3.77 KB
/
action.yml
File metadata and controls
90 lines (86 loc) · 3.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Solsta Launch Files Action
description: Configure Launch Files for an environment
inputs:
solsta_client_id:
description: Client ID to authenticate usage of Solid State Networks console tools
required: true
default: ""
solsta_client_secret:
description: Secret Key to authenticate usage of Solid State Networks console tools
required: true
default: ""
console_version:
description: Version of Solsta Console Tools to use
required: true
default: "7.2.49"
scripts_version:
description: Version of Solsta Deploy Scripts to use
required: true
default: "3.11.0"
target_product:
description: Target product containing the environment (case-sensitive)
required: true
target_environment:
description: Target environment for launch files (case-sensitive)
required: true
launch_file1:
description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...")
required: true
launch_file2:
description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...")
required: false
launch_file3:
description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...")
required: false
launch_file4:
description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...")
required: false
launch_file5:
description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...")
required: false
launch_file6:
description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...")
required: false
launch_file7:
description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...")
required: false
launch_file8:
description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...")
required: false
launch_file9:
description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...")
required: false
launch_file10:
description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...")
required: false
outputs:
result:
description: The state of the action, if processes completed successfully
runs:
using: 'composite'
steps:
- name: Solsta setup
uses: snxd/deploy-github-setup-action@v5
with:
solsta_client_id: ${{ inputs.solsta_client_id }}
solsta_client_secret: ${{ inputs.solsta_client_secret }}
console_version: ${{ inputs.console_version }}
scripts_version: ${{ inputs.scripts_version }}
- name: Configure Launch Files
shell: bash
working-directory: solsta_work
run: |
# Build the launch files arguments
SOLSTA_EXTRA=""
for i in '${{ inputs.launch_file1 }}' '${{ inputs.launch_file2 }}' '${{ inputs.launch_file3 }}' '${{ inputs.launch_file4 }}' '${{ inputs.launch_file5 }}' '${{ inputs.launch_file6 }}' '${{ inputs.launch_file7 }}' '${{ inputs.launch_file8 }}' '${{ inputs.launch_file9 }}' '${{ inputs.launch_file10 }}' ; do
if [[ "$i" != "" ]] ; then
eval SOLSTA_LAUNCH_ENTRY=$i
SOLSTA_EXTRA="$SOLSTA_EXTRA --launch_name=\"${SOLSTA_LAUNCH_ENTRY[0]}\" --launch_executable=\"${SOLSTA_LAUNCH_ENTRY[1]}\" --launch_arguments=\"${SOLSTA_LAUNCH_ENTRY[2]}\" "
fi
done
# Run the script that assigns the launch files to the environment
echo extra = $SOLSTA_EXTRA
eval "python manifest.py --debug_network --console_credentials=client_credentials.json --console_directory=solsta_console/${{ inputs.console_version }}/console/ --product_name=\"${{ inputs.target_product }}\" --env_name=\"${{ inputs.target_environment }}\" --object=launch --task=set $SOLSTA_EXTRA"
branding:
icon: "download-cloud"
color: "yellow"