@@ -42,7 +42,7 @@ resources:
4242 endpoint : datashield-testing
4343 name : datashield/testStatus
4444 ref : master
45-
45+
4646 - repository : datashield-infrastructureRepo
4747 type : github
4848 endpoint : datashield-testing
@@ -123,11 +123,11 @@ jobs:
123123 # Install R and all the dependencies dsBaseClient requires.
124124 # If previous steps have failed then don't run.
125125 - bash : |
126-
126+
127127 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
128128 sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran40/"
129129 sudo apt-get update
130-
130+
131131 sudo apt-get install -qq libxml2-dev libcurl4-openssl-dev libssl-dev libgsl-dev r-base -y
132132 sudo R -q -e "install.packages(c('devtools','metafor','fields','covr'), dependencies=TRUE, repos='https://cloud.r-project.org')"
133133 sudo R -q -e "install.packages(c('DSI','DSOpal','DSLite'), dependencies=TRUE, repos='https://cloud.r-project.org')"
@@ -160,7 +160,7 @@ jobs:
160160 echo "Documentation up to date."
161161 exit 0
162162 fi
163-
163+
164164 workingDirectory: $(Pipeline.Workspace)/dsBaseClient
165165 displayName: 'Check manual updated before being committed'
166166 condition: succeeded()
@@ -172,7 +172,7 @@ jobs:
172172 # If previous steps have failed then don't run.
173173 # If this step fails still mark as failed, but don't stop the rest of the steps running.
174174 - bash : |
175-
175+
176176 R -q -e "library('devtools'); devtools::check(args = c('--no-examples'))" | tee azure-pipelines_check.Rout
177177 grep --quiet "^0 errors" azure-pipelines_check.Rout && grep --quiet " 0 warnings" azure-pipelines_check.Rout && grep --quiet " 0 notes" azure-pipelines_check.Rout
178178
@@ -186,7 +186,7 @@ jobs:
186186 # Install dsBase. This uses the datashield-infrastructure repo (and its dependencies) to do the install with puppet.
187187 # If previous steps have failed then don't run.
188188 - bash : |
189-
189+
190190 # Set up puppet and r10k
191191 wget -nv https://apt.puppetlabs.com/puppet5-release-xenial.deb
192192 sudo dpkg -i puppet5-release-xenial.deb
@@ -196,11 +196,11 @@ jobs:
196196
197197 sudo apt-get install puppet-agent -y
198198 sudo /opt/puppetlabs/puppet/bin/gem install r10k
199-
199+
200200 pushd puppet/environments/datashield_azurepipelines
201201 sudo /opt/puppetlabs/puppet/bin/r10k puppetfile install
202202 popd
203-
203+
204204 sudo /opt/puppetlabs/bin/puppet apply $(Pipeline.Workspace)/dsBaseClient/azure-pipelines_site.pp --environment datashield_azurepipelines --environmentpath puppet/environments
205205
206206 workingDirectory: $(Pipeline.Workspace)/datashield-infrastructure
@@ -216,24 +216,24 @@ jobs:
216216 # TODO: Tidy up variable names - use timestamps here.
217217 # TODO: Why is DSLite needed for this to run?!
218218 - bash : |
219-
219+
220220 # There is an issue with the way we are using packages. The wrapped up test command
221221 # below fails in a way that implies that it is not installed. I cannot figure out
222222 # why this is case. As a work around we can run some of the functions below. My
223223 # best guess is that there is an implicit build or similar that happens. Although
224224 # I cannot replicate that directly with build etc directly.
225-
225+
226226 # None of the below make the tests run
227227 #sudo R -e 'devtools::reload(".")'
228228 #sudo R -e 'library(dsBaseClient)'
229229 #sudo R -e 'devtools::check_built()'
230230 #sudo R --verbose -e 'devtools::build()'
231-
231+
232232 # Any of the below makes the tests work.
233233 #sudo R --verbose -e 'devtools::test()'
234234 #sudo R --verbose -e 'devtools::install()'
235235 sudo R --verbose -e 'devtools::check()'
236-
236+
237237 pwd
238238 mkdir $(Pipeline.Workspace)/logs
239239
@@ -261,26 +261,38 @@ jobs:
261261 ),
262262 "coveragelist.csv"
263263 )'
264-
264+
265265 # display the test console output
266266 cat test_console_output.txt
267267 mv coveragelist.csv $(Pipeline.Workspace)/logs
268268 mv test_results.xml $(Pipeline.Workspace)/logs
269269 mv test_console_output.txt $(Pipeline.Workspace)/logs
270-
270+
271271 grep --quiet "Failed: 0" $(Pipeline.Workspace)/logs/test_console_output.txt
272272
273273 workingDirectory: $(Pipeline.Workspace)/dsBaseClient
274274 displayName: 'Code coverage and JUnit report output'
275275 condition: succeeded()
276276
277277
278+ #####################################################################################
279+ # Install dsDanger.
280+ # If previous steps have failed then don't run
281+ - bash : |
282+
283+ sudo /opt/puppetlabs/bin/puppet apply $(Pipeline.Workspace)/dsBaseClient/azure-pipelines_site-dsdanger.pp --environment datashield_azurepipelines --environmentpath puppet/environments
284+
285+ workingDirectory: $(Pipeline.Workspace)/datashield-infrastructure
286+ displayName: 'Install DataSHIELD package (dsDanger)'
287+ condition: succeeded()
288+
289+
278290 #####################################################################################
279291 # Parse the JUnit file to see if there are any errors/warnings. If there are then
280292 # echo them so finding bugs should be easier.
281293 # This should run even if previous steps have failed.
282294 - bash : |
283-
295+
284296 # Strip out when error and failure = 0 and count the number of times it does not.
285297 issue_count=$(sed 's/failures="0" errors="0"//' test_results.xml | grep --count errors=)
286298 echo "Number of testsuites with issues: "$issue_count
0 commit comments