@@ -9,12 +9,7 @@ parameters:
99 - name : utplsqlVersion
1010 default : " "
1111 - name : utplsqlDir
12- default : " "
13- - name : addToPaths
14- type : object
15- default :
16- - name : path
17- default : " "
12+ default : " "
1813 - name : targetDatabases
1914 type : object
2015 default :
@@ -43,69 +38,36 @@ parameters:
4338 default : " "
4439
4540
46- stages :
47- - ${{ if parameters.enableDatabaseBuild }} :
48- - stage : DatabaseBuildAndTest
49- pool :
50- vmImage : ubuntu-latest
51- jobs :
52- - template : t-extend-download-binaries.yml
53- parameters :
54- packages :
55- - name : sqlcl
56- download_location : " $(Build.BinariesDirectory)/sqlcl-latest.zip"
57- unpack_location : " $(Build.BinariesDirectory)"
58- url : " https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip"
59- archive : " zip"
60-
61- - name : utlplsqlcli
62- download_location : " $(Build.BinariesDirectory)/utPLSQL-cli.zip"
63- unpack_location : " $(Build.BinariesDirectory)"
64- url : " https://github.com/utPLSQL/utPLSQL-cli/releases/download/$(UTPLSQL_CLI_VERSION)/utPLSQL-cli.zip"
65- archive : " zip"
66- - job : CreateDatabase
67- displayName : Create Database
68- steps :
69- - checkout : self
70- - ${{ each addpath in parameters.addToPaths }} :
71- - bash : |
72- echo "Setting variable ${{addpath.path}}"
73- echo "##vso[task.prependpath]${{addpath.path}}"
74- ls -ltr ${{addpath.path}}
75- echo $PATH
76-
77- ls -ltr $(Build.BinariesDirectory)
78- displayName: 'Add To path ${{addpath.path}}'
79-
80- - bash : |
81- git clone --depth=1 --branch=${{ parameters.utplsqlVersion }} https://github.com/utPLSQL/utPLSQL.git ${{ parameters.utplsqlDir}}
82- chmod -R go+w ${{ parameters.utplsqlDir}}
83- displayName: 'Download utPLSQL'
41+ steps :
42+ - bash : |
43+ git clone --depth=1 --branch=${{ parameters.utplsqlVersion }} https://github.com/utPLSQL/utPLSQL.git ${{ parameters.utplsqlDir}}
44+ chmod -R go+w ${{ parameters.utplsqlDir}}
45+ displayName : ' Download utPLSQL'
8446
85- - task : Docker@2
86- displayName : Docker Login
87- inputs :
88- containerRegistry : ${{ parameters.containerRegistry }}
89- command : ' login'
90- addPipelineData : false
91- addBaseImageData : false
47+ - task : Docker@2
48+ displayName : Docker Login
49+ inputs :
50+ containerRegistry : ${{ parameters.containerRegistry }}
51+ command : ' login'
52+ addPipelineData : false
53+ addBaseImageData : false
9254
93- - ${{ each trg_db in parameters.targetDatabases }} :
94- - bash : |
95- # download Oracle Database docker image from private repo and start the DB
96- time docker pull ${{ parameters.dockerRepo }}:${{ trg_db.oracleVersion }}
97- # start the docker container (DB)
98- time docker run -d --name ${{ trg_db.oracleVersion }} ${{ trg_db.dockerOptions }} -p 1521:${{ trg_db.dockerPortMap }} ${{ parameters.dockerRepo }}:${{ trg_db.oracleVersion }}
99- # Wait for DB startup
100- time docker logs -f ${{ trg_db.oracleVersion }} | grep -m 1 "DATABASE IS READY TO USE!" --line-buffered
101- displayName: 'Start Oracle DB Docker container: ${{ trg_db.oracleVersion }}'
55+ - ${{ each trg_db in parameters.targetDatabases }} :
56+ - bash : |
57+ # download Oracle Database docker image from private repo and start the DB
58+ time docker pull ${{ parameters.dockerRepo }}:${{ trg_db.oracleVersion }}
59+ # start the docker container (DB)
60+ time docker run -d --name ${{ trg_db.oracleVersion }} ${{ trg_db.dockerOptions }} -p 1521:${{ trg_db.dockerPortMap }} ${{ parameters.dockerRepo }}:${{ trg_db.oracleVersion }}
61+ # Wait for DB startup
62+ time docker logs -f ${{ trg_db.oracleVersion }} | grep -m 1 "DATABASE IS READY TO USE!" --line-buffered
63+ displayName : ' Start Oracle DB Docker container: ${{ trg_db.oracleVersion }}'
10264
103- - ${{ each script in trg_db.scripts }} :
104- - template : t-extend-sqlcl.yml
105- parameters :
106- work_dir : ${{ script.work_dir}}
107- user : ${{ script.user}}
108- password : ${{ script.password}}
109- connectionString : ${{ trg_db.connectionString}}
110- script : ${{ script.script}}
111- displayName : ${{ script.displayName}}
65+ - ${{ each script in trg_db.scripts }} :
66+ - template : t-extend-sqlcl.yml
67+ parameters :
68+ work_dir : ${{ script.work_dir}}
69+ user : ${{ script.user}}
70+ password : ${{ script.password}}
71+ connectionString : ${{ trg_db.connectionString}}
72+ script : ${{ script.script}}
73+ displayName : ${{ script.displayName}}
0 commit comments