From 991b670d34cf6926d81dc05684d2a6649745a75d Mon Sep 17 00:00:00 2001
From: Kaitlin Farr <kaitlin.farr@jhuapl.edu>
Date: Fri, 27 Oct 2017 12:41:56 -0400
Subject: [PATCH] Migrate to zuulv3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

¯\_(ツ)_/¯

I don't know what I'm doing.

Needed-by: I9dd75e601a59b0c50034b4faffc8bf8d4bc7ad12
Needed-by: Iebc0ca0b89b12e4863cf3ca33389182cba34c67f
Change-Id: I1e91a2c4bb48887da6b61db558a1f04cd8ab37a2
---
 .zuul.yaml                   | 46 ++++++++++++++++++++++++++++++++++++
 playbooks/devstack/post.yaml |  4 ++++
 playbooks/devstack/pre.yaml  | 10 ++++++++
 playbooks/devstack/run.yaml  |  3 +++
 4 files changed, 63 insertions(+)
 create mode 100644 .zuul.yaml
 create mode 100644 playbooks/devstack/post.yaml
 create mode 100644 playbooks/devstack/pre.yaml
 create mode 100644 playbooks/devstack/run.yaml

diff --git a/.zuul.yaml b/.zuul.yaml
new file mode 100644
index 00000000..f5a45a37
--- /dev/null
+++ b/.zuul.yaml
@@ -0,0 +1,46 @@
+- job:
+    name: castellan-functional-devstack
+    parent: devstack
+    description: |
+      Run DevStack-based Castellan functional tests
+    pre-run: playbooks/devstack/pre.yaml
+    run: playbooks/devstack/run.yaml
+    post-run: playbooks/devstack/post.yaml
+    required-projects:
+      - name: openstack/castellan
+      - name: openstack/barbican
+      - name: openstack/python-barbicanclient
+    roles:
+      - zuul: openstack-infra/devstack
+    timeout: 9000
+    vars:
+      devstack_services:
+        # is there a way to disable all services?  I only want barbican
+        ceilometer-acentral: False
+        ceilometer-acompute: False
+        ceilometer-alarm-evaluator: False
+        ceilometer-alarm-notifier: False
+        ceilometer-anotification: False
+        ceilometer-api: False
+        ceilometer-collector: False
+        horizon: False
+        s-account: False
+        s-container: False
+        s-object: False
+        s-proxy: False
+      devstack_plugins:
+        barbican: git://git.openstack.org/openstack/barbican
+      tox_environment:
+        PYTHONUNBUFFERED: 'true'
+      tox_install_siblings: False # I don't know what this means
+      tox_envlist: functional
+      zuul_work_dir: src/git.openstack.org/openstack/castellan
+
+- project:
+    name: openstack/castellan
+    check:
+      jobs:
+        - castellan-functional-devstack
+    gate:
+      jobs:
+        - castellan-functional-devstack
diff --git a/playbooks/devstack/post.yaml b/playbooks/devstack/post.yaml
new file mode 100644
index 00000000..db7ca7d6
--- /dev/null
+++ b/playbooks/devstack/post.yaml
@@ -0,0 +1,4 @@
+- hosts: all
+  roles:
+    - fetch-tox-output
+    - fetch-stestr-output
diff --git a/playbooks/devstack/pre.yaml b/playbooks/devstack/pre.yaml
new file mode 100644
index 00000000..c4324871
--- /dev/null
+++ b/playbooks/devstack/pre.yaml
@@ -0,0 +1,10 @@
+- hosts: all
+  roles:
+    - run-devstack
+    - role: bindep
+      bindep_profile: test
+      bindep_dir: "{{ zuul_work_dir }}"
+    - test-setup
+    - ensure-tox
+    - role: tox-siblings
+      when: tox_install_siblings
diff --git a/playbooks/devstack/run.yaml b/playbooks/devstack/run.yaml
new file mode 100644
index 00000000..22f82096
--- /dev/null
+++ b/playbooks/devstack/run.yaml
@@ -0,0 +1,3 @@
+- hosts: all
+  roles:
+    - tox