File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ parameters:
9090 - name : config_file
9191 default : " "
9292 - name : migrations_dir
93- default : " "
93+ default : " "
94+ - name : driver_dir
95+ default : " "
9496 - name : user
9597 default : " sys"
9698 - name : password
@@ -247,6 +249,7 @@ stages:
247249 config_dir : ${{ flyway.config_dir }}
248250 config_file : ${{ flyway.config_file }}
249251 migrations_dir : ${{ flyway.migrations_dir }}
252+ driver_dir : ${{ flyway.driver_dir }}
250253 user : ${{ flyway.user }}
251254 password : ${{ flyway.password }}
252255 # Execute utplsql tests
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ parameters:
77 - name : download_location
88 default : " "
99 - name : unpack_location
10- default : " $(Build.BinariesDirectory) "
10+ default : " "
1111 - name : url
1212 default : " "
1313 - name : archive
@@ -21,13 +21,18 @@ parameters:
2121steps :
2222- ${{ each package in parameters.packages }} :
2323 - bash : |
24- curl -Lk -o ${{package.download_location}} \
24+ curl -Lk -o --create-dirs ${{package.download_location}} \
2525 ${{package.url}}
2626
27- echo Unzipping to ${{package.unpack_location}}
28- unzip -qq -d ${{package.unpack_location}} ${{package.download_location}}
29- chmod -R u+x ${{package.unpack_location}}
30- rm -rf ${{package.download_location}}
27+ if [[ ! -z ${{package.unpack_location}} ]]; then
28+ echo Unzipping to ${{package.unpack_location}}
29+ unzip -qq -d ${{package.unpack_location}} ${{package.download_location}}
30+ chmod -R u+x ${{package.unpack_location}}
31+ rm -rf ${{package.download_location}}
32+ else
33+ chmod -R u+x ${{package.download_location}}
34+ fi
35+
3136 if [[ ! -z ${{package.addToPath}} ]]; then
3237 echo "Add package to path"
3338 echo "##vso[task.prependpath]${{package.addToPath}}"
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ parameters:
88 - name : config_file
99 default : " "
1010 - name : migrations_dir
11- default : " "
11+ default : " "
12+ - name : driver_dir
13+ default : " "
1214 - name : user
1315 default : " sys"
1416 - name : password
3032 time docker run --rm \
3133 -v ${{ parameters.migrations_dir }}:/flyway/sql \
3234 -v ${{ parameters.config_dir }}:/flyway/conf \
33- -v /absolute/path/to/my/driverdir :/flyway/drivers \
35+ -v ${{ parameters.driver_dir }} :/flyway/drivers \
3436 flyway/flyway migrate \
3537 -url=jdbc:oracle:thin:@//${{ parameters.connectionString }} \
3638 -configFiles="/flyway/conf/${{ parameters.config_file }}" \
Original file line number Diff line number Diff line change @@ -3,4 +3,5 @@ variables:
33 dockerRepo : " utplsqlv3/oracledb"
44 gitRepo : " https://github.com/utPLSQL/utPLSQL.git"
55 sqlclUrl : " https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip"
6- utplsqlcliUrl : " https://github.com/utPLSQL/utPLSQL-cli/releases/download/$(UTPLSQL_CLI_VERSION)/utPLSQL-cli.zip"
6+ utplsqlcliUrl : " https://github.com/utPLSQL/utPLSQL-cli/releases/download/$(UTPLSQL_CLI_VERSION)/utPLSQL-cli.zip"
7+ ojdbcurl : " https://download.oracle.com/otn-pub/otn_software/jdbc/213/ojdbc8.jar"
Original file line number Diff line number Diff line change @@ -38,18 +38,21 @@ extends:
3838 environment : " build"
3939 artifactName : ${{ variables.artifactName }}
4040 packages :
41- - name : sqlcl
41+ - name : downloadSqlcl
4242 download_location : " $(Build.BinariesDirectory)/sqlcl-latest.zip"
4343 unpack_location : " $(Build.BinariesDirectory)"
4444 url : ${{ variables.sqlclUrl }}
4545 archive : " zip"
4646 addtoPath : " $(SQLCL_DIR)/bin"
47- - name : utlplsqlcli
47+ - name : downloadUtlplsqlcli
4848 download_location : " $(Build.BinariesDirectory)/utPLSQL-cli.zip"
4949 unpack_location : " $(Build.BinariesDirectory)"
5050 url : ${{ variables.utplsqlcliUrl }}
5151 archive : " zip"
5252 addToPath : " $(UTPLSQL_CLI_DIR)/bin"
53+ - name : DownloadOjdbc8
54+ download_location : " $(Build.BinariesDirectory)/drivers/ojdbc8.jar "
55+ url : ${{ variables.ojdbcurl }}
5356 createDatabase :
5457 - dbname : UTBUILD
5558 oracleVersion : " 19c-se2-small"
@@ -75,6 +78,7 @@ extends:
7578 - config_dir : " $(Build.SourcesDirectory)"
7679 config_file : " utplsql_flyway.conf"
7780 migrations_dir : " $(Build.SourcesDirectory)/source"
81+ driver_dir : " $(Build.BinariesDirectory)/drivers"
7882 user : $(DB_USER)
7983 password : $(DB_PASS)
8084 gitCheckoutDetails :
You can’t perform that action at this time.
0 commit comments