summaryrefslogtreecommitdiffstats
path: root/jjb/armband/armband-deploy.sh
AgeCommit message (Collapse)AuthorFilesLines
2017-07-18Revert "armband-deploy.sh: Inherit env vars for sudo"Alexandru Avadanii1-1/+1
Using sudo triggers a chain of dependencies in our infrastructure, ranging from issues cleaning up the Jenkins workspace to deploy-time permission issues. As it turns out, cleaning all looses ends after that change is not a trivial task, and the remaining work outweights the benefits of using sudo in the first place. The original motivation for using sudo was a superposition of: - hardcoded check for running as root in Fuel's ci/deploy.sh; - the ability to install packages on the hosts via apt-get/yum; - the ability to spawn VMs using virt-manager; All of the above can be mitigated by imposing a series of restrictions for the Jenkins slave / jump server workstation and the jenkins user: - check for sudo rights instead of running as root user; - explicitly use sudo for package installation and/or system-level changes; - add jenkins user to "kvm" and "libvirtd" groups; So, revert using sudo when calling the deploy script, and limit sudo actions to package installation in Armband's deploy script. To compensate running as a regular user, a series of small changes is required in Armband project itself, together with the appropiate Jenkins slave user configuration on the machines running this script. This reverts commit 67d8bac7b2a97531ad465f275747b3dc455d4fe4. Change-Id: I88df6db1a43b93b7314ceca53d353f9000f15153 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-07-17armband-deploy.sh: Inherit env vars for sudoAlexandru Avadanii1-1/+1
Previous commit adding sudo for ci/deploy.sh call breaks Armband deploys, since ci/deploy.sh relies on $WORKSPACE env var being set. Change-Id: I948c8e3c00b430e0c186c0a727e1b7e027d7a089 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-07-17armband-deploy.sh: sudo ci/deploy.shAlexandru Avadanii1-1/+1
New MCP deploy scripts have a hard requirement on running as root. Bring back sudo for the `ci/deploy.sh` invocation, aligning with Fuel@OPNFV. NOTE: This can be later avoided/reverted if we can guarantee the "jenkins" user has sudo rights, even without a tty present. Change-Id: Ibec7b14e9174a7f482609890e5e68912931a8d05 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-07-11armband: Disable ISO actions for MCPAlexandru Avadanii1-7/+9
Sync with changes for Fuel@OPNFV targeting master branch (MCP): - disable ISO build for master branch; - turn off upload action & checkout; - add retrieving OS credentials for MCP; - disable ISO download for master branch; Change-Id: I11eacfad7ee1f738119e17c2e63c3d92707f8e1f Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-04-26Rename arm-pod3-2 to arm-pod4Cristina Pauna1-2/+2
Arm-pod3-2 is a second jenkins slave for arm-pod3. This slave is arm while the old jenkins slave is x86. Fatih requested for this slave to be renamed to arm-pod4 instead of arm-pod3-2, even if it's a slave for an existing pod JIRA: ARMBAND-252 Change-Id: I5645edd7d774f763e5e72115851c7061bfafd344 Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
2017-03-16Add jobs to use the aarch64 jenkins slaveCristina Pauna1-0/+8
arm-pod3-2 is an aarch64 jenkins slave for the same POD as the existing x86 jenkins slave arm-pod3. This commit adds jobs so we can deploy the POD and run functest from the aarch64 jenkins slave. These jobs are non-ci JIRA: ARMBAND-241 Change-Id: Ie3b808a641e44649c02f3b75c83d79119217fdfe Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
2017-02-04armband: Fix log collection by not setting errexitAlexandru Avadanii1-1/+0
Fuel and Armband deploy scripts trap internal errors and call exit in the trap handler, so the releng wrapper exists before collecting all deploy logs when shell option "errexit" is set. JIRA: ARMBAND-217 Change-Id: Icb1e3277c3e137abb3225a2b9a0b4269eaf08fc6 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-02-01merge GIT_BRANCH and GERRIT_BRANCH into BRANCHRyota MIBU1-3/+3
GIT_BRANCH parameter is different; master or stable/danube in daily jobs, but 'refs/changes/57/27657/6' in verify jobs. This breaks some job builders triggered by the both types of jobs. We have GERRIT_BRANCH parameter for verify jobs to identify stream and expected branch into the patch will be merged after it got +2 and submitted. To avoid further confusion and to have common job builders for daily and verify jobs, this patch introduce BRANCH parameter. GERRIT_BRANCH is now deprecated. Change-Id: Ibcd42c1cd8a0be0f330878b21d3011f1ec97043b Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
2016-11-30armband: Enable deploy-cacheAlexandru Avadanii1-1/+14
This enables the mechanism added in [1]. Armband just added support for caching deploy artifacts, like bootstraps and target images, which take a lot of time at each deploy to be built, considering it requires a cross-debootstrap via qemu-user-static and binfmt. For easier setup, the deploy cache depends on the local ISO storage mechanism (/iso_mount/opnfv_ci), and reuses the same storage pool. To enable deploy caching, just create the deploy-cache directory at: /iso_mount/opnfv_ci/<branch>/deploy-cache JIRA: ARMBAND-172 [1] https://gerrit.opnfv.org/gerrit/#/c/25191 Change-Id: I161205a87f13cd78e79b96bfc37a5f68aba093cc Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-11-27Add jobs for ARM virtual PODcristinapauna1-0/+4
Pod virtual1 was added in the ENEA-ARM lab This commit adds the jobs for it JIRA: ARMBAND-162 Change-Id: Icaa798691f5ff60a58ae083eb1c366170c464b92 Signed-off-by: cristinapauna <cristina.pauna@enea.com>
2016-10-14Armband: Move lab-config to OPNFV securedlabAlexandru Avadanii1-1/+1
This depends on: - jenkins-enea ssh access to OPNFV gerrit; - master and stable/colorado securedlab definitions for arm-pod* [1]; [1] https://gerrit.opnfv.org/gerrit/#/c/23159/ JIRA: ARMBAND-149 Change-Id: Ic9a2e232027636694ffd441fe5203cb06975f137 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-10-12fuel, armband: build, deploy: export TERM="vt220"Alexandru Avadanii1-0/+2
Since we do not actually parse our build/deploy logs for color chars, set the terminal to "vt220". This will silence quite a few of colorization special identifiers, but NOT all of them (e.g. `tput sgr0` still prints a sequence). For Fuel@OPNFV build process, we also need to workaround docker terminal settings not being passed down when using a tty (see [1]), which will be fixed in Docker 1.13+. This fix is handled in [2]. [1] https://github.com/docker/docker/issues/9299 [2] https://gerrit.opnfv.org/gerrit/#/c/22883/ Change-Id: I5f0c6eae33349ef81b67dd17e6df4e0af6274fab Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-09-09armband: deploy: upload logs to GSAlexandru Avadanii1-2/+23
Closes-bug: ARMBAND-72 Change-Id: I6c5a3e6ce4c320bf42f02b290a0137f5b892ad7f Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-09-05armband: Fix file handler in lab-config test -eAlexandru Avadanii1-1/+1
Previous change adding lab-config/.../local_env support introduced an issue, in the form of `test -e file:///path/to/local_env`, which is not supported. Change-Id: I1566b41765329f18523cfc506c9112b6694a8317 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-09-01armband: Fix default params for labeled podsAlexandru Avadanii1-0/+7
After previous change introducing the usage of node labels for Armband CI deploy jobs, we discovered that the old params were not applied to labeled pods. To complicate things, we had different DEFAULT_BRIDGE params for each CI pod, which contradicts the Jenkins templating paradigm. Since we already have a mechanism in place for overriding env vars based on the POD we are running against, move both <DEPLOY_TIMEOUT> and <DEFAULT_BRIDGE> params to our local_env, which is sourced by the deploy script and can apply POD specific configuration. Add missing LAB_CONFIG_URL to newly added baremetal and virtual defaults for Armband. While at it, also replace "brahmaputra" comments with "colorado". v2 -> v3: Source local_env before using DEFAULT_BRIDGE in <armband-deploy.sh>. Previously, we (Armband) sourced this file in our <ci/deploy.sh> [1], which will be dropped after this change is merged. [1] https://git.opnfv.org/cgit/armband/tree/ci/deploy.sh#n24 Change-Id: Ibafea25b3df8c3118ce05e3f40934c8e8b9c8dcd Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2016-06-08armband: updated lab-config URLJosep Puigdemont1-4/+4
Change-Id: I317321bbaf1e74419b9508c6da3039b95d9d399d Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-05-17download/deploy scripts: several updatesJosep Puigdemont1-6/+6
The download script will now use gsutils if they are available, or fall back to curl as before. In general, use curl -f, which will exit with an error code if the server gave an error, instead of writing a file with the HTML error page. Change-Id: Ib24e7803ec38b20a8879cd1509a0cb7b512fee61 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-05-11armband-deploy.sh: temporarily export missing environment variablesJosep Puigdemont1-0/+3
Change-Id: I76b0aadb735eefc13bfe9364b7426d0a28aa9b96 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-05-11armband-deploy.sh: allow running on arm labJosep Puigdemont1-1/+1
Change-Id: I5b261885585fd9e902b3a7513a6d07881e849976 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
2016-05-10armband: add ci jobsJosep Puigdemont1-0/+79
Change-Id: I6918dc1189ab18fa79812ffa7c5e67867a945eba Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>