|
| 1 | +name: Solsta Launch Files Action |
| 2 | +description: Configure Launch Files for an environment |
| 3 | +inputs: |
| 4 | + solsta_client_id: |
| 5 | + description: Client ID to authenticate usage of Solid State Networks console tools |
| 6 | + required: true |
| 7 | + default: "" |
| 8 | + solsta_client_secret: |
| 9 | + description: Secret Key to authenticate usage of Solid State Networks console tools |
| 10 | + required: true |
| 11 | + default: "" |
| 12 | + console_version: |
| 13 | + description: Version of Solsta Console Tools to use |
| 14 | + required: true |
| 15 | + default: "6.1.2.51" |
| 16 | + scripts_version: |
| 17 | + description: Version of Solsta Deploy Scripts to use |
| 18 | + required: true |
| 19 | + default: "3.7.24" |
| 20 | + target_product: |
| 21 | + description: Target product containing the environment (case-sensitive) |
| 22 | + required: true |
| 23 | + target_env: |
| 24 | + description: Target environment for launch files (case-sensitive) |
| 25 | + required: true |
| 26 | + launch_file1: |
| 27 | + description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...") |
| 28 | + required: true |
| 29 | + launch_file2: |
| 30 | + description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...") |
| 31 | + required: false |
| 32 | + launch_file3: |
| 33 | + description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...") |
| 34 | + required: false |
| 35 | + launch_file4: |
| 36 | + description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...") |
| 37 | + required: false |
| 38 | + launch_file5: |
| 39 | + description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...") |
| 40 | + required: false |
| 41 | + launch_file6: |
| 42 | + description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...") |
| 43 | + required: false |
| 44 | + launch_file7: |
| 45 | + description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...") |
| 46 | + required: false |
| 47 | + launch_file8: |
| 48 | + description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...") |
| 49 | + required: false |
| 50 | + launch_file9: |
| 51 | + description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...") |
| 52 | + required: false |
| 53 | + launch_file10: |
| 54 | + description: Launch file path and argument, format is ("entry name" "path" "arg1 arg2 ...") |
| 55 | + required: false |
| 56 | + |
| 57 | +outputs: |
| 58 | + result: |
| 59 | + description: The state of the action, if processes completed successfully |
| 60 | + |
| 61 | +runs: |
| 62 | + using: 'composite' |
| 63 | + steps: |
| 64 | + - name: Solsta setup |
| 65 | + uses: snxd/deploy-github-setup-action@v2 |
| 66 | + with: |
| 67 | + solsta_client_id: ${{ inputs.solsta_client_id }} |
| 68 | + solsta_client_secret: ${{ inputs.solsta_client_secret }} |
| 69 | + console_version: ${{ inputs.console_version }} |
| 70 | + scripts_version: ${{ inputs.scripts_version }} |
| 71 | + |
| 72 | + - name: Do Deploy |
| 73 | + shell: bash |
| 74 | + working-directory: solsta_work |
| 75 | + run: | |
| 76 | + # Build the launch files arguments |
| 77 | + SOLSTA_EXTRA="" |
| 78 | + for i in 1 2 3 4 5 6 7 8 9 10 ; do |
| 79 | + VARNAME=${{ iinputs.launch_file ))$i |
| 80 | + eval SOLSTA_LAUNCH_ENTRY=${!VARNAME} |
| 81 | + if ["$SOLSTA_LAUNCH_ENTRY" != "" ] ; then |
| 82 | + SOLSTA_EXTRA="$SOLSTA_EXTRA --launch_name=\"${SOLSTA_LAUNCH_ENTRY[0]}\" --launch_executable=\"${SOLSTA_LAUNCH_ENTRY[1]}\" --launch_arguments=\"${SOLSTA_LAUNCH_ENTRY[2]}\" " |
| 83 | + fi |
| 84 | + done |
| 85 | + # Run the script that assigns the launch files to the environment |
| 86 | + echo extra = $SOLSTA_EXTRA |
| 87 | + 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_env }}" $SOLSTA_EXTRA |
| 88 | +
|
| 89 | +branding: |
| 90 | + icon: "download-cloud" |
| 91 | + color: "yellow" |
0 commit comments