From 17971ddbb7b1b6210539b724ba440d57afcfc3ff Mon Sep 17 00:00:00 2001
From: Sviatoslav Nekhaienko <SNekhaienko@slb.com>
Date: Tue, 25 Feb 2020 12:59:21 +0000
Subject: [PATCH] Update gke-indexer-cicd.yml for Azure Pipelines

---
 gke-indexer-cicd.yml | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gke-indexer-cicd.yml b/gke-indexer-cicd.yml
index ca50effe7..3ef289ff9 100644
--- a/gke-indexer-cicd.yml
+++ b/gke-indexer-cicd.yml
@@ -25,6 +25,8 @@ variables:
   coreModule: indexer-core
   gcpModule: indexer-gcp
 
+  integrationTestCorePom: testing/indexer-test-core/pom.xml
+  integrationTestGcpPom: testing/indexer-test-gcp/pom.xml
 steps:
 
   - task: DownloadSecureFile@1
@@ -74,4 +76,37 @@ steps:
       kubectl --kubeconfig $(kuberConfig.secureFilePath) apply -f $(deploymentFile)
       popd
 
+      attempt_counter=0
+      max_attempts=60
+      until [[ $(curl --head --write-out %{http_code} $(INDEXER_READINESS_URL) --silent -o /dev/null --fail) -eq 200 ]]; do
+      if [ ${attempt_counter} -eq ${max_attempts} ];then
+          echo "Service is not available, integraton tests are skipped"
+          exit 1
+      fi
 
+      printf '.'
+      attempt_counter=$(($attempt_counter+1))
+      sleep 2
+      done
+
+  - task: Maven@3
+    inputs:
+      mavenPomFile: '$(integrationTestCorePom)'
+      options: '--settings $(mavenSettings) -DVSTS_FEED_TOKEN=$(VSTS_FEED_TOKEN) install'
+      publishJUnitResults: false
+      javaHomeOption: 'JDKVersion'
+      mavenVersionOption: 'Default'
+      mavenAuthenticateFeed: false
+      effectivePomSkip: false
+      sonarQubeRunAnalysis: false
+
+  - task: Maven@3
+    inputs:
+      mavenPomFile: '$(integrationTestGcpPom)'
+      options: '--settings $(mavenSettings) -Dsurefire.useFile=false -DVSTS_FEED_TOKEN=$(VSTS_FEED_TOKEN) compile'
+      publishJUnitResults: false
+      javaHomeOption: 'JDKVersion'
+      mavenVersionOption: 'Default'
+      mavenAuthenticateFeed: false
+      effectivePomSkip: false
+      sonarQubeRunAnalysis: false
-- 
GitLab