--- /dev/null
+- job:
+ name: ceph-orchestrator-rook-e2e
+ project-type: freestyle
+ defaults: global
+ concurrent: true
+ node: huge && jammy && x86_64
+ display-name: 'ceph: Rook Orchestrator E2E'
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ retry-count: 3
+ properties:
+ - build-discarder:
+ days-to-keep: 15
+ num-to-keep: 300
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: -1
+ - github:
+ url: https://github.com/ceph/ceph/
+ - rebuild:
+ auto-rebuild: true
+ - inject:
+ properties-content: |
+ TERM=xterm
+ parameters:
+ - string:
+ name: sha1
+ description: "commit id or a refname, like 'origin/pr/72/head'"
+
+ triggers:
+ - github-pull-request:
+ cancel-builds-on-update: true
+ allow-whitelist-orgs-as-admins: true
+ org-list:
+ - ceph
+ white-list-labels:
+ - orchestrator
+ - rook
+ black-list-target-branches:
+ - luminous
+ - mimic
+ - nautilus
+ trigger-phrase: 'jenkins test rook orchestrator'
+ skip-build-phrase: '^jenkins do not test.*'
+ only-trigger-phrase: false
+ github-hooks: true
+ permit-all: true
+ auto-close-on-fail: false
+ status-context: "ceph rook orchestrator e2e tests"
+ started-status: "running ceph rook orchestrator e2e tests"
+ success-status: "ceph rook orchestrator e2e tests succeeded"
+ failure-status: "ceph rook orchestrator e2e tests failed"
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph.git
+ branches:
+ - origin/pr/${ghprbPullId}/merge
+ refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*
+ browser: auto
+ timeout: 20
+ skip-tag: true
+ shallow-clone: true
+ wipe-workspace: true
+
+ - git:
+ url: https://github.com/ceph/ceph-build.git
+ branches:
+ - main
+ basedir: ceph-build
+
+ builders:
+ - shell:
+ !include-raw:
+ - ../../../scripts/rook-orch/install-rook-e2e-deps.sh
+ - shell: |
+ export COMMIT_INFO_MESSAGE="$ghprbPullTitle"
+ timeout 3600 ./src/pybind/mgr/rook/ci/run-rook-e2e-tests.sh
+ wrappers:
+ - inject-passwords:
+ global: true
+ mask-password-params: true
+ - ansicolor
+
+ publishers:
+
+ - postbuildscript:
+ builders:
+ - role: SLAVE
+ build-on:
+ - SUCCESS
+ - UNSTABLE
+ - FAILURE
+ - ABORTED
+ build-steps:
+ - shell: "${WORKSPACE}/ceph-build/ceph-rook-e2e/build/cleanup"
--- /dev/null
+#!/usr/bin/env bash
+
+set -ex
+
+install_docker(){
+ DISTRO="$(lsb_release -cs)"
+ if [[ $(command -v docker) == '' ]]; then
+ # Set up docker official repo and install docker.
+ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
+ echo \
+ "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
+ ${DISTRO} stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
+ sudo apt update -y
+ sudo apt install -y docker-ce docker-ce-cli containerd.io
+ fi
+ sudo groupadd docker || true
+ sudo usermod -aG docker $(id -un)
+ sudo systemctl start docker
+ sudo chgrp "$(id -un)" /var/run/docker.sock
+
+ docker info
+ docker container prune -f
+}
+
+configure_libvirt(){
+ sudo usermod -aG libvirt $(id -un)
+ sudo su -l $USER # Avoid having to log out and log in for group addition to take effect.
+ sudo systemctl enable --now libvirtd
+ sudo systemctl restart libvirtd
+ sleep 10 # wait some time for libvirtd service to restart
+}
+
+# install dependencies
+sudo apt update -y
+sudo apt install -y qemu-kvm libvirt-daemon-driver-qemu libvirt-clients libvirt-daemon-system runc python3
+sudo apt install -y python3-pip
+pip3 install behave
+configure_libvirt
+install_docker
+
+# install minikube
+curl -LO https://storage.googleapis.com/minikube/releases/v1.31.2/minikube-linux-amd64
+sudo install minikube-linux-amd64 /usr/local/bin/minikube