[ARVADOS-DEV] created: 7fdb8f666659cb056942c6804fdb4d3a8911bb6a
Git user
git at public.arvados.org
Wed Jun 30 21:26:52 UTC 2021
at 7fdb8f666659cb056942c6804fdb4d3a8911bb6a (commit)
commit 7fdb8f666659cb056942c6804fdb4d3a8911bb6a
Author: Javier Bértoli <jbertoli at curii.com>
Date: Wed Jun 30 18:25:32 2021 -0300
17844: add a template to build an image to test the Saltstack's arvados-formula
Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli at curii.com>
diff --git a/jenkins/packer-images/README b/jenkins/packer-images/README
index 7bb3ecd..c384dc3 100644
--- a/jenkins/packer-images/README
+++ b/jenkins/packer-images/README
@@ -24,3 +24,7 @@ packer build jenkins-image-with-docker.json
packer build jenkins-image-k8s-tests.json
+*** IMAGE FOR TESTING THE ARVADOS-FORMULA ***
+
+packer build jenkins-image-arvados-formula-tests.json
+
diff --git a/jenkins/packer-images/jenkins-image-arvados-formula-tests.json b/jenkins/packer-images/jenkins-image-arvados-formula-tests.json
new file mode 100644
index 0000000..62194f1
--- /dev/null
+++ b/jenkins/packer-images/jenkins-image-arvados-formula-tests.json
@@ -0,0 +1,33 @@
+{
+ "variables": {
+ "key_file": "{{env `packerbuildkey`}}"
+ },
+ "builders": [
+ {
+ "type": "googlecompute",
+ "account_file": "{{user `key_file` }}",
+ "project_id": "phoenix-project-42-ci",
+ "source_image": "debian-10-buster-v20210420",
+ "zone": "us-central1-b",
+ "disk_size": "20",
+ "image_name": "jenkins-image-arvados-formula-tests-{{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-arvados-formula-tests.sh"
+ }
+ ]
+}
diff --git a/jenkins/packer-images/jenkins-image-arvados-formula-tests.sh b/jenkins/packer-images/jenkins-image-arvados-formula-tests.sh
new file mode 100755
index 0000000..1057d0f
--- /dev/null
+++ b/jenkins/packer-images/jenkins-image-arvados-formula-tests.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+set -eo pipefail
+
+# Install the dependencies for the package building/testing jobs
+sudo su -c "DEBIAN_FRONTEND=noninteractive apt-get install -y docker.io git ruby ruby-dev make gcc g++"
+sudo usermod -a -G docker jenkins
+
+cd /tmp
+wget -c https://git.arvados.org/arvados-formula.git/blob_plain/refs/heads/main:/Gemfile
+wget -c https://git.arvados.org/arvados-formula.git/blob_plain/refs/heads/main:/Gemfile.lock
+sudo su -c "gem install bundler"
+sudo su -c "bundler install"
+sudo su -c "gem install kitchen-docker"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list