Merge "add dcaegen2-platform-ves-openapi-manager & multicloud-framework"
diff --git a/jjb/geode/apache-geode-slave/slave_setup.sh b/jjb/geode/apache-geode-slave/slave_setup.sh
index 3a114b2..7858868 100755
--- a/jjb/geode/apache-geode-slave/slave_setup.sh
+++ b/jjb/geode/apache-geode-slave/slave_setup.sh
@@ -19,7 +19,12 @@
set -o errexit
set -o pipefail
set -o xtrace
+
+# Global variables
DPKG_LOCK="/var/lib/dpkg/lock-frontend"
+DOCKER_VERSION="5:20.10.20~3-0~ubuntu-bionic"
+DOCKER_COMPOSE_URL="https://github.com/docker/compose/releases/download"
+DOCKER_COMPOSE_VERSION="1.29.2"
# Wait for other apt process to finish by checking the dpkg lock file.
try=0
@@ -41,14 +46,16 @@
curl -sSL https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
+curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
+sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
set +e && sudo apt-get purge -y google-cloud-sdk lxc-docker && set -e
sudo apt-get install -y --no-install-recommends \
aptitude \
ca-certificates \
cgroupfs-mount \
- docker-compose \
- docker-ce \
+ docker-ce=${DOCKER_VERSION} \
+ docker-ce-cli=${DOCKER_VERSION} \
git \
google-chrome-stable \
htop \
@@ -63,6 +70,11 @@
unzip \
vim
+# Get correct docker-compose version required for geode-AcceptanceTest
+sudo curl -L "${DOCKER_COMPOSE_URL}/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" \
+ -o /usr/local/bin/docker-compose
+sudo chmod +x /usr/local/bin/docker-compose
+
sudo cp -R /etc/alternatives /etc/keep-alternatives
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
diff --git a/jjb/geode/global-template-apache-geode-test.yaml b/jjb/geode/global-template-apache-geode-test.yaml
index a1167fe..1acaf08 100644
--- a/jjb/geode/global-template-apache-geode-test.yaml
+++ b/jjb/geode/global-template-apache-geode-test.yaml
@@ -66,6 +66,10 @@
name: JAVA_TEST_VERSION
default: '{java-test-version}'
description: 'Java version use during test execution'
+ - string:
+ name: TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX
+ default: 'registry.nordix.org/docker-hub-proxy/'
+ description: 'Docker Hub proxy location for geode test containers required for AcceptanceTest'
scm:
- git-scm-github:
diff --git a/jjb/nsm/e2e.Jenkinsfile b/jjb/nsm/e2e.Jenkinsfile
index 6eed926..8343ec7 100644
--- a/jjb/nsm/e2e.Jenkinsfile
+++ b/jjb/nsm/e2e.Jenkinsfile
@@ -32,29 +32,36 @@
stage('Environment') {
currentBuild.description = "Meridio version: $meridio_version / TAPA version: $tapa_version / NSM version: $nsm_version / IP Family: $ip_family / Kubernetes version: $kubernetes_version / Current Branch: $current_branch"
- ExecSh("make -s -C docs/demo/scripts/kind/ KUBERNETES_VERSION=$kubernetes_version NSM_VERSION=$nsm_version KUBERNETES_IP_FAMILY=$ip_family").call()
- ExecSh("helm install deployments/helm/ --generate-name --create-namespace --namespace red --set trench.name=trench-a --set ipFamily=$ip_family").call()
- ExecSh("helm install deployments/helm/ --generate-name --create-namespace --namespace red --set trench.name=trench-b --set vlan.id=200 --set ipFamily=$ip_family").call()
- ExecSh('helm install examples/target/helm/ --generate-name --create-namespace --namespace red --set applicationName=target-a --set default.trench.name=trench-a').call()
- ExecSh('helm install examples/target/helm/ --generate-name --create-namespace --namespace red --set applicationName=target-b --set default.trench.name=trench-b').call()
- sh 'sleep 10'
- ExecSh('kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=5m').call()
+ try {
+ ExecSh("make -s -C docs/demo/scripts/kind/ KUBERNETES_VERSION=$kubernetes_version NSM_VERSION=$nsm_version KUBERNETES_IP_FAMILY=$ip_family").call()
+ ExecSh("helm install deployments/helm/ --generate-name --create-namespace --namespace red --set trench.name=trench-a --set ipFamily=$ip_family").call()
+ ExecSh("helm install deployments/helm/ --generate-name --create-namespace --namespace red --set trench.name=trench-b --set vlan.id=200 --set ipFamily=$ip_family").call()
+ ExecSh('helm install examples/target/deployments/helm/ --generate-name --create-namespace --namespace red --set applicationName=target-a --set default.trench.name=trench-a').call()
+ ExecSh('helm install examples/target/deployments/helm/ --generate-name --create-namespace --namespace red --set applicationName=target-b --set default.trench.name=trench-b').call()
+ sh 'sleep 10'
+ ExecSh('kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=5m').call()
+ } catch (Exception e) {
+ Error('Error creating the environment').call()
+ }
}
stage('E2E') {
- echo "Meridio version: $meridio_version"
- echo "TAPA version: $tapa_version"
- ExecSh("make e2e E2E_PARAMETERS=\"\$(cat ./test/e2e/environment/kind-helm/$ip_family/config.txt | tr '\\n' ' ')\"").call()
+ try {
+ ExecSh("make e2e E2E_PARAMETERS=\"\$(cat ./test/e2e/environment/kind-helm/$ip_family/config.txt | tr '\\n' ' ')\"").call()
+ } catch (Exception e) {
+ unstable 'E2E Tests failed'
+ currentBuild.result = 'FAILURE'
+ }
}
}
- stage('Cleanup') {
- Cleanup()
- }
stage('Report') {
Report().call()
}
stage('Next') {
Next(next).call()
}
+ stage('Cleanup') {
+ Cleanup()
+ }
}
}
@@ -123,17 +130,25 @@
return {
def jenkins_url = 'jenkins.nordix.org'
- def success = sh(script: """
- data=\$(curl -s -L "http://$jenkins_url/job/meridio-e2e-test-kind/api/json?tree=allBuilds\\[status,timestamp,id,result,description\\]\\{0,999\\}&pretty=true")
- success=\$(echo \"\$data\" | jq -r '.allBuilds[] | select(.result == \"SUCCESS\") | [.description] | @tsv' | grep -v \"^\$\")
- echo \$success
- """, returnStdout: true).trim()
+ def success = ''
+ try {
+ success = sh(script: """
+ data=\$(curl -s -L "http://$jenkins_url/job/meridio-e2e-test-kind/api/json?tree=allBuilds\\[status,timestamp,id,result,description\\]\\{0,999\\}&pretty=true")
+ success=\$(echo \"\$data\" | jq -r '.allBuilds[] | select(.result == \"SUCCESS\") | [.description] | @tsv' | grep -v \"^\$\")
+ echo \$success
+ """, returnStdout: true).trim()
+ } catch (Exception e) {
+ }
- def failure = sh(script: """
- data=\$(curl -s -L "http://$jenkins_url/job/meridio-e2e-test-kind/api/json?tree=allBuilds\\[status,timestamp,id,result,description\\]\\{0,999\\}&pretty=true")
- failure=\$(echo \"\$data\" | jq -r '.allBuilds[] | select(.result == \"FAILURE\") | [.description] | @tsv' | grep -v \"^\$\")
- echo \$failure
- """, returnStdout: true).trim()
+ def failure = ''
+ try {
+ failure = sh(script: """
+ data=\$(curl -s -L "http://$jenkins_url/job/meridio-e2e-test-kind/api/json?tree=allBuilds\\[status,timestamp,id,result,description\\]\\{0,999\\}&pretty=true")
+ failure=\$(echo \"\$data\" | jq -r '.allBuilds[] | select(.result == \"FAILURE\") | [.description] | @tsv' | grep -v \"^\$\")
+ echo \$failure
+ """, returnStdout: true).trim()
+ } catch (Exception e) {
+ }
ReportMeridio(success, failure).call()
ReportTAPA(success, failure).call()
@@ -147,7 +162,7 @@
return {
def meridio_success = sh(script: "echo \"$success\" | grep -oP '(?<=Meridio version: ).*?(?=\\/)' | sort | uniq -c | awk '{ printf \"%s %s 0\\n\", \$2, \$1 }'", returnStdout: true).trim()
def meridio_failure = sh(script: "echo \"$failure\" | grep -oP '(?<=Meridio version: ).*?(?=\\/)' | sort | uniq -c | awk '{ printf \"%s 0 %s\\n\", \$2, \$1 }'", returnStdout: true).trim()
- def meridio = sh(script: "echo \"$meridio_success\\n$meridio_failure\" | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
+ def meridio = sh(script: "echo \"$meridio_success\\n$meridio_failure\" | grep -v '^\$' | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
def formatted = sh(script: "echo \"$meridio\" | awk '{ printf \"%s (✅ %s / ❌ %s)\\n\", \$1, \$2, \$3 }' | sed ':a;N;\$!ba;s/\\n/ | /g'", returnStdout: true).trim()
echo "Meridio: $formatted"
def meridio_badge = addEmbeddableBadgeConfiguration(id: 'meridio-e2e-kind-meridio', subject: 'Meridio', color: '#0B1F67', status: "$formatted")
@@ -158,7 +173,7 @@
return {
def tapa_success = sh(script: "echo \"$success\" | grep -oP '(?<=TAPA version: ).*?(?=\\/)' | sort | uniq -c | awk '{ printf \"%s %s 0\\n\", \$2, \$1 }'", returnStdout: true).trim()
def tapa_failure = sh(script: "echo \"$failure\" | grep -oP '(?<=TAPA version: ).*?(?=\\/)' | sort | uniq -c | awk '{ printf \"%s 0 %s\\n\", \$2, \$1 }'", returnStdout: true).trim()
- def tapa = sh(script: "echo \"$tapa_success\\n$tapa_failure\" | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
+ def tapa = sh(script: "echo \"$tapa_success\\n$tapa_failure\" | grep -v '^\$' | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
def formatted = sh(script: "echo \"$tapa\" | awk '{ printf \"%s (✅ %s / ❌ %s)\\n\", \$1, \$2, \$3 }' | sed ':a;N;\$!ba;s/\\n/ | /g'", returnStdout: true).trim()
echo "TAPA: $formatted"
def tapa_badge = addEmbeddableBadgeConfiguration(id: 'meridio-e2e-kind-tapa', subject: 'TAPA', color: '#0B1F67', status: "$formatted")
@@ -169,7 +184,7 @@
return {
def nsm_success = sh(script: "echo \"$success\" | grep -oP '(?<=NSM version: ).*?(?=\\/)' | sort | uniq -c | awk '{ printf \"%s %s 0\\n\", \$2, \$1 }'", returnStdout: true).trim()
def nsm_failure = sh(script: "echo \"$failure\" | grep -oP '(?<=NSM version: ).*?(?=\\/)' | sort | uniq -c | awk '{ printf \"%s 0 %s\\n\", \$2, \$1 }'", returnStdout: true).trim()
- def nsm = sh(script: "echo \"$nsm_success\\n$nsm_failure\" | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
+ def nsm = sh(script: "echo \"$nsm_success\\n$nsm_failure\" | grep -v '^\$' | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
def formatted = sh(script: "echo \"$nsm\" | awk '{ printf \"%s (✅ %s / ❌ %s)\\n\", \$1, \$2, \$3 }' | sed ':a;N;\$!ba;s/\\n/ | /g'", returnStdout: true).trim()
echo "NSM: $formatted"
def nsm_badge = addEmbeddableBadgeConfiguration(id: 'meridio-e2e-kind-nsm', subject: 'NSM', color: '#0B1F67', status: "$formatted")
@@ -180,7 +195,7 @@
return {
def ip_family_success = sh(script: "echo \"$success\" | grep -oP '(?<=IP Family: ).*?(?=\\/)' | sort | uniq -c | awk '{ printf \"%s %s 0\\n\", \$2, \$1 }'", returnStdout: true).trim()
def ip_family_failure = sh(script: "echo \"$failure\" | grep -oP '(?<=IP Family: ).*?(?=\\/)' | sort | uniq -c | awk '{ printf \"%s 0 %s\\n\", \$2, \$1 }'", returnStdout: true).trim()
- def ip_family = sh(script: "echo \"$ip_family_success\\n$ip_family_failure\" | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
+ def ip_family = sh(script: "echo \"$ip_family_success\\n$ip_family_failure\" | grep -v '^\$' | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
def formatted = sh(script: "echo \"$ip_family\" | awk '{ printf \"%s (✅ %s / ❌ %s)\\n\", \$1, \$2, \$3 }' | sed ':a;N;\$!ba;s/\\n/ | /g'", returnStdout: true).trim()
echo "IP Family: $formatted"
def ip_family_badge = addEmbeddableBadgeConfiguration(id: 'meridio-e2e-kind-ip-family', subject: 'IP Family', color: '#0B1F67', status: "$formatted")
@@ -191,7 +206,7 @@
return {
def kubernetes_success = sh(script: "echo \"$success\" | grep -oP '(?<=Kubernetes version: ).*?(?=\\/)' | sort | uniq -c | awk '{ printf \"%s %s 0\\n\", \$2, \$1 }'", returnStdout: true).trim()
def kubernetes_failure = sh(script: "echo \"$failure\" | grep -oP '(?<=Kubernetes version: ).*?(?=\\/)' | sort | uniq -c | awk '{ printf \"%s 0 %s\\n\", \$2, \$1 }'", returnStdout: true).trim()
- def kubernetes = sh(script: "echo \"$kubernetes_success\\n$kubernetes_failure\" | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
+ def kubernetes = sh(script: "echo \"$kubernetes_success\\n$kubernetes_failure\" | grep -v '^\$' | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
def formatted = sh(script: "echo \"$kubernetes\" | awk '{ printf \"%s (✅ %s / ❌ %s)\\n\", \$1, \$2, \$3 }' | sed ':a;N;\$!ba;s/\\n/ | /g'", returnStdout: true).trim()
echo "Kubernetes: $formatted"
def kubernetes_badge = addEmbeddableBadgeConfiguration(id: 'meridio-e2e-kind-kubernetes', subject: 'Kubernetes', color: '#0B1F67', status: "$formatted")