From 22d40663a3664b5f5e47d37c9b58a20165737c5c Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Thu, 7 Jan 2021 17:47:42 -0500 Subject: [PATCH] 16916: add packer files for WB2 test image Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- jenkins/packer-images/README | 4 ++ .../jenkins-image-workbench2.json | 37 +++++++++++++++++++ .../packer-images/jenkins-image-workbench2.sh | 18 +++++++++ 3 files changed, 59 insertions(+) create mode 100644 jenkins/packer-images/jenkins-image-workbench2.json create mode 100755 jenkins/packer-images/jenkins-image-workbench2.sh diff --git a/jenkins/packer-images/README b/jenkins/packer-images/README index 70dcc2b..7bb3ecd 100644 --- a/jenkins/packer-images/README +++ b/jenkins/packer-images/README @@ -8,6 +8,10 @@ The files under this directory are used to create images used in our Jenkins CI. packer build jenkins-image-arvados-tests.json +*** IMAGE FOR RUNNING WB2 TESTS *** + +packer build jenkins-image-workbench2.json + *** IMAGE FOR RUNNING FEDERATION TESTS *** packer build jenkins-image-federation-tests.json diff --git a/jenkins/packer-images/jenkins-image-workbench2.json b/jenkins/packer-images/jenkins-image-workbench2.json new file mode 100644 index 0000000..998e8f3 --- /dev/null +++ b/jenkins/packer-images/jenkins-image-workbench2.json @@ -0,0 +1,37 @@ +{ + "variables": { + "key_file": "{{env `packerbuildkey`}}" + }, + "builders": [ + { + "type": "googlecompute", + "account_file": "{{user `key_file` }}", + "project_id": "phoenix-project-42-ci", + "source_image": "debian-10-buster-v20200714", + "zone": "us-central1-b", + "disk_size": "20", + "image_name": "jenkins-image-workbench2-{{isotime \"20060102150405\"}}", + "image_family": "jenkins", + "ssh_username": "jenkins" + } + ], + "provisioners": [ + { + "type": "file", + "source": "node-ready.sh", + "destination": "/tmp/node-ready.sh" + }, + { + "type": "shell", + "script": "./jenkins-image-common.sh" + }, + { + "type": "shell", + "script": "./jenkins-image-with-docker.sh" + }, + { + "type": "shell", + "script": "./jenkins-image-workbench2.sh" + } + ] +} diff --git a/jenkins/packer-images/jenkins-image-workbench2.sh b/jenkins/packer-images/jenkins-image-workbench2.sh new file mode 100755 index 0000000..a345d77 --- /dev/null +++ b/jenkins/packer-images/jenkins-image-workbench2.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + +set -eo pipefail + +# Get the wb2 repository +cd /usr/src +sudo git clone https://git.arvados.org/arvados-workbench2.git + +# Build the workbench2-build docker image +cd arvados-workbench2 +sudo make workbench2-build-image + +cd .. +sudo rm -rf arvados-workbench2 -- 2.30.2