Skip to content

Commit

Permalink
ci: fix how parameters are passed (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
stepansergeevitch authored Jan 30, 2024
1 parent c037809 commit 3d42c79
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/integration-tests-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Determine env variables
run: |
if [ "${{ github.event.inputs.environment }}" == 'staging' ]; then
if [ "${{ inputs.environment }}" == 'staging' ]; then
echo "USERNAME=${{ secrets.FIREBOLT_STG_USERNAME }}" >> "$GITHUB_ENV"
echo "PASSWORD=${{ secrets.FIREBOLT_STG_PASSWORD }}" >> "$GITHUB_ENV"
echo "EXCLUDE_ENV=dev" >> "$GITHUB_ENV"
Expand All @@ -73,30 +73,30 @@ jobs:
run: echo '### Ran integration tests against ${{ inputs.environment }} ' >> $GITHUB_STEP_SUMMARY

- name: Setup database and engine
if: ${{ github.event.inputs.database == '' }}
if: ${{ inputs.database == '' }}
id: setup
uses: firebolt-db/integration-testing-setup@v1
with:
firebolt-username: ${{ env.USERNAME }}
firebolt-password: ${{ env.PASSWORD }}
api-endpoint: "api.${{ github.event.inputs.environment }}.firebolt.io"
api-endpoint: "api.${{ inputs.environment }}.firebolt.io"
region: "us-east-1"
instance-type: "B2"

- name: Determine database name
id: find-database-name
run: |
if ! [[ -z "${{ github.event.inputs.database }}" ]]; then
echo "database_name=${{ github.event.inputs.database }}" >> $GITHUB_OUTPUT
if ! [[ -z "${{ inputs.database }}" ]]; then
echo "database_name=${{ inputs.database }}" >> $GITHUB_OUTPUT
else
echo "database_name=${{ steps.setup.outputs.database_name }}" >> $GITHUB_OUTPUT
fi
- name: Determine engine name
id: find-engine-name
run: |
if ! [[ -z "${{ github.event.inputs.engine }}" ]]; then
echo "engine_name=${{ github.event.inputs.engine }}" >> $GITHUB_OUTPUT
if ! [[ -z "${{ inputs.engine }}" ]]; then
echo "engine_name=${{ inputs.engine }}" >> $GITHUB_OUTPUT
else
echo "engine_name=${{ steps.setup.outputs.engine_name }}" >> $GITHUB_OUTPUT
fi
Expand All @@ -106,7 +106,7 @@ jobs:
FIREBOLT_ENV: ${{ inputs.environment }}
FIREBOLT_DATABASE: ${{ steps.setup.outputs.database_name }}
FIREBOLT_ENGINE_NAME: ${{ steps.setup.outputs.engine_name }}
FIREBOLT_ENDPOINT: "api.${{ github.event.inputs.environment }}.firebolt.io"
FIREBOLT_ENDPOINT: "api.${{ inputs.environment }}.firebolt.io"
FIREBOLT_USERNAME: ${{ env.USERNAME }}
FIREBOLT_PASSWORD: ${{ env.PASSWORD }}
EXCLUDE_ENV: ${{ env.EXCLUDE_ENV }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/integration-tests-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,30 +72,30 @@ jobs:
run: echo '### Ran integration tests against ${{ inputs.environment }} ' >> $GITHUB_STEP_SUMMARY

- name: Setup database and engine
if: ${{ github.event.inputs.database == '' }}
if: ${{ inputs.database == '' }}
id: setup
uses: firebolt-db/integration-testing-setup@v2
with:
firebolt-client-id: ${{ env.CLIENT_ID }}
firebolt-client-secret: ${{ env.CLIENT_SECRET }}
account: ${{ vars.FIREBOLT_ACCOUNT }}
api-endpoint: "api.${{ github.event.inputs.environment }}.firebolt.io"
api-endpoint: "api.${{ inputs.environment }}.firebolt.io"
instance-type: "B2"

- name: Determine database name
id: find-database-name
run: |
if ! [[ -z "${{ github.event.inputs.database }}" ]]; then
echo "database_name=${{ github.event.inputs.database }}" >> $GITHUB_OUTPUT
if ! [[ -z "${{ inputs.database }}" ]]; then
echo "database_name=${{ inputs.database }}" >> $GITHUB_OUTPUT
else
echo "database_name=${{ steps.setup.outputs.database_name }}" >> $GITHUB_OUTPUT
fi
- name: Determine engine name
id: find-engine-name
run: |
if ! [[ -z "${{ github.event.inputs.engine }}" ]]; then
echo "engine_name=${{ github.event.inputs.engine }}" >> $GITHUB_OUTPUT
if ! [[ -z "${{ inputs.engine }}" ]]; then
echo "engine_name=${{ inputs.engine }}" >> $GITHUB_OUTPUT
else
echo "engine_name=${{ steps.setup.outputs.engine_name }}" >> $GITHUB_OUTPUT
fi
Expand Down

0 comments on commit 3d42c79

Please sign in to comment.