16916: add packer files for WB2 test image 16916-move-wb2-tests-to-jenkins-satellites
authorWard Vandewege <ward@curii.com>
Thu, 7 Jan 2021 22:47:42 +0000 (17:47 -0500)
committerWard Vandewege <ward@curii.com>
Thu, 7 Jan 2021 22:47:42 +0000 (17:47 -0500)
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

jenkins/packer-images/README
jenkins/packer-images/jenkins-image-workbench2.json [new file with mode: 0644]
jenkins/packer-images/jenkins-image-workbench2.sh [new file with mode: 0755]

index 70dcc2bd3a39574531eef0bb8f726e00233e7ae8..7bb3ecd5649eb8e4bd77efce01037f6e1963f1f4 100644 (file)
@@ -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 (file)
index 0000000..998e8f3
--- /dev/null
@@ -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 (executable)
index 0000000..a345d77
--- /dev/null
@@ -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