Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pipelines/build-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ steps:
displayName: "Build and push docker image to Azure Container Registry"
condition: and(succeeded(), eq(variables.isReleaseBuild, 'false'))
inputs:
containerRegistry: 'CosmosDB GraphQL/Hawaii'
containerRegistry: 'Data API builder Container Registry Connection'
repository: 'dab/$(Build.SourceBranch)'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
Expand All @@ -316,7 +316,7 @@ steps:
displayName: "Build and push docker image to Azure Container Registry tagged with releaseName and nuget release version"
condition: and(succeeded(), eq(variables.isReleaseBuild, 'true'))
inputs:
containerRegistry: 'CosmosDB GraphQL/Hawaii'
containerRegistry: 'Data API builder Container Registry Connection'
repository: 'dab'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
Expand All @@ -333,7 +333,7 @@ steps:
displayName: "Build and push docker image to ACR for publishing to MCR"
condition: and(succeeded(), eq(variables.isReleaseBuild, 'true'))
inputs:
containerRegistry: 'CosmosDB GraphQL/Hawaii'
containerRegistry: 'Data API builder Container Registry Connection'
repository: 'public/azure-databases/data-api-builder'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
Expand Down
23 changes: 21 additions & 2 deletions .pipelines/mysql-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
dbPassword: ''
data-source.connection-string: ''
testDatabaseName: 'MySqlTestDb'

steps:
- task: NuGetAuthenticate@1
Expand All @@ -48,10 +51,26 @@ jobs:
dockerVersion: 17.09.0-ce
releaseType: stable

- task: Bash@3
displayName: 'Generate password'
inputs:
targetType: 'inline'
script: |
password=$(cat /dev/urandom | tr -dc 'A-Za-z0-9' | head -c24)
echo "##vso[task.setvariable variable=dbPassword;]$password"

- task: PowerShell@2
displayName: 'Set Connection String'
inputs:
targetType: 'inline'
script: |
$connectionString="server=localhost;database=$(testDatabaseName);uid=root;pwd=$(dbPassword)"
Write-Host "##vso[task.setvariable variable=data-source.connection-string]$connectionString"

- bash: |
docker run --name mysql-container -p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=$(MySqlPassword) \
-e MYSQL_DATABASE=$(TestDatabaseName) \
-e MYSQL_ROOT_PASSWORD=$(dbPassword) \
-e MYSQL_DATABASE=$(testDatabaseName) \
-d mysql
condition: eq( variables['Agent.OS'], 'Linux' )
displayName: Get and Start Ubuntu MySql Image Docker
Expand Down
23 changes: 21 additions & 2 deletions .pipelines/pg-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
dbPassword: ''
data-source.connection-string: ''
testDatabaseName: 'PostgreSqlTestDb'

steps:
- task: NuGetAuthenticate@1
Expand All @@ -43,10 +46,26 @@ jobs:
dockerVersion: 17.09.0-ce
releaseType: stable

- task: Bash@3
displayName: 'Generate password'
inputs:
targetType: 'inline'
script: |
password=$(cat /dev/urandom | tr -dc 'A-Za-z0-9' | head -c24)
echo "##vso[task.setvariable variable=dbPassword;]$password"

- task: PowerShell@2
displayName: 'Set Connection String'
inputs:
targetType: 'inline'
script: |
$connectionString="Host=localhost;Database=$(testDatabaseName);username=postgres;password=$(dbPassword)"
Write-Host "##vso[task.setvariable variable=data-source.connection-string]$connectionString"

- bash: |
docker run --name postgres-container -p 5432:5432 \
-e POSTGRES_PASSWORD=$(PostgresPassword) \
-e POSTGRES_DB=$(TestDatabaseName) \
-e POSTGRES_PASSWORD=$(dbPassword) \
-e POSTGRES_DB=$(testDatabaseName) \
-d postgres
condition: eq( variables['Agent.OS'], 'Linux' )
displayName: Get and Start Ubuntu Postgres Image Docker
Expand Down