cloud-infra: Add basic verify jobs
This change adds a multijob that gets triggered due to changes
coming to any of the projects listed below on Gerrit.
- infra/engine
- infra/swconfig
When the job gets triggered, it will trigger 2 multijob phases
- deploy: deployment of the stack using VMs will be done
- test: healthcheck of the deployed stack is done
If the main job or any of the phase jobs fail, the result will
be posted to Gerrit as Verified-1, blocking the change from
being merged to master.
It is expected that these jobs to evolve over time so they are
created only in order to have some basic verification in place.
The reason to choose multijob job type is that when a new patch
is published for an existing change, multijob aborts the build
that is running for the previous patch and starts a new build for
the new patch so this helps keeping things clean and tidy.
Change-Id: I21375ef2254e8b47ab2b5268366469f3d100fa99
Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
diff --git a/jjb/cloud-infra/cloud-infra-deploy.sh b/jjb/cloud-infra/cloud-infra-deploy.sh
new file mode 100644
index 0000000..a73f3f6
--- /dev/null
+++ b/jjb/cloud-infra/cloud-infra-deploy.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+set -o errexit
+set -o nounset
+set -o pipefail
+
+# This script is a wrapper around actual cloud infra engine deploy.sh script which gets
+# executed when the job that uses this script gets triggered due to Gerrit change.
+#
+# Logic in this script should be kept at minimum and the changes should be pushed into
+# the cloud infra engine deploy.sh script.
+
+# The verify job will verify changes coming to other repositories as well such as
+# infra/swconfig so it needs to be handled here in order to ensure $WORKSPACE contains
+# the actual engine repo clone. This will be added later on.
+
+# execute cloud engine deploy.sh script
+cd $WORKSPACE
+./engine/deploy.sh
+
+# vim: set ts=2 sw=2 expandtab: