Skip to content

Commit

Permalink
put one step in docker step
Browse files Browse the repository at this point in the history
  • Loading branch information
ladylokizup committed Apr 16, 2024
1 parent 49e3bd6 commit 3b95abe
Showing 1 changed file with 9 additions and 30 deletions.
39 changes: 9 additions & 30 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ inputs:
required: false
default: false
TF_LOG_PROVIDER:
description: "level tf log provider - info, debug, warn or trace"
description: "Level tf log provider - info, debug, warn or trace"
required: false

runs:
Expand All @@ -75,7 +75,6 @@ runs:
output-credentials: true

- name: Run Runtime Action Deploy
if: ${{ inputs.AWS_ROLE_ARN == 0 }}
run: |
FLAGS=$(echo "-v ${{ inputs.PATH_TO_MOUNT }}:/app-volume \
-e FEATURES_LEVEL_LOG=${{ inputs.FEATURES_LEVEL_LOG }} \
Expand All @@ -96,37 +95,17 @@ runs:
-e FEATURES_RELEASE_LOCALEXEC=${{ inputs.LOCALEXEC_ENABLED }} \
-e FEATURES_TERRAFORM_MODULES=${{ inputs.FEATURES_TERRAFORM_MODULES }}")
if [ ! -z "${{ inputs.TF_LOG_PROVIDER }}" ]; then
FLAGS=$(echo "$FLAGS -e FEATURES_TERRAFORM_LOGPROVIDER=${{ inputs.TF_LOG_PROVIDER }}")
if [ -z "${{ inputs.AWS_ROLE_ARN }}" ]; then
FLAGS=$(echo "$FLAGS -e AWS_ACCESS_KEY_ID=${{ inputs.AWS_ACCESS_KEY_ID }} \
-e AWS_SECRET_ACCESS_KEY=${{ inputs.AWS_SECRET_ACCESS_KEY }} \
-e AWS_SESSION_TOKEN=${{ inputs.AWS_SESSION_TOKEN }} \")
fi
docker run --rm \
$FLAGS \
--entrypoint=/app/stackspot-runtime-job-deploy \
${{ inputs.CONTAINER_URL }} start --run-task-id="${{ inputs.RUN_TASK_ID }}" --output-file="${{ inputs.OUTPUT_FILE }}"
shell: bash

- name: Run Runtime Action Deploy
if: ${{ inputs.AWS_ROLE_ARN != 0 }}
run: |
FLAGS=$(echo "-v ${{ inputs.PATH_TO_MOUNT }}:/app-volume \
-e FEATURES_LEVEL_LOG=${{ inputs.FEATURES_LEVEL_LOG }} \
-e AUTHENTICATE_CLIENT_ID=${{ inputs.CLIENT_ID }} \
-e AUTHENTICATE_CLIENT_SECRET=${{ inputs.CLIENT_KEY }} \
-e AUTHENTICATE_CLIENT_REALMS=${{ inputs.CLIENT_REALM }} \
-e AUTHENTICATE_URL=https://account-keycloak.stg.stackspot.com \
-e REPOSITORY_NAME=${{ inputs.REPOSITORY_NAME }} \
-e FEATURES_API_MANAGER=https://runtime-manager.stg.stackspot.com \
-e FEATURES_BASEPATH_TMP=/tmp/runtime/deploys \
-e FEATURES_BASEPATH_EBS=/opt/runtime \
-e FEATURES_TEMPLATES_FILEPATH=/app/ \
-e FEATURES_BASEPATH_TERRAFORM=/root/.asdf/shims/terraform \
-e AWS_ACCESS_KEY_ID=${{ steps.aws-cred.outputs.aws-access-key-id }} \
if [ ! -z "${{ inputs.AWS_ROLE_ARN }}" ]; then
FLAGS=$(echo "$FLAGS -e AWS_ACCESS_KEY_ID=${{ steps.aws-cred.outputs.aws-access-key-id }} \
-e AWS_SECRET_ACCESS_KEY=${{ steps.aws-cred.outputs.aws-secret-access-key }} \
-e AWS_SESSION_TOKEN=${{ steps.aws-cred.outputs.aws-session-token }} \
-e AWS_REGION=${{ inputs.AWS_REGION }} \
-e FEATURES_RELEASE_LOCALEXEC=${{ inputs.LOCALEXEC_ENABLED }} \
-e FEATURES_TERRAFORM_MODULES=${{ inputs.FEATURES_TERRAFORM_MODULES }}")
-e AWS_SESSION_TOKEN=${{ steps.aws-cred.outputs.aws-session-token }} \")
fi
if [ ! -z "${{ inputs.TF_LOG_PROVIDER }}" ]; then
FLAGS=$(echo "$FLAGS -e FEATURES_TERRAFORM_LOGPROVIDER=${{ inputs.TF_LOG_PROVIDER }}")
Expand Down

0 comments on commit 3b95abe

Please sign in to comment.