--- /dev/null
+#!/bin/bash
+
+# This is the script that runs inside Jenkins.
+# http://jenkins.ceph.com/job/ceph-deploy/
+
+set -x
+set -e
+
+HOST=$(hostname --short)
+echo "Building on ${HOST}"
+echo " DIST=${DIST}"
+echo " BPTAG=${BPTAG}"
+echo " WS=$WORKSPACE"
+echo " PWD=$(pwd)"
+echo " BRANCH=$BRANCH"
+echo " SHA1=$GIT_COMMIT"
+
+# FIXME A very naive way to just list the RPM $DIST that we currently support.
+# We should be a bit more lenient to allow any rhel/centos/sles/suse
+rpm_dists="rhel el7 centos7 el8 centos8 centos"
+deb_dists="xenial bionic focal stretch buster"
+
+# A helper to match an item in a list of items, like python's `if item in list`
+listcontains() {
+ for word in $2; do
+ [[ $word = $1 ]] && return 0
+ done
+ return 1
+}
+
+if listcontains $DIST "$rpm_dists"
+then
+ # Tag tree and update version number in change log and
+ # in setup.py before building.
+
+ # this exists in scripts/build_utils.sh
+ get_rpm_dist
+
+ REPO=rpm-repo
+ BUILDAREA=./rpmbuild
+ DIST=el6
+ RPM_BUILD=$(lsb_release -s -c)
+
+ [ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH"
+ chacra_endpoint="ceph-deploy/${chacra_ref}/${GIT_COMMIT}/${DISTRO}/${DISTRO_VERSION}"
+
+ # this exists in scripts/build_utils.sh for ceph-deploy, binaries have
+ # no architecture so we POST them to 'noarch' for rpms
+ check_binary_existence $VENV $chacra_endpoint/noarch
+
+ if [ ! -e setup.py ] ; then
+ echo "Are we in the right directory"
+ exit 1
+ fi
+
+ # Create Tarball
+ if [ "$RELEASE" = 7 ]; then
+ python setup.py sdist --formats=bztar
+ else
+ python3 setup.py sdist --formats=bztar
+ fi
+
+ # Build RPM
+ mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
+ BUILDAREA=`readlink -fn ${BUILDAREA}` ### rpm wants absolute path
+ cp ceph-deploy.spec ${BUILDAREA}/SPECS
+ cp dist/*.tar.bz2 ${BUILDAREA}/SOURCES
+ echo "buildarea is: ${BUILDAREA}"
+ rpmbuild -ba --define "_topdir ${BUILDAREA}" --define "_unpackaged_files_terminate_build 0" ${BUILDAREA}/SPECS/ceph-deploy.spec
+
+ [ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags=""
+
+ find ${BUILDAREA}/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/source
+ find ${BUILDAREA}/RPMS/* | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/noarch
+
+ exit 0
+
+elif listcontains $DIST "$deb_dists"
+then
+
+ # Tag tree and update version number in change log and
+ # in setup.py before building.
+
+ REPO=debian-repo
+ COMPONENT=main
+ DEB_DIST="sid xenial bionic focal stretch buster"
+ DEB_BUILD=$(lsb_release -s -c)
+ #XXX only releases until we fix this
+ RELEASE=1
+ DISTRO=""
+ case $DIST in
+ jessie|buster)
+ DISTRO="debian"
+ ;;
+ *)
+ DISTRO="ubuntu"
+ ;;
+ esac
+
+ [ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH"
+ # ceph-deploy isn't architecture dependant, so we use 'all' as architecture and
+ # uses 'universal' to signal this is not specific to any distro version
+ chacra_endpoint="ceph-deploy/${chacra_ref}/${GIT_COMMIT}/${DISTRO}/universal/all"
+
+ # this exists in scripts/build_utils.sh
+ check_binary_existence $VENV $chacra_endpoint
+
+ if [ ! -d debian ] ; then
+ echo "Are we in the right directory"
+ exit 1
+ fi
+
+ # Apply backport tag if release build
+ if [ $RELEASE -eq 1 ] ; then
+ DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p')
+ BP_VERSION=${DEB_VERSION}${BPTAG}
+ dch -D $DIST --force-distribution -b -v "$BP_VERSION" "$comment"
+ dpkg-source -b .
+ fi
+
+ # Build Package
+ echo "Building for dist: $DEB_BUILD"
+ # we no longer sign the .dsc or .changes files (done by default with
+ # the `-k$KEYID` flag), so explicitly tell the tool not to sign them
+ dpkg-buildpackage -uc -us
+ if [ $? -ne 0 ] ; then
+ echo "Build failed"
+ exit 2
+ fi
+
+ [ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags=""
+
+ # push binaries to chacra
+ # the binaries are created in one directory up from $WORKSPACE
+ find ../ | egrep "*\.(changes|deb|dsc|gz)$" | egrep -v "(Packages|Sources|Contents)" | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}
+
+ echo "Done"
+
+else
+ echo "Can't determine build host type, I suck. Sorry."
+ exit 4
+fi
--- /dev/null
+#!/bin/bash
+
+# This is the script that runs inside Jenkins.
+# http://jenkins.ceph.com/job/ceph-deploy/
+
+set -x
+set -e
+
+# ensure dependencies are installed for RPM hosts, because they are required and
+# we are not building with a contained environment like we do on DEB builds
+
+# TODO: use Mock to build ceph-deploy rpm's and avoid this
+
+if test -f /etc/redhat-release ; then
+ get_rpm_dist
+ if [ "$RELEASE" = 7 ]; then
+ rpm_deps="python-devel python-virtualenv python-mock python-tox pytest"
+ else
+ rpm_deps="python3-devel python3-virtualenv python3-mock python3-tox python3-pytest"
+ fi
+ sudo yum install -y $rpm_deps
+fi
+
+pkgs=( "chacractl>=0.0.21" )
+TEMPVENV=$(create_venv_dir)
+VENV=${TEMPVENV}/bin
+install_python_packages $TEMPVENV "pkgs[@]"
+
+# ask shaman which chacra instance to use
+chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
+# create the .chacractl config file using global variables
+make_chacractl_config $chacra_url
--- /dev/null
+- job:
+ name: ceph-deploy-build
+ node: small && trusty
+ project-type: matrix
+ defaults: global
+ display-name: 'ceph-deploy-build'
+ concurrent: true
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ retry-count: 3
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-deploy.git
+ branches:
+ - $BRANCH
+ browser: auto
+ skip-tag: true
+ timeout: 20
+ wipe-workspace: true
+
+ axes:
+ - axis:
+ type: label-expression
+ name: ARCH
+ values:
+ - x86_64
+ - axis:
+ type: label-expression
+ name: DIST
+ values:
+ - bionic
+ - centos7
+ - centos8
+
+ builders:
+ - shell:
+ !include-raw-verbatim:
+ - ../../../scripts/build_utils.sh
+ - ../../build/setup
+ - ../../build/build
+
+ wrappers:
+ - inject-passwords:
+ global: true
+ mask-password-params: true
+ - credentials-binding:
+ - text:
+ credential-id: chacractl-key
+ variable: CHACRACTL_KEY
+ - text:
+ credential-id: shaman-api-key
+ variable: SHAMAN_API_KEY
--- /dev/null
+#!/bin/bash
+
+set -ex
+
+# the following two methods exist in scripts/build_utils.sh
+pkgs=( "tox" )
+TEMPVENV=$(create_venv_dir)
+VENV=${TEMPVENV}/bin
+install_python_packages $TEMPVENV "pkgs[@]"
+
+# create the docs build with tox
+$VENV/tox -rv -e docs
+
+# publish docs to http://docs.ceph.com/docs/ceph-deploy
+rsync -auv --delete .tox/docs/tmp/html/* /var/ceph-deploy/docs/
--- /dev/null
+- job:
+ name: ceph-deploy-docs
+ node: docs
+ project-type: freestyle
+ defaults: global
+ display-name: 'ceph-deploy: docs build'
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ retry-count: 3
+ properties:
+ - build-discarder:
+ days-to-keep: -1
+ num-to-keep: 10
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: -1
+ - github:
+ url: https://github.com/ceph/ceph-deploy
+
+ triggers:
+ - github
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-deploy
+ branches:
+ - main
+ browser: auto
+ skip-tag: true
+ timeout: 20
+
+ builders:
+ - shell:
+ !include-raw-verbatim:
+ - ../../../scripts/build_utils.sh
+ - ../../build/build
--- /dev/null
+cd $WORKSPACE/ceph-deploy && $VENV/tox -rv
--- /dev/null
+#!/bin/bash
+
+# the following two methods exist in scripts/build_utils.sh
+pkgs=( "ansible" "tox" )
+TEMPVENV=$(create_venv_dir)
+VENV=${TEMPVENV}/bin
+install_python_packages $TEMPVENV "pkgs[@]"
+
+
+# run ansible to get this current host to meet our requirements, specifying
+# a local connection and 'localhost' as the host where to execute
+cd "$WORKSPACE/ceph-build/ceph-deploy-pull-requests/setup/playbooks"
+$VENV/ansible-playbook -i "localhost," -c local setup.yml
--- /dev/null
+# multiple scm requires definition of each scm with `name` so that they can be
+# referenced later in `job`
+# reference: http://docs.openstack.org/infra/jenkins-job-builder/scm.html
+- scm:
+ name: ceph-deploy
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-deploy.git
+ branches:
+ - ${{sha1}}
+ refspec: +refs/pull/*:refs/remotes/origin/pr/*
+ browser: auto
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: false
+ basedir: "ceph-deploy"
+
+- scm:
+ name: ceph-build
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-build.git
+ browser-url: https://github.com/ceph/ceph-build
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: false
+ basedir: "ceph-build"
+
+
+- job:
+ name: ceph-deploy-pull-requests
+ node: python3
+ project-type: freestyle
+ defaults: global
+ concurrent: true
+ display-name: 'ceph-deploy: Pull Requests'
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ retry-count: 3
+ properties:
+ - build-discarder:
+ days-to-keep: 15
+ num-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: -1
+ - github:
+ url: https://github.com/ceph/ceph-deploy/
+
+ parameters:
+ - string:
+ name: sha1
+ description: "A pull request ID, like 'origin/pr/72/head'"
+
+ triggers:
+ - github-pull-request:
+ org-list:
+ - ceph
+ trigger-phrase: ''
+ only-trigger-phrase: false
+ github-hooks: true
+ permit-all: false
+ auto-close-on-fail: false
+
+ scm:
+ - ceph-deploy
+ - ceph-build
+
+ builders:
+ - shell:
+ !include-raw-verbatim:
+ - ../../../scripts/build_utils.sh
+ - ../../build/setup
+ - ../../build/build
--- /dev/null
+---
+
+- hosts: localhost
+ user: jenkins-build
+ become: yes
+
+ tasks:
+ - include: tasks/ubuntu.yml
+ when: ansible_distribution == "Ubuntu"
+
+ # TODO: maybe add RPM or Debian handling?
--- /dev/null
+---
+ - name: "update apt repo"
+ action: apt update_cache=yes
+
+ - name: install python requirements
+ action: apt pkg={{ item }}
+ with_items:
+ - python-software-properties
+ - python-dev
+ - python2.7
+ - python3.5
+
+ - name: install pip
+ action: easy_install name=pip
--- /dev/null
+#!/bin/bash
+
+set -ex
+
+if [ "$TAG" = false ] ; then
+ echo "Assuming tagging process has succeeded before because TAG was set to false"
+ exit 0
+fi
+
+# the following two methods exist in scripts/build_utils.sh
+pkgs=( "ansible" )
+TEMPVENV=$(create_venv_dir)
+VENV=${TEMPVENV}/bin
+install_python_packages $TEMPVENV "pkgs[@]"
+
+# run ansible to do all the tagging and release specifying
+# a local connection and 'localhost' as the host where to execute
+cd "$WORKSPACE/ceph-build/ansible/"
+$VENV/ansible-playbook -i "localhost," -c local release.yml --extra-vars="version=$VERSION branch=$BRANCH release=stable clean=true project=ceph-deploy"
--- /dev/null
+- scm:
+ name: ceph-build
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-build.git
+ browser: auto
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: true
+ basedir: "ceph-build"
+ branches:
+ - origin/main
+
+- job:
+ name: ceph-deploy-tag
+ description: "This job clones ceph-deploy and sets the right version from the tag, pushing back to ceph-deploy.git"
+ display-name: 'ceph-deploy-tag'
+ node: 'trusty&&small'
+ block-downstream: false
+ block-upstream: false
+ properties:
+ - build-discarder:
+ days-to-keep: -1
+ num-to-keep: 25
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: -1
+ - github:
+ url: https://github.com/ceph/ceph-deploy
+
+ parameters:
+ - string:
+ name: BRANCH
+ description: "The git branch (or tag) to build"
+ default: "main"
+ - string:
+ name: VERSION
+ description: "The version for release, e.g. 1.5.30"
+ scm:
+ - ceph-build
+
+ builders:
+ - shell:
+ !include-raw-verbatim:
+ - ../../../scripts/build_utils.sh
+ - ../../build/build
+
+ wrappers:
+ - inject-passwords:
+ global: true
+ mask-password-params: true
+ - ssh-agent-credentials:
+ # "jenkins-build" SSH key, needed so we can push to
+ # ceph-deploy.git
+ user: 'jenkins-build'
--- /dev/null
+- job:
+ name: ceph-deploy
+ project-type: multijob
+ defaults: global
+ display-name: 'ceph-deploy'
+ concurrent: true
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ retry-count: 3
+
+ parameters:
+ - string:
+ name: BRANCH
+ description: "The git branch or tag to build. Defaults to main"
+ default: "main"
+
+ - bool:
+ name: TEST
+ description: "
+If this is unchecked, then the builds will be pushed to chacra with the correct ref. This is the default.
+
+If this is checked, then the builds will be pushed to chacra under the 'test' ref."
+
+ - bool:
+ name: TAG
+ description: "When this is checked, Jenkins will remove the previous tag and recreate it again, changing the control files and committing again. When this is unchecked, Jenkins will not do any commit or tag operations. If you've already created the private tag separately, then leave this unchecked.
+Defaults to checked."
+ default: true
+
+ - bool:
+ name: FORCE
+ description: "
+If this is unchecked, then then nothing is built or pushed if they already exist in chacra. This is the default.
+
+If this is checked, then the binaries will be built and pushed to chacra even if they already exist in chacra."
+
+ - string:
+ name: VERSION
+ description: "The version for release, e.g. 0.94.4"
+
+ builders:
+ - multijob:
+ name: 'ceph-deploy tag phase'
+ condition: SUCCESSFUL
+ projects:
+ - name: ceph-deploy-tag
+ current-parameters: true
+ exposed-scm: false
+
+ - multijob:
+ name: 'ceph-deploy build phase'
+ condition: SUCCESSFUL
+ projects:
+ - name: ceph-deploy-build
+ current-parameters: true
+ exposed-scm: false
+
+ wrappers:
+ - inject-passwords:
+ global: true
+ mask-password-params: true
--- /dev/null
+#!/bin/bash
+
+# the following two methods exist in scripts/build_utils.sh
+pkgs=( "ansible" "tox" )
+TEMPVENV=$(create_venv_dir)
+VENV=${TEMPVENV}/bin
+install_python_packages $TEMPVENV "pkgs[@]"
+
+# run ansible to get this current host to meet our requirements, specifying
+# a local connection and 'localhost' as the host where to execute
+cd "$WORKSPACE/ceph-build/chacra-pull-requests/setup/playbooks"
+
+# make sure any shaman list file is removed. At some point if all nodes
+# are clean this will not be needed.
+sudo rm -f /etc/apt/sources.list.d/shaman*
+
+$VENV/ansible-playbook -i "localhost," -c local setup.yml
+
+cd "$WORKSPACE/chacra"
+$VENV/tox -rv
--- /dev/null
+- scm:
+ name: chacra
+ scm:
+ - git:
+ url: https://github.com/ceph/chacra
+ branches:
+ - ${{sha1}}
+ refspec: +refs/pull/*:refs/remotes/origin/pr/*
+ browser: auto
+ timeout: 20
+ basedir: "chacra"
+ skip-tag: true
+ wipe-workspace: true
+
+- scm:
+ name: ceph-build
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-build.git
+ browser-url: https://github.com/ceph/ceph-build
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: false
+ basedir: "ceph-build"
+ branches:
+ - origin/main
+
+
+- job:
+ name: chacra-pull-requests
+ description: Runs tox tests for chacra on each GitHub PR
+ project-type: freestyle
+ node: trusty && small
+ block-downstream: false
+ block-upstream: false
+ defaults: global
+ display-name: 'chacra: Pull Requests'
+ quiet-period: 5
+ retry-count: 3
+
+
+ properties:
+ - build-discarder:
+ days-to-keep: 15
+ num-to-keep: 30
+ artifact-days-to-keep: 15
+ artifact-num-to-keep: 15
+ - github:
+ url: https://github.com/ceph/chacra/
+
+ parameters:
+ - string:
+ name: sha1
+ description: "A pull request ID, like 'origin/pr/72/head'"
+
+ triggers:
+ - github-pull-request:
+ org-list:
+ - ceph
+ only-trigger-phrase: false
+ github-hooks: true
+ permit-all: false
+ auto-close-on-fail: false
+
+ scm:
+ - chacra
+ - ceph-build
+
+ builders:
+ - shell:
+ !include-raw-verbatim:
+ - ../../../scripts/build_utils.sh
+ - ../../build/build
--- /dev/null
+[ssh_connection]
+pipelining=True
--- /dev/null
+---
+
+- hosts: localhost
+ user: jenkins-build
+ become: True
+
+ tasks:
+ - import_tasks: tasks/postgresql.yml
--- /dev/null
+---
+- name: update apt cache
+ apt:
+ update_cache: yes
+ become: yes
+
+# I don't see why this is important; why can't we
+# just install the latest version
+
+- name: set postgresql version on trusty
+ set_fact:
+ postgresql_version: "9.3"
+ when: ansible_distribution_release == "trusty"
+
+- name: set postgresql version on xenial
+ set_fact:
+ postgresql_version: "9.5"
+ when: ansible_distribution_release == "xenial"
+
+- name: set postgresql version on bionic
+ set_fact:
+ postgresql_version: "10"
+ python_version: "3"
+ when: ansible_distribution_release == "bionic"
+
+- name: set postgresql version on focal
+ set_fact:
+ postgresql_version: "12"
+ python_version: "3"
+ when: ansible_distribution_release == "focal"
+
+- name: set postgresql version on jammy
+ set_fact:
+ postgresql_version: "14"
+ python_version: "3"
+ when: ansible_distribution_release == "jammy"
+
+- name: install postgresql requirements
+ become: yes
+ apt:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - postgresql
+ - postgresql-common
+ - postgresql-contrib
+ - "postgresql-server-dev-{{ postgresql_version }}"
+ - "python{{ python_version|default('') }}-psycopg2"
+ tags:
+ - packages
+
+- name: ensure database service is up
+ service:
+ name: postgresql
+ state: started
+ enabled: yes
+ become: yes
+
+- name: allow users to connect locally
+ become: yes
+ lineinfile:
+ dest: "/etc/postgresql/{{ postgresql_version }}/main/pg_hba.conf"
+ # allow all ipv4 local connections without a password
+ line: 'host all all 0.0.0.0/0 trust'
+ register: pg_hba_conf
+
+# This is the only task that actually cares about the python interpreter so we set it here
+- set_fact:
+ ansible_python_interpreter: "/usr/bin/python3"
+ when:
+ - python_version is defined
+ - python_version == "3"
+
+- name: make jenkins-build user
+ postgresql_user:
+ name: "jenkins-build"
+ password: "secret"
+ role_attr_flags: SUPERUSER
+ login_user: postgres
+ become_user: postgres
+ become: yes
+
+- service:
+ name: postgresql
+ state: restarted
+ become: true
--- /dev/null
+#!/bin/bash
+
+set -e
+set -x
+
+function main() {
+ # install some of our dependencies
+ pushd "$WORKSPACE"
+ git clone gti@github.com:ceph/teuthology
+ pushd "$WORKSPACE/teuthology"
+ git remote -v
+ ./bootstrap
+ curl -XGET -L paddles.front.sepia.ceph.com/nodes | jq '[.[] | select(.description == null or .description == "None") | select(.locked == true)] | group_by(.locked_by) | .[] | {locked_by: .[0].locked_by, name: [ .[].name | tostring] | join(" ")} | select(.locked_by | tostring| test("scheduled")|not)'
+ popd
+ exit $?
+}
+
+main "$@"
--- /dev/null
+- job:
+ name: lab-cop
+ node: small && xenial
+ defaults: global
+ display-name: 'lab-cop'
+ properties:
+ - build-discarder:
+ days-to-keep: 15
+ num-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: -1
+
+ builders:
+ - shell:
+ !include-raw-verbatim:
+ - ../../build/build
+
--- /dev/null
+#!/bin/bash
+
+# the following two methods exist in scripts/build_utils.sh
+pkgs=( "ansible" "tox" )
+install_python_packages $TEMPVENV "pkgs[@]"
+
+# run ansible to get this current host to meet our requirements, specifying
+# a local connection and 'localhost' as the host where to execute
+cd "$WORKSPACE/ceph-build/shaman-pull-requests/setup/playbooks"
+$VENV/ansible-playbook -i "localhost," -c local setup.yml
+
+cd "$WORKSPACE/shaman"
+$VENV/tox -rv
--- /dev/null
+- scm:
+ name: shaman
+ scm:
+ - git:
+ url: https://github.com/ceph/shaman
+ branches:
+ - ${{sha1}}
+ refspec: +refs/pull/*:refs/remotes/origin/pr/*
+ browser: auto
+ timeout: 20
+ basedir: "shaman"
+ skip-tag: true
+ wipe-workspace: true
+
+- scm:
+ name: ceph-build
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-build.git
+ browser-url: https://github.com/ceph/ceph-build
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: false
+ basedir: "ceph-build"
+ branches:
+ - origin/main
+
+
+- job:
+ name: shaman-pull-requests
+ description: Runs tox tests for shaman on each GitHub PR
+ project-type: freestyle
+ node: trusty && small
+ block-downstream: false
+ block-upstream: false
+ defaults: global
+ display-name: 'shaman: Pull Requests'
+ quiet-period: 5
+ retry-count: 3
+
+
+ properties:
+ - build-discarder:
+ days-to-keep: 15
+ num-to-keep: 30
+ artifact-days-to-keep: 15
+ artifact-num-to-keep: 15
+ - github:
+ url: https://github.com/ceph/shaman/
+
+ parameters:
+ - string:
+ name: sha1
+ description: "A pull request ID, like 'origin/pr/72/head'"
+
+ triggers:
+ - github-pull-request:
+ org-list:
+ - ceph
+ only-trigger-phrase: false
+ github-hooks: true
+ permit-all: false
+ auto-close-on-fail: false
+
+ scm:
+ - shaman
+ - ceph-build
+
+ builders:
+ - shell:
+ !include-raw-verbatim:
+ - ../../../scripts/build_utils.sh
+ - ../../build/build
--- /dev/null
+[ssh_connection]
+pipelining=True
--- /dev/null
+---
+
+- hosts: localhost
+ user: jenkins-build
+ sudo: True
+
+ tasks:
+ - import_tasks: tasks/postgresql.yml
--- /dev/null
+---
+- name: update apt cache
+ apt:
+ update_cache: yes
+ become: yes
+
+- name: install postgresql requirements
+ sudo: yes
+ apt:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - postgresql
+ - postgresql-common
+ - postgresql-contrib
+ - postgresql-server-dev-9.5
+ - python-psycopg2
+ tags:
+ - packages
+
+- name: ensure database service is up
+ service:
+ name: postgresql
+ state: started
+ enabled: yes
+ become: yes
+
+- name: "Build pg_hba.conf file"
+ become: true
+ template:
+ src: pg_hba.conf.j2
+ dest: "/etc/postgresql/9.5/main/pg_hba.conf"
+
+- name: make jenkins-build user
+ postgresql_user:
+ name: "jenkins-build"
+ password: "secret"
+ role_attr_flags: SUPERUSER
+ login_user: postgres
+ become_user: postgres
+ become: yes
+
+- service:
+ name: postgresql
+ state: restarted
+ become: yes
--- /dev/null
+# {{ ansible_managed }}
+# Database administrative login by Unix domain socket
+local all postgres peer
+
+# TYPE DATABASE USER ADDRESS METHOD
+
+# "local" is for Unix domain socket connections only
+local all all peer
+# IPv4 local connections:
+host all all 127.0.0.1/0 trust
+# IPv6 local connections:
+host all all ::1/128 trust
+++ /dev/null
-#!/bin/bash
-
-# This is the script that runs inside Jenkins.
-# http://jenkins.ceph.com/job/ceph-deploy/
-
-set -x
-set -e
-
-HOST=$(hostname --short)
-echo "Building on ${HOST}"
-echo " DIST=${DIST}"
-echo " BPTAG=${BPTAG}"
-echo " WS=$WORKSPACE"
-echo " PWD=$(pwd)"
-echo " BRANCH=$BRANCH"
-echo " SHA1=$GIT_COMMIT"
-
-# FIXME A very naive way to just list the RPM $DIST that we currently support.
-# We should be a bit more lenient to allow any rhel/centos/sles/suse
-rpm_dists="rhel el7 centos7 el8 centos8 centos"
-deb_dists="xenial bionic focal stretch buster"
-
-# A helper to match an item in a list of items, like python's `if item in list`
-listcontains() {
- for word in $2; do
- [[ $word = $1 ]] && return 0
- done
- return 1
-}
-
-if listcontains $DIST "$rpm_dists"
-then
- # Tag tree and update version number in change log and
- # in setup.py before building.
-
- # this exists in scripts/build_utils.sh
- get_rpm_dist
-
- REPO=rpm-repo
- BUILDAREA=./rpmbuild
- DIST=el6
- RPM_BUILD=$(lsb_release -s -c)
-
- [ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH"
- chacra_endpoint="ceph-deploy/${chacra_ref}/${GIT_COMMIT}/${DISTRO}/${DISTRO_VERSION}"
-
- # this exists in scripts/build_utils.sh for ceph-deploy, binaries have
- # no architecture so we POST them to 'noarch' for rpms
- check_binary_existence $VENV $chacra_endpoint/noarch
-
- if [ ! -e setup.py ] ; then
- echo "Are we in the right directory"
- exit 1
- fi
-
- # Create Tarball
- if [ "$RELEASE" = 7 ]; then
- python setup.py sdist --formats=bztar
- else
- python3 setup.py sdist --formats=bztar
- fi
-
- # Build RPM
- mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
- BUILDAREA=`readlink -fn ${BUILDAREA}` ### rpm wants absolute path
- cp ceph-deploy.spec ${BUILDAREA}/SPECS
- cp dist/*.tar.bz2 ${BUILDAREA}/SOURCES
- echo "buildarea is: ${BUILDAREA}"
- rpmbuild -ba --define "_topdir ${BUILDAREA}" --define "_unpackaged_files_terminate_build 0" ${BUILDAREA}/SPECS/ceph-deploy.spec
-
- [ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags=""
-
- find ${BUILDAREA}/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/source
- find ${BUILDAREA}/RPMS/* | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/noarch
-
- exit 0
-
-elif listcontains $DIST "$deb_dists"
-then
-
- # Tag tree and update version number in change log and
- # in setup.py before building.
-
- REPO=debian-repo
- COMPONENT=main
- DEB_DIST="sid xenial bionic focal stretch buster"
- DEB_BUILD=$(lsb_release -s -c)
- #XXX only releases until we fix this
- RELEASE=1
- DISTRO=""
- case $DIST in
- jessie|buster)
- DISTRO="debian"
- ;;
- *)
- DISTRO="ubuntu"
- ;;
- esac
-
- [ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH"
- # ceph-deploy isn't architecture dependant, so we use 'all' as architecture and
- # uses 'universal' to signal this is not specific to any distro version
- chacra_endpoint="ceph-deploy/${chacra_ref}/${GIT_COMMIT}/${DISTRO}/universal/all"
-
- # this exists in scripts/build_utils.sh
- check_binary_existence $VENV $chacra_endpoint
-
- if [ ! -d debian ] ; then
- echo "Are we in the right directory"
- exit 1
- fi
-
- # Apply backport tag if release build
- if [ $RELEASE -eq 1 ] ; then
- DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p')
- BP_VERSION=${DEB_VERSION}${BPTAG}
- dch -D $DIST --force-distribution -b -v "$BP_VERSION" "$comment"
- dpkg-source -b .
- fi
-
- # Build Package
- echo "Building for dist: $DEB_BUILD"
- # we no longer sign the .dsc or .changes files (done by default with
- # the `-k$KEYID` flag), so explicitly tell the tool not to sign them
- dpkg-buildpackage -uc -us
- if [ $? -ne 0 ] ; then
- echo "Build failed"
- exit 2
- fi
-
- [ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags=""
-
- # push binaries to chacra
- # the binaries are created in one directory up from $WORKSPACE
- find ../ | egrep "*\.(changes|deb|dsc|gz)$" | egrep -v "(Packages|Sources|Contents)" | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}
-
- echo "Done"
-
-else
- echo "Can't determine build host type, I suck. Sorry."
- exit 4
-fi
+++ /dev/null
-#!/bin/bash
-
-# This is the script that runs inside Jenkins.
-# http://jenkins.ceph.com/job/ceph-deploy/
-
-set -x
-set -e
-
-# ensure dependencies are installed for RPM hosts, because they are required and
-# we are not building with a contained environment like we do on DEB builds
-
-# TODO: use Mock to build ceph-deploy rpm's and avoid this
-
-if test -f /etc/redhat-release ; then
- get_rpm_dist
- if [ "$RELEASE" = 7 ]; then
- rpm_deps="python-devel python-virtualenv python-mock python-tox pytest"
- else
- rpm_deps="python3-devel python3-virtualenv python3-mock python3-tox python3-pytest"
- fi
- sudo yum install -y $rpm_deps
-fi
-
-pkgs=( "chacractl>=0.0.21" )
-TEMPVENV=$(create_venv_dir)
-VENV=${TEMPVENV}/bin
-install_python_packages $TEMPVENV "pkgs[@]"
-
-# ask shaman which chacra instance to use
-chacra_url=`curl -u $SHAMAN_API_USER:$SHAMAN_API_KEY https://shaman.ceph.com/api/nodes/next/`
-# create the .chacractl config file using global variables
-make_chacractl_config $chacra_url
+++ /dev/null
-- job:
- name: ceph-deploy-build
- node: small && trusty
- project-type: matrix
- defaults: global
- display-name: 'ceph-deploy-build'
- concurrent: true
- quiet-period: 5
- block-downstream: false
- block-upstream: false
- retry-count: 3
-
- scm:
- - git:
- url: https://github.com/ceph/ceph-deploy.git
- branches:
- - $BRANCH
- browser: auto
- skip-tag: true
- timeout: 20
- wipe-workspace: true
-
- axes:
- - axis:
- type: label-expression
- name: ARCH
- values:
- - x86_64
- - axis:
- type: label-expression
- name: DIST
- values:
- - bionic
- - centos7
- - centos8
-
- builders:
- - shell:
- !include-raw-verbatim:
- - ../../../scripts/build_utils.sh
- - ../../build/setup
- - ../../build/build
-
- wrappers:
- - inject-passwords:
- global: true
- mask-password-params: true
- - credentials-binding:
- - text:
- credential-id: chacractl-key
- variable: CHACRACTL_KEY
- - text:
- credential-id: shaman-api-key
- variable: SHAMAN_API_KEY
+++ /dev/null
-#!/bin/bash
-
-set -ex
-
-# the following two methods exist in scripts/build_utils.sh
-pkgs=( "tox" )
-TEMPVENV=$(create_venv_dir)
-VENV=${TEMPVENV}/bin
-install_python_packages $TEMPVENV "pkgs[@]"
-
-# create the docs build with tox
-$VENV/tox -rv -e docs
-
-# publish docs to http://docs.ceph.com/docs/ceph-deploy
-rsync -auv --delete .tox/docs/tmp/html/* /var/ceph-deploy/docs/
+++ /dev/null
-- job:
- name: ceph-deploy-docs
- node: docs
- project-type: freestyle
- defaults: global
- display-name: 'ceph-deploy: docs build'
- quiet-period: 5
- block-downstream: false
- block-upstream: false
- retry-count: 3
- properties:
- - build-discarder:
- days-to-keep: -1
- num-to-keep: 10
- artifact-days-to-keep: -1
- artifact-num-to-keep: -1
- - github:
- url: https://github.com/ceph/ceph-deploy
-
- triggers:
- - github
-
- scm:
- - git:
- url: https://github.com/ceph/ceph-deploy
- branches:
- - main
- browser: auto
- skip-tag: true
- timeout: 20
-
- builders:
- - shell:
- !include-raw-verbatim:
- - ../../../scripts/build_utils.sh
- - ../../build/build
+++ /dev/null
-cd $WORKSPACE/ceph-deploy && $VENV/tox -rv
+++ /dev/null
-#!/bin/bash
-
-# the following two methods exist in scripts/build_utils.sh
-pkgs=( "ansible" "tox" )
-TEMPVENV=$(create_venv_dir)
-VENV=${TEMPVENV}/bin
-install_python_packages $TEMPVENV "pkgs[@]"
-
-
-# run ansible to get this current host to meet our requirements, specifying
-# a local connection and 'localhost' as the host where to execute
-cd "$WORKSPACE/ceph-build/ceph-deploy-pull-requests/setup/playbooks"
-$VENV/ansible-playbook -i "localhost," -c local setup.yml
+++ /dev/null
-# multiple scm requires definition of each scm with `name` so that they can be
-# referenced later in `job`
-# reference: http://docs.openstack.org/infra/jenkins-job-builder/scm.html
-- scm:
- name: ceph-deploy
- scm:
- - git:
- url: https://github.com/ceph/ceph-deploy.git
- branches:
- - ${{sha1}}
- refspec: +refs/pull/*:refs/remotes/origin/pr/*
- browser: auto
- timeout: 20
- skip-tag: true
- wipe-workspace: false
- basedir: "ceph-deploy"
-
-- scm:
- name: ceph-build
- scm:
- - git:
- url: https://github.com/ceph/ceph-build.git
- browser-url: https://github.com/ceph/ceph-build
- timeout: 20
- skip-tag: true
- wipe-workspace: false
- basedir: "ceph-build"
-
-
-- job:
- name: ceph-deploy-pull-requests
- node: python3
- project-type: freestyle
- defaults: global
- concurrent: true
- display-name: 'ceph-deploy: Pull Requests'
- quiet-period: 5
- block-downstream: false
- block-upstream: false
- retry-count: 3
- properties:
- - build-discarder:
- days-to-keep: 15
- num-to-keep: 30
- artifact-days-to-keep: -1
- artifact-num-to-keep: -1
- - github:
- url: https://github.com/ceph/ceph-deploy/
-
- parameters:
- - string:
- name: sha1
- description: "A pull request ID, like 'origin/pr/72/head'"
-
- triggers:
- - github-pull-request:
- org-list:
- - ceph
- trigger-phrase: ''
- only-trigger-phrase: false
- github-hooks: true
- permit-all: false
- auto-close-on-fail: false
-
- scm:
- - ceph-deploy
- - ceph-build
-
- builders:
- - shell:
- !include-raw-verbatim:
- - ../../../scripts/build_utils.sh
- - ../../build/setup
- - ../../build/build
+++ /dev/null
----
-
-- hosts: localhost
- user: jenkins-build
- become: yes
-
- tasks:
- - include: tasks/ubuntu.yml
- when: ansible_distribution == "Ubuntu"
-
- # TODO: maybe add RPM or Debian handling?
+++ /dev/null
----
- - name: "update apt repo"
- action: apt update_cache=yes
-
- - name: install python requirements
- action: apt pkg={{ item }}
- with_items:
- - python-software-properties
- - python-dev
- - python2.7
- - python3.5
-
- - name: install pip
- action: easy_install name=pip
+++ /dev/null
-#!/bin/bash
-
-set -ex
-
-if [ "$TAG" = false ] ; then
- echo "Assuming tagging process has succeeded before because TAG was set to false"
- exit 0
-fi
-
-# the following two methods exist in scripts/build_utils.sh
-pkgs=( "ansible" )
-TEMPVENV=$(create_venv_dir)
-VENV=${TEMPVENV}/bin
-install_python_packages $TEMPVENV "pkgs[@]"
-
-# run ansible to do all the tagging and release specifying
-# a local connection and 'localhost' as the host where to execute
-cd "$WORKSPACE/ceph-build/ansible/"
-$VENV/ansible-playbook -i "localhost," -c local release.yml --extra-vars="version=$VERSION branch=$BRANCH release=stable clean=true project=ceph-deploy"
+++ /dev/null
-- scm:
- name: ceph-build
- scm:
- - git:
- url: https://github.com/ceph/ceph-build.git
- browser: auto
- timeout: 20
- skip-tag: true
- wipe-workspace: true
- basedir: "ceph-build"
- branches:
- - origin/main
-
-- job:
- name: ceph-deploy-tag
- description: "This job clones ceph-deploy and sets the right version from the tag, pushing back to ceph-deploy.git"
- display-name: 'ceph-deploy-tag'
- node: 'trusty&&small'
- block-downstream: false
- block-upstream: false
- properties:
- - build-discarder:
- days-to-keep: -1
- num-to-keep: 25
- artifact-days-to-keep: -1
- artifact-num-to-keep: -1
- - github:
- url: https://github.com/ceph/ceph-deploy
-
- parameters:
- - string:
- name: BRANCH
- description: "The git branch (or tag) to build"
- default: "main"
- - string:
- name: VERSION
- description: "The version for release, e.g. 1.5.30"
- scm:
- - ceph-build
-
- builders:
- - shell:
- !include-raw-verbatim:
- - ../../../scripts/build_utils.sh
- - ../../build/build
-
- wrappers:
- - inject-passwords:
- global: true
- mask-password-params: true
- - ssh-agent-credentials:
- # "jenkins-build" SSH key, needed so we can push to
- # ceph-deploy.git
- user: 'jenkins-build'
+++ /dev/null
-- job:
- name: ceph-deploy
- project-type: multijob
- defaults: global
- display-name: 'ceph-deploy'
- concurrent: true
- quiet-period: 5
- block-downstream: false
- block-upstream: false
- retry-count: 3
-
- parameters:
- - string:
- name: BRANCH
- description: "The git branch or tag to build. Defaults to main"
- default: "main"
-
- - bool:
- name: TEST
- description: "
-If this is unchecked, then the builds will be pushed to chacra with the correct ref. This is the default.
-
-If this is checked, then the builds will be pushed to chacra under the 'test' ref."
-
- - bool:
- name: TAG
- description: "When this is checked, Jenkins will remove the previous tag and recreate it again, changing the control files and committing again. When this is unchecked, Jenkins will not do any commit or tag operations. If you've already created the private tag separately, then leave this unchecked.
-Defaults to checked."
- default: true
-
- - bool:
- name: FORCE
- description: "
-If this is unchecked, then then nothing is built or pushed if they already exist in chacra. This is the default.
-
-If this is checked, then the binaries will be built and pushed to chacra even if they already exist in chacra."
-
- - string:
- name: VERSION
- description: "The version for release, e.g. 0.94.4"
-
- builders:
- - multijob:
- name: 'ceph-deploy tag phase'
- condition: SUCCESSFUL
- projects:
- - name: ceph-deploy-tag
- current-parameters: true
- exposed-scm: false
-
- - multijob:
- name: 'ceph-deploy build phase'
- condition: SUCCESSFUL
- projects:
- - name: ceph-deploy-build
- current-parameters: true
- exposed-scm: false
-
- wrappers:
- - inject-passwords:
- global: true
- mask-password-params: true
+++ /dev/null
-#!/bin/bash
-
-# the following two methods exist in scripts/build_utils.sh
-pkgs=( "ansible" "tox" )
-TEMPVENV=$(create_venv_dir)
-VENV=${TEMPVENV}/bin
-install_python_packages $TEMPVENV "pkgs[@]"
-
-# run ansible to get this current host to meet our requirements, specifying
-# a local connection and 'localhost' as the host where to execute
-cd "$WORKSPACE/ceph-build/chacra-pull-requests/setup/playbooks"
-
-# make sure any shaman list file is removed. At some point if all nodes
-# are clean this will not be needed.
-sudo rm -f /etc/apt/sources.list.d/shaman*
-
-$VENV/ansible-playbook -i "localhost," -c local setup.yml
-
-cd "$WORKSPACE/chacra"
-$VENV/tox -rv
+++ /dev/null
-- scm:
- name: chacra
- scm:
- - git:
- url: https://github.com/ceph/chacra
- branches:
- - ${{sha1}}
- refspec: +refs/pull/*:refs/remotes/origin/pr/*
- browser: auto
- timeout: 20
- basedir: "chacra"
- skip-tag: true
- wipe-workspace: true
-
-- scm:
- name: ceph-build
- scm:
- - git:
- url: https://github.com/ceph/ceph-build.git
- browser-url: https://github.com/ceph/ceph-build
- timeout: 20
- skip-tag: true
- wipe-workspace: false
- basedir: "ceph-build"
- branches:
- - origin/main
-
-
-- job:
- name: chacra-pull-requests
- description: Runs tox tests for chacra on each GitHub PR
- project-type: freestyle
- node: trusty && small
- block-downstream: false
- block-upstream: false
- defaults: global
- display-name: 'chacra: Pull Requests'
- quiet-period: 5
- retry-count: 3
-
-
- properties:
- - build-discarder:
- days-to-keep: 15
- num-to-keep: 30
- artifact-days-to-keep: 15
- artifact-num-to-keep: 15
- - github:
- url: https://github.com/ceph/chacra/
-
- parameters:
- - string:
- name: sha1
- description: "A pull request ID, like 'origin/pr/72/head'"
-
- triggers:
- - github-pull-request:
- org-list:
- - ceph
- only-trigger-phrase: false
- github-hooks: true
- permit-all: false
- auto-close-on-fail: false
-
- scm:
- - chacra
- - ceph-build
-
- builders:
- - shell:
- !include-raw-verbatim:
- - ../../../scripts/build_utils.sh
- - ../../build/build
+++ /dev/null
-[ssh_connection]
-pipelining=True
+++ /dev/null
----
-
-- hosts: localhost
- user: jenkins-build
- become: True
-
- tasks:
- - import_tasks: tasks/postgresql.yml
+++ /dev/null
----
-- name: update apt cache
- apt:
- update_cache: yes
- become: yes
-
-# I don't see why this is important; why can't we
-# just install the latest version
-
-- name: set postgresql version on trusty
- set_fact:
- postgresql_version: "9.3"
- when: ansible_distribution_release == "trusty"
-
-- name: set postgresql version on xenial
- set_fact:
- postgresql_version: "9.5"
- when: ansible_distribution_release == "xenial"
-
-- name: set postgresql version on bionic
- set_fact:
- postgresql_version: "10"
- python_version: "3"
- when: ansible_distribution_release == "bionic"
-
-- name: set postgresql version on focal
- set_fact:
- postgresql_version: "12"
- python_version: "3"
- when: ansible_distribution_release == "focal"
-
-- name: set postgresql version on jammy
- set_fact:
- postgresql_version: "14"
- python_version: "3"
- when: ansible_distribution_release == "jammy"
-
-- name: install postgresql requirements
- become: yes
- apt:
- name: "{{ item }}"
- state: present
- with_items:
- - postgresql
- - postgresql-common
- - postgresql-contrib
- - "postgresql-server-dev-{{ postgresql_version }}"
- - "python{{ python_version|default('') }}-psycopg2"
- tags:
- - packages
-
-- name: ensure database service is up
- service:
- name: postgresql
- state: started
- enabled: yes
- become: yes
-
-- name: allow users to connect locally
- become: yes
- lineinfile:
- dest: "/etc/postgresql/{{ postgresql_version }}/main/pg_hba.conf"
- # allow all ipv4 local connections without a password
- line: 'host all all 0.0.0.0/0 trust'
- register: pg_hba_conf
-
-# This is the only task that actually cares about the python interpreter so we set it here
-- set_fact:
- ansible_python_interpreter: "/usr/bin/python3"
- when:
- - python_version is defined
- - python_version == "3"
-
-- name: make jenkins-build user
- postgresql_user:
- name: "jenkins-build"
- password: "secret"
- role_attr_flags: SUPERUSER
- login_user: postgres
- become_user: postgres
- become: yes
-
-- service:
- name: postgresql
- state: restarted
- become: true
+++ /dev/null
-#!/bin/bash
-
-set -e
-set -x
-
-function main() {
- # install some of our dependencies
- pushd "$WORKSPACE"
- git clone gti@github.com:ceph/teuthology
- pushd "$WORKSPACE/teuthology"
- git remote -v
- ./bootstrap
- curl -XGET -L paddles.front.sepia.ceph.com/nodes | jq '[.[] | select(.description == null or .description == "None") | select(.locked == true)] | group_by(.locked_by) | .[] | {locked_by: .[0].locked_by, name: [ .[].name | tostring] | join(" ")} | select(.locked_by | tostring| test("scheduled")|not)'
- popd
- exit $?
-}
-
-main "$@"
+++ /dev/null
-- job:
- name: lab-cop
- node: small && xenial
- defaults: global
- display-name: 'lab-cop'
- properties:
- - build-discarder:
- days-to-keep: 15
- num-to-keep: 30
- artifact-days-to-keep: -1
- artifact-num-to-keep: -1
-
- builders:
- - shell:
- !include-raw-verbatim:
- - ../../build/build
-
+++ /dev/null
-#!/bin/bash
-
-# the following two methods exist in scripts/build_utils.sh
-pkgs=( "ansible" "tox" )
-install_python_packages $TEMPVENV "pkgs[@]"
-
-# run ansible to get this current host to meet our requirements, specifying
-# a local connection and 'localhost' as the host where to execute
-cd "$WORKSPACE/ceph-build/shaman-pull-requests/setup/playbooks"
-$VENV/ansible-playbook -i "localhost," -c local setup.yml
-
-cd "$WORKSPACE/shaman"
-$VENV/tox -rv
+++ /dev/null
-- scm:
- name: shaman
- scm:
- - git:
- url: https://github.com/ceph/shaman
- branches:
- - ${{sha1}}
- refspec: +refs/pull/*:refs/remotes/origin/pr/*
- browser: auto
- timeout: 20
- basedir: "shaman"
- skip-tag: true
- wipe-workspace: true
-
-- scm:
- name: ceph-build
- scm:
- - git:
- url: https://github.com/ceph/ceph-build.git
- browser-url: https://github.com/ceph/ceph-build
- timeout: 20
- skip-tag: true
- wipe-workspace: false
- basedir: "ceph-build"
- branches:
- - origin/main
-
-
-- job:
- name: shaman-pull-requests
- description: Runs tox tests for shaman on each GitHub PR
- project-type: freestyle
- node: trusty && small
- block-downstream: false
- block-upstream: false
- defaults: global
- display-name: 'shaman: Pull Requests'
- quiet-period: 5
- retry-count: 3
-
-
- properties:
- - build-discarder:
- days-to-keep: 15
- num-to-keep: 30
- artifact-days-to-keep: 15
- artifact-num-to-keep: 15
- - github:
- url: https://github.com/ceph/shaman/
-
- parameters:
- - string:
- name: sha1
- description: "A pull request ID, like 'origin/pr/72/head'"
-
- triggers:
- - github-pull-request:
- org-list:
- - ceph
- only-trigger-phrase: false
- github-hooks: true
- permit-all: false
- auto-close-on-fail: false
-
- scm:
- - shaman
- - ceph-build
-
- builders:
- - shell:
- !include-raw-verbatim:
- - ../../../scripts/build_utils.sh
- - ../../build/build
+++ /dev/null
-[ssh_connection]
-pipelining=True
+++ /dev/null
----
-
-- hosts: localhost
- user: jenkins-build
- sudo: True
-
- tasks:
- - import_tasks: tasks/postgresql.yml
+++ /dev/null
----
-- name: update apt cache
- apt:
- update_cache: yes
- become: yes
-
-- name: install postgresql requirements
- sudo: yes
- apt:
- name: "{{ item }}"
- state: present
- with_items:
- - postgresql
- - postgresql-common
- - postgresql-contrib
- - postgresql-server-dev-9.5
- - python-psycopg2
- tags:
- - packages
-
-- name: ensure database service is up
- service:
- name: postgresql
- state: started
- enabled: yes
- become: yes
-
-- name: "Build pg_hba.conf file"
- become: true
- template:
- src: pg_hba.conf.j2
- dest: "/etc/postgresql/9.5/main/pg_hba.conf"
-
-- name: make jenkins-build user
- postgresql_user:
- name: "jenkins-build"
- password: "secret"
- role_attr_flags: SUPERUSER
- login_user: postgres
- become_user: postgres
- become: yes
-
-- service:
- name: postgresql
- state: restarted
- become: yes
+++ /dev/null
-# {{ ansible_managed }}
-# Database administrative login by Unix domain socket
-local all postgres peer
-
-# TYPE DATABASE USER ADDRESS METHOD
-
-# "local" is for Unix domain socket connections only
-local all all peer
-# IPv4 local connections:
-host all all 127.0.0.1/0 trust
-# IPv6 local connections:
-host all all ::1/128 trust