Skip to content

Commit

Permalink
Pass sqlcompare version and redgate credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
credfeto committed Nov 13, 2024
1 parent 34f69a9 commit 9caf43f
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 9 deletions.
7 changes: 6 additions & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ inputs:
REDGATE_PAT:
description: 'Redgate authentication Personal Access Token'
required: true
SQLCOMPARE_VERSION:
description: 'Version of SQL Compare to use'
required: true

runs:
using: "composite"
Expand Down Expand Up @@ -334,6 +337,7 @@ runs:
DB_FOLDER: ${{github.workspace}}/db
REDGATE_EMAIL: ${{inputs.REDGATE_EMAIL}}
REDGATE_PAT: ${{inputs.REDGATE_EMAIL}}
SQLCOMPARE_VERSION: ${{inputs.SQLCOMPARE_VERSION}}
NUGET_PACK: ${{inputs.NUGET_PACK}}
NUGET_FEED: ${{inputs.NUGET_FEED}}
NUGET_SYMBOL_FEED: ${{inputs.NUGET_SYMBOL_FEED}}
Expand Down Expand Up @@ -419,7 +423,8 @@ runs:
SQL_PASSWORD: ${{inputs.SQL_PASSWORD}}
DB_FOLDER: ${{github.workspace}}/db
REDGATE_EMAIL: ${{inputs.REDGATE_EMAIL}}
REDGATE_PAT: ${{inputs.REDGATE_EMAIL}}
REDGATE_PAT: ${{inputs.REDGATE_PAT}}
SQLCOMPARE_VERSION: ${{inputs.SQLCOMPARE_VERSION}}

- name: "Dotnet: Cloudformation Deploy"
if: |-
Expand Down
11 changes: 8 additions & 3 deletions .github/actions/database-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ inputs:
REDGATE_PAT:
description: 'Redgate authentication Personal Access Token'
required: true
SQLCOMPARE_VERSION:
description: 'Version of SQL Compare to use'
required: true

runs:
using: "composite"
Expand All @@ -35,15 +38,17 @@ runs:
shell: bash
run: docker pull redgate/sqlcompare:15.3.0

# Need to get these to work
# /email:"${{inputs.REDGATE_EMAIL}}" \
# /token:"${{inputs.REDGATE_PAT}}" \
- name: "Build SQL Diff change"
shell: bash
run: |
docker run \
"-v$GITHUB_WORKSPACE:$GITHUB_WORKSPACE" \
--net=host \
--rm redgate/sqlcompare:15.3.0 \
--email="${{inputs.REDGATE_EMAIL}}" \
--token="${{inputs.REDGATE_PAT}}" \
--rm \
"redgate/sqlcompare:${{inputs.SQLCOMPARE_VERSION}}" \
/IAgreeToTheEULA \
/filter:"$DB_FILTER" \
/options:CaseSensitiveObjectDefinition,ConsiderNextFilegroupInPartitionSchemes,DecryptPost2kEncryptedObjects,DoNotOutputCommentHeader,ForceColumnOrder,IgnoreCertificatesAndCryptoKeys,IgnoreDatabaseAndServerName,IgnoreUserProperties,IgnoreUsersPermissionsAndRoleMemberships,IgnoreWhiteSpace,IgnoreWithElementOrder,IncludeDependencies,NoDeploymentLogging,ThrowOnFileParseFailed,UseCompatibilityLevel \
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/dotnet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ inputs:
REDGATE_PAT:
description: 'Redgate authentication Personal Access Token'
required: true
SQLCOMPARE_VERSION:
description: 'Version of SQL Compare to use'
required: true

# GENERAL
GITHUB_TOKEN:
Expand Down Expand Up @@ -155,7 +158,8 @@ runs:
BUILD_VERSION: ${{inputs.BUILD_VERSION}}
DB_FOLDER: ${{inputs.DB_FOLDER}}
REDGATE_EMAIL: ${{inputs.REDGATE_EMAIL}}
REDGATE_PAT: ${{inputs.REDGATE_EMAIL}}
REDGATE_PAT: ${{inputs.REDGATE_PAT}}
SQLCOMPARE_VERSION: ${{inputs.SQLCOMPARE_VERSION}}

