From: David Galloway Date: Wed, 27 May 2026 17:08:43 +0000 (-0400) Subject: Clean up retired jobs X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=464b3663686f898be2ae850ca3b939bd1f462d77;p=ceph-build.git Clean up retired jobs We're retiring chacra eventually shaman-pull-requests hasn't passed in 7 years ceph-deploy is long dead What even is lab-cop Signed-off-by: David Galloway --- diff --git a/attic/ceph-deploy-build/build/build b/attic/ceph-deploy-build/build/build new file mode 100644 index 000000000..5edbae202 --- /dev/null +++ b/attic/ceph-deploy-build/build/build @@ -0,0 +1,142 @@ +#!/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 diff --git a/attic/ceph-deploy-build/build/setup b/attic/ceph-deploy-build/build/setup new file mode 100644 index 000000000..0d1a8bc05 --- /dev/null +++ b/attic/ceph-deploy-build/build/setup @@ -0,0 +1,32 @@ +#!/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 diff --git a/attic/ceph-deploy-build/config/definitions/ceph-deploy-build.yml b/attic/ceph-deploy-build/config/definitions/ceph-deploy-build.yml new file mode 100644 index 000000000..67c263b5d --- /dev/null +++ b/attic/ceph-deploy-build/config/definitions/ceph-deploy-build.yml @@ -0,0 +1,54 @@ +- 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 diff --git a/attic/ceph-deploy-docs/build/build b/attic/ceph-deploy-docs/build/build new file mode 100644 index 000000000..9b4c18a77 --- /dev/null +++ b/attic/ceph-deploy-docs/build/build @@ -0,0 +1,15 @@ +#!/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/ diff --git a/attic/ceph-deploy-docs/config/definitions/ceph-deploy-docs.yml b/attic/ceph-deploy-docs/config/definitions/ceph-deploy-docs.yml new file mode 100644 index 000000000..2f01a73b7 --- /dev/null +++ b/attic/ceph-deploy-docs/config/definitions/ceph-deploy-docs.yml @@ -0,0 +1,36 @@ +- 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 diff --git a/attic/ceph-deploy-pull-requests/build/build b/attic/ceph-deploy-pull-requests/build/build new file mode 100644 index 000000000..91088a944 --- /dev/null +++ b/attic/ceph-deploy-pull-requests/build/build @@ -0,0 +1 @@ +cd $WORKSPACE/ceph-deploy && $VENV/tox -rv diff --git a/attic/ceph-deploy-pull-requests/build/setup b/attic/ceph-deploy-pull-requests/build/setup new file mode 100644 index 000000000..a2f37ff2d --- /dev/null +++ b/attic/ceph-deploy-pull-requests/build/setup @@ -0,0 +1,13 @@ +#!/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 diff --git a/attic/ceph-deploy-pull-requests/config/definitions/ceph-deploy-pull-requests.yml b/attic/ceph-deploy-pull-requests/config/definitions/ceph-deploy-pull-requests.yml new file mode 100644 index 000000000..4662b8cb9 --- /dev/null +++ b/attic/ceph-deploy-pull-requests/config/definitions/ceph-deploy-pull-requests.yml @@ -0,0 +1,74 @@ +# 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 diff --git a/attic/ceph-deploy-pull-requests/setup/playbooks/setup.yml b/attic/ceph-deploy-pull-requests/setup/playbooks/setup.yml new file mode 100644 index 000000000..9a8a11d84 --- /dev/null +++ b/attic/ceph-deploy-pull-requests/setup/playbooks/setup.yml @@ -0,0 +1,11 @@ +--- + +- hosts: localhost + user: jenkins-build + become: yes + + tasks: + - include: tasks/ubuntu.yml + when: ansible_distribution == "Ubuntu" + + # TODO: maybe add RPM or Debian handling? diff --git a/attic/ceph-deploy-pull-requests/setup/playbooks/tasks/ubuntu.yml b/attic/ceph-deploy-pull-requests/setup/playbooks/tasks/ubuntu.yml new file mode 100644 index 000000000..359bc9c4c --- /dev/null +++ b/attic/ceph-deploy-pull-requests/setup/playbooks/tasks/ubuntu.yml @@ -0,0 +1,14 @@ +--- + - 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 diff --git a/attic/ceph-deploy-tag/build/build b/attic/ceph-deploy-tag/build/build new file mode 100644 index 000000000..bd040cd2e --- /dev/null +++ b/attic/ceph-deploy-tag/build/build @@ -0,0 +1,19 @@ +#!/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" diff --git a/attic/ceph-deploy-tag/config/definitions/ceph-tag.yml b/attic/ceph-deploy-tag/config/definitions/ceph-tag.yml new file mode 100644 index 000000000..fe7bea1d1 --- /dev/null +++ b/attic/ceph-deploy-tag/config/definitions/ceph-tag.yml @@ -0,0 +1,54 @@ +- 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' diff --git a/attic/ceph-deploy/config/definitions/ceph-deploy.yml b/attic/ceph-deploy/config/definitions/ceph-deploy.yml new file mode 100644 index 000000000..019901d6a --- /dev/null +++ b/attic/ceph-deploy/config/definitions/ceph-deploy.yml @@ -0,0 +1,62 @@ +- 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 diff --git a/attic/chacra-pull-requests/build/build b/attic/chacra-pull-requests/build/build new file mode 100644 index 000000000..38033107f --- /dev/null +++ b/attic/chacra-pull-requests/build/build @@ -0,0 +1,20 @@ +#!/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 diff --git a/attic/chacra-pull-requests/config/definitions/chacra-pull-requests.yml b/attic/chacra-pull-requests/config/definitions/chacra-pull-requests.yml new file mode 100644 index 000000000..b68e92e14 --- /dev/null +++ b/attic/chacra-pull-requests/config/definitions/chacra-pull-requests.yml @@ -0,0 +1,73 @@ +- 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 diff --git a/attic/chacra-pull-requests/setup/playbooks/ansible.cfg b/attic/chacra-pull-requests/setup/playbooks/ansible.cfg new file mode 100644 index 000000000..4b5ea57c9 --- /dev/null +++ b/attic/chacra-pull-requests/setup/playbooks/ansible.cfg @@ -0,0 +1,2 @@ +[ssh_connection] +pipelining=True diff --git a/attic/chacra-pull-requests/setup/playbooks/setup.yml b/attic/chacra-pull-requests/setup/playbooks/setup.yml new file mode 100644 index 000000000..8ed3d5880 --- /dev/null +++ b/attic/chacra-pull-requests/setup/playbooks/setup.yml @@ -0,0 +1,8 @@ +--- + +- hosts: localhost + user: jenkins-build + become: True + + tasks: + - import_tasks: tasks/postgresql.yml diff --git a/attic/chacra-pull-requests/setup/playbooks/tasks/postgresql.yml b/attic/chacra-pull-requests/setup/playbooks/tasks/postgresql.yml new file mode 100644 index 000000000..1da701387 --- /dev/null +++ b/attic/chacra-pull-requests/setup/playbooks/tasks/postgresql.yml @@ -0,0 +1,86 @@ +--- +- 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 diff --git a/attic/lab-cop/build/build b/attic/lab-cop/build/build new file mode 100755 index 000000000..52d139048 --- /dev/null +++ b/attic/lab-cop/build/build @@ -0,0 +1,18 @@ +#!/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 "$@" diff --git a/attic/lab-cop/config/definitions/lab-cop.yml b/attic/lab-cop/config/definitions/lab-cop.yml new file mode 100644 index 000000000..58e12490e --- /dev/null +++ b/attic/lab-cop/config/definitions/lab-cop.yml @@ -0,0 +1,17 @@ +- 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 + diff --git a/attic/shaman-pull-requests/build/build b/attic/shaman-pull-requests/build/build new file mode 100644 index 000000000..85f1137d8 --- /dev/null +++ b/attic/shaman-pull-requests/build/build @@ -0,0 +1,13 @@ +#!/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 diff --git a/attic/shaman-pull-requests/config/definitions/shaman-pull-requests.yml b/attic/shaman-pull-requests/config/definitions/shaman-pull-requests.yml new file mode 100644 index 000000000..eefb10494 --- /dev/null +++ b/attic/shaman-pull-requests/config/definitions/shaman-pull-requests.yml @@ -0,0 +1,73 @@ +- 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 diff --git a/attic/shaman-pull-requests/setup/playbooks/ansible.cfg b/attic/shaman-pull-requests/setup/playbooks/ansible.cfg new file mode 100644 index 000000000..4b5ea57c9 --- /dev/null +++ b/attic/shaman-pull-requests/setup/playbooks/ansible.cfg @@ -0,0 +1,2 @@ +[ssh_connection] +pipelining=True diff --git a/attic/shaman-pull-requests/setup/playbooks/setup.yml b/attic/shaman-pull-requests/setup/playbooks/setup.yml new file mode 100644 index 000000000..e5ba010bf --- /dev/null +++ b/attic/shaman-pull-requests/setup/playbooks/setup.yml @@ -0,0 +1,8 @@ +--- + +- hosts: localhost + user: jenkins-build + sudo: True + + tasks: + - import_tasks: tasks/postgresql.yml diff --git a/attic/shaman-pull-requests/setup/playbooks/tasks/postgresql.yml b/attic/shaman-pull-requests/setup/playbooks/tasks/postgresql.yml new file mode 100644 index 000000000..ff5af980f --- /dev/null +++ b/attic/shaman-pull-requests/setup/playbooks/tasks/postgresql.yml @@ -0,0 +1,46 @@ +--- +- 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 diff --git a/attic/shaman-pull-requests/setup/playbooks/templates/pg_hba.conf.j2 b/attic/shaman-pull-requests/setup/playbooks/templates/pg_hba.conf.j2 new file mode 100644 index 000000000..c013c28cd --- /dev/null +++ b/attic/shaman-pull-requests/setup/playbooks/templates/pg_hba.conf.j2 @@ -0,0 +1,12 @@ +# {{ 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 diff --git a/ceph-deploy-build/build/build b/ceph-deploy-build/build/build deleted file mode 100644 index 5edbae202..000000000 --- a/ceph-deploy-build/build/build +++ /dev/null @@ -1,142 +0,0 @@ -#!/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 diff --git a/ceph-deploy-build/build/setup b/ceph-deploy-build/build/setup deleted file mode 100644 index 0d1a8bc05..000000000 --- a/ceph-deploy-build/build/setup +++ /dev/null @@ -1,32 +0,0 @@ -#!/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 diff --git a/ceph-deploy-build/config/definitions/ceph-deploy-build.yml b/ceph-deploy-build/config/definitions/ceph-deploy-build.yml deleted file mode 100644 index 67c263b5d..000000000 --- a/ceph-deploy-build/config/definitions/ceph-deploy-build.yml +++ /dev/null @@ -1,54 +0,0 @@ -- 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 diff --git a/ceph-deploy-docs/build/build b/ceph-deploy-docs/build/build deleted file mode 100644 index 9b4c18a77..000000000 --- a/ceph-deploy-docs/build/build +++ /dev/null @@ -1,15 +0,0 @@ -#!/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/ diff --git a/ceph-deploy-docs/config/definitions/ceph-deploy-docs.yml b/ceph-deploy-docs/config/definitions/ceph-deploy-docs.yml deleted file mode 100644 index 2f01a73b7..000000000 --- a/ceph-deploy-docs/config/definitions/ceph-deploy-docs.yml +++ /dev/null @@ -1,36 +0,0 @@ -- 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 diff --git a/ceph-deploy-pull-requests/build/build b/ceph-deploy-pull-requests/build/build deleted file mode 100644 index 91088a944..000000000 --- a/ceph-deploy-pull-requests/build/build +++ /dev/null @@ -1 +0,0 @@ -cd $WORKSPACE/ceph-deploy && $VENV/tox -rv diff --git a/ceph-deploy-pull-requests/build/setup b/ceph-deploy-pull-requests/build/setup deleted file mode 100644 index a2f37ff2d..000000000 --- a/ceph-deploy-pull-requests/build/setup +++ /dev/null @@ -1,13 +0,0 @@ -#!/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 diff --git a/ceph-deploy-pull-requests/config/definitions/ceph-deploy-pull-requests.yml b/ceph-deploy-pull-requests/config/definitions/ceph-deploy-pull-requests.yml deleted file mode 100644 index 4662b8cb9..000000000 --- a/ceph-deploy-pull-requests/config/definitions/ceph-deploy-pull-requests.yml +++ /dev/null @@ -1,74 +0,0 @@ -# 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 diff --git a/ceph-deploy-pull-requests/setup/playbooks/setup.yml b/ceph-deploy-pull-requests/setup/playbooks/setup.yml deleted file mode 100644 index 9a8a11d84..000000000 --- a/ceph-deploy-pull-requests/setup/playbooks/setup.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- - -- hosts: localhost - user: jenkins-build - become: yes - - tasks: - - include: tasks/ubuntu.yml - when: ansible_distribution == "Ubuntu" - - # TODO: maybe add RPM or Debian handling? diff --git a/ceph-deploy-pull-requests/setup/playbooks/tasks/ubuntu.yml b/ceph-deploy-pull-requests/setup/playbooks/tasks/ubuntu.yml deleted file mode 100644 index 359bc9c4c..000000000 --- a/ceph-deploy-pull-requests/setup/playbooks/tasks/ubuntu.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- - - 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 diff --git a/ceph-deploy-tag/build/build b/ceph-deploy-tag/build/build deleted file mode 100644 index bd040cd2e..000000000 --- a/ceph-deploy-tag/build/build +++ /dev/null @@ -1,19 +0,0 @@ -#!/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" diff --git a/ceph-deploy-tag/config/definitions/ceph-tag.yml b/ceph-deploy-tag/config/definitions/ceph-tag.yml deleted file mode 100644 index fe7bea1d1..000000000 --- a/ceph-deploy-tag/config/definitions/ceph-tag.yml +++ /dev/null @@ -1,54 +0,0 @@ -- 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' diff --git a/ceph-deploy/config/definitions/ceph-deploy.yml b/ceph-deploy/config/definitions/ceph-deploy.yml deleted file mode 100644 index 019901d6a..000000000 --- a/ceph-deploy/config/definitions/ceph-deploy.yml +++ /dev/null @@ -1,62 +0,0 @@ -- 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 diff --git a/chacra-pull-requests/build/build b/chacra-pull-requests/build/build deleted file mode 100644 index 38033107f..000000000 --- a/chacra-pull-requests/build/build +++ /dev/null @@ -1,20 +0,0 @@ -#!/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 diff --git a/chacra-pull-requests/config/definitions/chacra-pull-requests.yml b/chacra-pull-requests/config/definitions/chacra-pull-requests.yml deleted file mode 100644 index b68e92e14..000000000 --- a/chacra-pull-requests/config/definitions/chacra-pull-requests.yml +++ /dev/null @@ -1,73 +0,0 @@ -- 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 diff --git a/chacra-pull-requests/setup/playbooks/ansible.cfg b/chacra-pull-requests/setup/playbooks/ansible.cfg deleted file mode 100644 index 4b5ea57c9..000000000 --- a/chacra-pull-requests/setup/playbooks/ansible.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[ssh_connection] -pipelining=True diff --git a/chacra-pull-requests/setup/playbooks/setup.yml b/chacra-pull-requests/setup/playbooks/setup.yml deleted file mode 100644 index 8ed3d5880..000000000 --- a/chacra-pull-requests/setup/playbooks/setup.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- - -- hosts: localhost - user: jenkins-build - become: True - - tasks: - - import_tasks: tasks/postgresql.yml diff --git a/chacra-pull-requests/setup/playbooks/tasks/postgresql.yml b/chacra-pull-requests/setup/playbooks/tasks/postgresql.yml deleted file mode 100644 index 1da701387..000000000 --- a/chacra-pull-requests/setup/playbooks/tasks/postgresql.yml +++ /dev/null @@ -1,86 +0,0 @@ ---- -- 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 diff --git a/lab-cop/build/build b/lab-cop/build/build deleted file mode 100755 index 52d139048..000000000 --- a/lab-cop/build/build +++ /dev/null @@ -1,18 +0,0 @@ -#!/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 "$@" diff --git a/lab-cop/config/definitions/lab-cop.yml b/lab-cop/config/definitions/lab-cop.yml deleted file mode 100644 index 58e12490e..000000000 --- a/lab-cop/config/definitions/lab-cop.yml +++ /dev/null @@ -1,17 +0,0 @@ -- 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 - diff --git a/shaman-pull-requests/build/build b/shaman-pull-requests/build/build deleted file mode 100644 index 85f1137d8..000000000 --- a/shaman-pull-requests/build/build +++ /dev/null @@ -1,13 +0,0 @@ -#!/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 diff --git a/shaman-pull-requests/config/definitions/shaman-pull-requests.yml b/shaman-pull-requests/config/definitions/shaman-pull-requests.yml deleted file mode 100644 index eefb10494..000000000 --- a/shaman-pull-requests/config/definitions/shaman-pull-requests.yml +++ /dev/null @@ -1,73 +0,0 @@ -- 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 diff --git a/shaman-pull-requests/setup/playbooks/ansible.cfg b/shaman-pull-requests/setup/playbooks/ansible.cfg deleted file mode 100644 index 4b5ea57c9..000000000 --- a/shaman-pull-requests/setup/playbooks/ansible.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[ssh_connection] -pipelining=True diff --git a/shaman-pull-requests/setup/playbooks/setup.yml b/shaman-pull-requests/setup/playbooks/setup.yml deleted file mode 100644 index e5ba010bf..000000000 --- a/shaman-pull-requests/setup/playbooks/setup.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- - -- hosts: localhost - user: jenkins-build - sudo: True - - tasks: - - import_tasks: tasks/postgresql.yml diff --git a/shaman-pull-requests/setup/playbooks/tasks/postgresql.yml b/shaman-pull-requests/setup/playbooks/tasks/postgresql.yml deleted file mode 100644 index ff5af980f..000000000 --- a/shaman-pull-requests/setup/playbooks/tasks/postgresql.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -- 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 diff --git a/shaman-pull-requests/setup/playbooks/templates/pg_hba.conf.j2 b/shaman-pull-requests/setup/playbooks/templates/pg_hba.conf.j2 deleted file mode 100644 index c013c28cd..000000000 --- a/shaman-pull-requests/setup/playbooks/templates/pg_hba.conf.j2 +++ /dev/null @@ -1,12 +0,0 @@ -# {{ 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