diff --git a/.github/actions/devcontainer_run_command/action.yml b/.github/actions/devcontainer_run_command/action.yml index 55157e1716..cf4ce730a6 100644 --- a/.github/actions/devcontainer_run_command/action.yml +++ b/.github/actions/devcontainer_run_command/action.yml @@ -178,6 +178,15 @@ runs: - name: Run command in DevContainer shell: bash run: | + # Write command to a temporary script file with lowercase name + SCRIPT_FILE=$(mktemp) + mv "${SCRIPT_FILE}" "${SCRIPT_FILE,,}" + SCRIPT_FILE="${SCRIPT_FILE,,}" + cat << 'EOF' > "${SCRIPT_FILE}" + ${{ inputs.COMMAND }} + EOF + chmod +x "${SCRIPT_FILE}" + docker run --rm --mount \ "type=bind,src=${{ github.workspace }},dst=/workspaces/tre" \ -v /var/run/docker.sock:/var/run/docker.sock \ @@ -246,4 +255,5 @@ runs: -e TF_VAR_app_gateway_sku=${{ inputs.APP_GATEWAY_SKU }} \ -e E2E_TESTS_NUMBER_PROCESSES="${{ inputs.E2E_TESTS_NUMBER_PROCESSES }}" \ '${{ inputs.CI_CACHE_ACR_NAME }}${{ env.ACR_DOMAIN_SUFFIX }}/tredev:${{ inputs.DEVCONTAINER_TAG }}' \ - bash -c "${{ inputs.COMMAND }}" + bash -c "./command.sh" + rm "${SCRIPT_FILE}" diff --git a/.github/workflows/deploy_tre_reusable.yml b/.github/workflows/deploy_tre_reusable.yml index e775bed80b..caa0037edd 100644 --- a/.github/workflows/deploy_tre_reusable.yml +++ b/.github/workflows/deploy_tre_reusable.yml @@ -424,7 +424,7 @@ jobs: uses: ./.github/actions/devcontainer_run_command with: # Although porter publish will build automatically, our makefile build target includes logic that should run - COMMAND: >- + COMMAND: | for i in {1..3}; do make bundle-build bundle-publish DIR=${{ matrix.BUNDLE_DIR }} && ec=0 && break || ec=\$? && sleep 30; done; (exit \$ec) DEVCONTAINER_TAG: ${{ inputs.DEVCONTAINER_TAG }} @@ -470,7 +470,7 @@ jobs: uses: ./.github/actions/devcontainer_run_command with: # Although porter publish will build automatically, our makefile build target includes logic that should run - COMMAND: >- + COMMAND: | for i in {1..3}; do make bundle-build bundle-publish DIR=${{ matrix.BUNDLE_DIR }} && ec=0 && break || ec=\$? && sleep 30; done; (exit \$ec) DEVCONTAINER_TAG: ${{ inputs.DEVCONTAINER_TAG }} @@ -514,7 +514,7 @@ jobs: - name: Register bundle uses: ./.github/actions/devcontainer_run_command with: - COMMAND: >- + COMMAND: | for i in {1..3}; do make bundle-register DIR=${{ matrix.BUNDLE_DIR }} && ec=0 && break || ec=\$? && sleep 10; done; (exit \$ec) DEVCONTAINER_TAG: ${{ inputs.DEVCONTAINER_TAG }} @@ -574,7 +574,7 @@ jobs: - name: Register bundle uses: ./.github/actions/devcontainer_run_command with: - COMMAND: >- + COMMAND: | for i in {1..3}; do make bundle-register DIR=${{ matrix.BUNDLE_DIR }} && ec=0 && break || ec=\$? && sleep 10; done; (exit \$ec) DEVCONTAINER_TAG: ${{ inputs.DEVCONTAINER_TAG }} @@ -623,7 +623,7 @@ jobs: - name: Register bundle uses: ./.github/actions/devcontainer_run_command with: - COMMAND: >- + COMMAND: | for i in {1..3}; do make bundle-register DIR=${{ matrix.BUNDLE_DIR }} && ec=0 && break || ec=\$? && sleep 10; done; (exit \$ec) DEVCONTAINER_TAG: ${{ inputs.DEVCONTAINER_TAG }}