############################################################################################################
# Publish ready for deploy
Expand Down
13 changes: 9 additions & 4 deletions .github/actions/sql/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ inputs:
REDGATE_PAT:
description: 'Redgate authentication Personal Access Token'
required: true
SQLCOMPARE_VERSION:
description: 'Version of SQL Compare to use'
required: true

runs:
using: "composite"
Expand Down Expand Up @@ -48,17 +51,19 @@ runs:

- name: "SQL: Get SQL Compare"
shell: bash
run: docker pull redgate/sqlcompare:15.3.0
run: docker pull "redgate/sqlcompare:${{inputs.SQLCOMPARE_VERSION}}"

# Need to get these to work
# /email:"${{inputs.REDGATE_EMAIL}}" \
# /token:"${{inputs.REDGATE_PAT}}" \
- name: "Build SQL change"
shell: bash
run: |
docker run \
"-v$GITHUB_WORKSPACE:$GITHUB_WORKSPACE" \
--net=host \
--rm redgate/sqlcompare:15.3.0 \
--email="${{inputs.REDGATE_EMAIL}}" \
--token="${{inputs.REDGATE_PAT}}" \
--rm \
"redgate/sqlcompare:${{inputs.SQLCOMPARE_VERSION}}" \
/IAgreeToTheEULA \
/filter:"$DB_FILTER" \
/options:CaseSensitiveObjectDefinition,ConsiderNextFilegroupInPartitionSchemes,DecryptPost2kEncryptedObjects,DoNotOutputCommentHeader,ForceColumnOrder,IgnoreCertificatesAndCryptoKeys,IgnoreDatabaseAndServerName,IgnoreUserProperties,IgnoreUsersPermissionsAndRoleMemberships,IgnoreWhiteSpace,IgnoreWithElementOrder,IncludeDependencies,NoDeploymentLogging,ThrowOnFileParseFailed,UseCompatibilityLevel \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-and-publish-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:

env:
REPO_STATUS: ${{vars.REPO_VISIBILITY}}
SQLCOMPARE_VERSION: 15.3.13

steps:
- name: "Initialise Workspace"
Expand Down Expand Up @@ -106,6 +107,7 @@ jobs:
SQL_PASSWORD: ${{secrets.SQL_PASSWORD}}
REDGATE_EMAIL: ${{secrets.REDGATE_EMAIL}}
REDGATE_PAT: ${{secrets.REDGATE_PAT}}
SQLCOMPARE_VERSION: ${{env.SQLCOMPARE_VERSION}}
CREATE_RELEASE: false

- name: "Build and deploy"
Expand Down Expand Up @@ -153,6 +155,7 @@ jobs:
SQL_PASSWORD: ${{secrets.SQL_PASSWORD}}
REDGATE_EMAIL: ${{secrets.REDGATE_EMAIL}}
REDGATE_PAT: ${{secrets.REDGATE_PAT}}
SQLCOMPARE_VERSION: ${{env.SQLCOMPARE_VERSION}}
CREATE_RELEASE: false

- name: "Build Version"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-and-publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:

env:
REPO_STATUS: ${{vars.REPO_VISIBILITY}}
SQLCOMPARE_VERSION: 15.3.13

steps:
- name: "Initialise Workspace"
Expand Down Expand Up @@ -97,6 +98,7 @@ jobs:
SQL_PASSWORD: ${{secrets.SQL_PASSWORD}}
REDGATE_EMAIL: ${{secrets.REDGATE_EMAIL}}
REDGATE_PAT: ${{secrets.REDGATE_PAT}}
SQLCOMPARE_VERSION: ${{env.SQLCOMPARE_VERSION}}
CREATE_RELEASE: true

- name: "Build and deploy"
Expand Down Expand Up @@ -144,6 +146,7 @@ jobs:
SQL_PASSWORD: ${{secrets.SQL_PASSWORD}}
REDGATE_EMAIL: ${{secrets.REDGATE_EMAIL}}
REDGATE_PAT: ${{secrets.REDGATE_PAT}}
SQLCOMPARE_VERSION: ${{env.SQLCOMPARE_VERSION}}
CREATE_RELEASE: true

- name: "Build Version"
Expand Down

0 comments on commit 9caf43f

Please sign in to comment.