]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-pipeline: refact ceph-ansible pipeline 1220/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 17 Dec 2018 15:00:11 +0000 (16:00 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 22 Jan 2019 15:19:58 +0000 (16:19 +0100)
corresponding ceph-ansible pull-request: ceph/ceph-ansible#3364

- reintroduce ubuntu testing
- rename all scenario

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml
ceph-ansible-prs/config/definitions/ceph-ansible-prs.yml
scripts/build_utils.sh

index d09d03023dabe8ecd05d5d274b57cad4544d0788..bda951dcac30606ba8dfb1f318488d9e1f5893c9 100644 (file)
@@ -69,9 +69,9 @@
                 condition: SUCCESSFUL
                 execution-type: PARALLEL
                 projects:
-                  - name: 'ceph-ansible-prs-dev-add_osds'
+                  - name: 'ceph-ansible-prs-dev-centos-non_container-add_osds'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-add_osds_container'
+                  - name: 'ceph-ansible-prs-dev-centos-container-add_osds'
                     current-parameters: true
       - conditional-step:
           condition-kind: shell
                 condition: SUCCESSFUL
                 execution-type: PARALLEL
                 projects:
-                  - name: 'ceph-ansible-prs-dev-purge_cluster_container'
+                  - name: 'ceph-ansible-prs-dev-centos-container-purge'
                     current-parameters: true
       - conditional-step:
           condition-kind: shell
                 condition: SUCCESSFUL
                 execution-type: PARALLEL
                 projects:
-                  - name: 'ceph-ansible-prs-dev-purge_cluster_non_container'
+                  - name: 'ceph-ansible-prs-dev-centos-non_container-purge'
                     current-parameters: true
       - conditional-step:
           condition-kind: shell
                 condition: SUCCESSFUL
                 execution-type: PARALLEL
                 projects:
-                  - name: 'ceph-ansible-prs-dev-update_cluster'
+                  - name: 'ceph-ansible-prs-dev-centos-non_container-update'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-update_docker_cluster'
+                  - name: 'ceph-ansible-prs-dev-centos-container-update'
                     current-parameters: true
       - conditional-step:
           condition-kind: shell
                 condition: SUCCESSFUL
                 execution-type: PARALLEL
                 projects:
-                  - name: 'ceph-ansible-prs-dev-shrink_mon'
+                  - name: 'ceph-ansible-prs-dev-centos-non_container-shrink_mon'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-shrink_mon_container'
+                  - name: 'ceph-ansible-prs-dev-centos-container-shrink_mon'
                     current-parameters: true
       - conditional-step:
           condition-kind: shell
                 condition: SUCCESSFUL
                 execution-type: PARALLEL
                 projects:
-                  - name: 'ceph-ansible-prs-dev-shrink_osd'
+                  - name: 'ceph-ansible-prs-dev-centos-non_container-shrink_osd'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-shrink_osd_container'
+                  - name: 'ceph-ansible-prs-dev-centos-container-shrink_osd'
                     current-parameters: true
       - conditional-step:
           condition-kind: shell
                 condition: SUCCESSFUL
                 execution-type: PARALLEL
                 projects:
-                  - name: 'ceph-ansible-prs-dev-lvm_osds'
+                  - name: 'ceph-ansible-prs-dev-centos-non_container-lvm_osds'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-lvm_osds_container'
+                  - name: 'ceph-ansible-prs-dev-centos-container-lvm_osds'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-bluestore_lvm_osds'
+                  - name: 'ceph-ansible-prs-dev-centos-non_container-bluestore_lvm_osds'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-bluestore_lvm_osds_container'
+                  - name: 'ceph-ansible-prs-dev-centos-container-bluestore_lvm_osds'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-lvm_batch'
+                  - name: 'ceph-ansible-prs-dev-centos-non_container-lvm_batch'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-lvm_batch_container'
+                  - name: 'ceph-ansible-prs-dev-centos-container-lvm_batch'
                     current-parameters: true
                   - name: 'ceph-ansible-prs-dev-lvm_auto_discovery'
                     current-parameters: true
                 condition: SUCCESSFUL
                 execution-type: PARALLEL
                 projects:
-                  - name: 'ceph-ansible-prs-dev-rgw_multisite'
+                  - name: 'ceph-ansible-prs-dev-centos-non_container-rgw_multisite'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-rgw_multisite_container'
+                  - name: 'ceph-ansible-prs-dev-centos-container-rgw_multisite'
                     current-parameters: true
       - conditional-step:
           condition-kind: shell
                 condition: SUCCESSFUL
                 execution-type: PARALLEL
                 projects:
-                  - name: 'ceph-ansible-prs-dev-centos7_cluster'
+                  - name: 'ceph-ansible-prs-dev-centos-non_container-all_daemons'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-docker_cluster'
+                  - name: 'ceph-ansible-prs-dev-centos-container-all_daemons'
                     current-parameters: true
-                  - name: 'ceph-ansible-prs-dev-docker_cluster_collocation'
+                  - name: 'ceph-ansible-prs-dev-centos-container-collocation'
                     current-parameters: true
 #                  - name: 'ceph-ansible-prs-dev-container_podman'
 #                    current-parameters: true
index 25478a5234aacc20eb4e7173c78c2f3da403ac6d..69027c225ba437f587040d33960a8f31d431786d 100644 (file)
@@ -1,3 +1,127 @@
+# new jobs definitions for ceph-ansible scenario refact (see: https://github.com/ceph/ceph-ansible/pull/3364)
+- project:
+    name: ceph-ansible-prs-pipeline-dev
+    slave_labels: 'vagrant && libvirt && smithi'
+    release:
+      - dev
+    distribution:
+      - centos
+      - ubuntu
+    deployment:
+      - container
+      - non_container
+    scenario:
+      - all_daemons
+      - cluster
+      - collocation
+      - update
+      - bluestore_lvm_osds
+      - lvm_osds
+      - shrink_mon
+      - shrink_osd
+      - lvm_batch
+      - add_osds
+      - rgw_multisite
+      - purge
+    jobs:
+        - 'ceph-ansible-prs-pipeline-dev'
+
+- job-template:
+    name: 'ceph-ansible-prs-{release}-{distribution}-{deployment}-{scenario}'
+    id: 'ceph-ansible-prs-pipeline-dev'
+    node: '{slave_labels}'
+    concurrent: true
+    defaults: global
+    display-name: 'ceph-ansible: Pull Requests [{release}-{distribution}-{deployment}-{scenario}]'
+    quiet-period: 5
+    block-downstream: false
+    block-upstream: false
+    retry-count: 3
+    properties:
+      - github:
+          url: https://github.com/ceph/ceph-ansible
+      - build-discarder:
+          days-to-keep: 90
+          num-to-keep: -1
+          artifact-days-to-keep: -1
+          artifact-num-to-keep: -1
+
+    parameters:
+      - string:
+          name: sha1
+          description: "A pull request ID, like 'origin/pr/72/head'"
+
+    triggers:
+      - github-pull-request:
+          cancel-builds-on-update: true
+          allow-whitelist-orgs-as-admins: true
+          org-list:
+            - ceph
+          skip-build-phrase: '^jenkins do not test.*|.*\[skip ci\].*'
+          trigger-phrase: '^jenkins test {release}-{distribution}-{deployment}-{scenario}|jenkins test all.*'
+          only-trigger-phrase: true
+          github-hooks: true
+          permit-all: true
+          auto-close-on-fail: false
+          status-context: "Testing: {release}-{distribution}-{deployment}-{scenario}"
+          started-status: "Running: {release}-{distribution}-{deployment}-{scenario}"
+          success-status: "OK - {release}-{distribution}-{deployment}-{scenario}"
+          failure-status: "FAIL - {release}-{distribution}-{deployment}-{scenario}"
+
+    scm:
+      - git:
+          url: https://github.com/ceph/ceph-ansible.git
+          branches:
+            - ${{sha1}}
+          refspec: +refs/pull/*:refs/remotes/origin/pr/*
+          browser: auto
+          timeout: 20
+          skip-tag: true
+          wipe-workspace: false
+
+    builders:
+      - inject:
+          properties-content: |
+            SCENARIO={scenario}
+            DEPLOYMENT={deployment}
+            DISTRIBUTION={distribution}
+            RELEASE={release}
+      - conditional-step:
+          condition-kind: shell
+          condition-command: |
+            #!/bin/bash
+            # Returns 1 if only .rst and README files were modified
+            echo "Checking if only rst and READMEs were modified"
+            git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -v '\.rst\|README'
+            if [ $? -eq 1 ]; then
+              echo "Only docs were modified.  Skipping the rest of the job."
+              exit 1
+            fi
+          on-evaluation-failure: dont-run
+          steps:
+            - shell:
+                !include-raw-escape:
+                  - ../../../scripts/build_utils.sh
+                  - ../../build/build
+
+    publishers:
+      - postbuildscript:
+          builders:
+            - role: SLAVE
+              build-on:
+                  - FAILURE
+                  - ABORTED
+              build-steps:
+                - shell:
+                    !include-raw-escape:
+                      - ../../../scripts/build_utils.sh
+                      - ../../build/teardown
+
+      - archive:
+          artifacts: 'logs/**'
+          allow-empty: true
+          latest-only: false
+
 ## tests that will auto start for every PR created and run on smithi or ovh
 ##
 ## NOTE: When adding a new scenario to this project you must also add it to
index c25d7d07c3a79b0b26147e4c10f3be6a61fee43a..04977905b4ae97baebafe6f9809b3d3f7fcb006b 100644 (file)
@@ -740,8 +740,18 @@ if [ -n "$release" ]; then
 else
   TOX_RUN_ENV=("CEPH_STABLE_RELEASE=$RELEASE" "${TOX_RUN_ENV[@]}")
 fi
+
+function build_job_name() {
+  local job_name=$1
+  shift
+  for item in "$@"; do
+    job_name="${job_name}-${item}"
+  done
+  echo "${job_name}"
+}
+
 # shellcheck disable=SC2116
-if ! eval "$(echo "${TOX_RUN_ENV[@]}")" "$VENV"/tox -rv -e="$RELEASE"-"$SCENARIO" --workdir="$WORKDIR" -- --provider=libvirt; then echo "ERROR: Job didn't complete successfully or got stuck for more than 3h."
+if ! eval "$(echo "${TOX_RUN_ENV[@]}")" "$VENV"/tox -rv -e="$(build_job_name $RELEASE $DISTRIBUTION $DEPLOYMENT $SCENARIO)" -- --provider=libvirt; then echo "ERROR: Job didn't complete successfully or got stuck for more than 3h."
   exit 1
 fi
 }