Skip to content

Commit

Permalink
Use more variables. Modify release condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlLevik committed Aug 10, 2021
1 parent 762fa20 commit 981c511
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
variables:
MYSQL_ROOT_PASSWORD: mysql_root_pwd

MYSQL_HOST: '127.0.0.1'
MYSQL_PORT: '3306'
trigger:
paths:
exclude:
Expand All @@ -15,7 +16,7 @@ resources:
MYSQL_DATABASE: ispybtest
MYSQL_ROOT_PASSWORD: $(MYSQL_ROOT_PASSWORD)
ports:
- 3306:3306
- $(MYSQL_PORT):$(MYSQL_PORT)

pool:
vmImage: ubuntu-20.04
Expand All @@ -35,10 +36,11 @@ stages:

steps:
- task: Maven@3
displayName: ‘Maven package build’
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
options: '-Dispyb.url="jdbc:mariadb://127.0.0.1:3306" -Dispyb.user=root -Dispyb.pw="$(MYSQL_ROOT_PASSWORD)" -Dispyb.host=127.0.0.1'
options: '-Dispyb.url="jdbc:mariadb://$(MYSQL_HOST):$(MYSQL_PORT)" -Dispyb.user=root -Dispyb.pw="$(MYSQL_ROOT_PASSWORD)" -Dispyb.host=$(MYSQL_HOST)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
Expand All @@ -47,7 +49,7 @@ stages:
goals: 'package'
- task: GithubRelease@0
displayName: ‘Create GitHub Release’
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/v')
inputs:
githubConnection: KarlConnection
repositoryName: DiamondLightSource/gda-ispyb-api
repositoryName: DiamondLightSource/gda-ispyb-api

0 comments on commit 981c511

Please sign in to comment.