From: Ken Dreyer Date: Mon, 31 Aug 2015 22:06:13 +0000 (-0600) Subject: import jenkins-calamari JJB X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eb1ce3db8f09c92b4d33628dee8db08f75cb716f;p=ceph-build.git import jenkins-calamari JJB These YAML files were created using Jenkins Job Wrecker: jjwrecker -s 'http://jenkins-calamari.front.sepia.ceph.com:8080' and then I moved each shell step out of the YAML files into separate "build" shell script files by hand. --- diff --git a/calamari-clients-centos/build/build b/calamari-clients-centos/build/build new file mode 100644 index 00000000..866612d9 --- /dev/null +++ b/calamari-clients-centos/build/build @@ -0,0 +1,30 @@ +set -e + +test -e ${WORKSPACE}/calamari-clients-build-output.tar.gz || ( echo "no build-output +tarball"; exit 1 ) + +rm -f ${WORKSPACE}/calamari-clients*rpm + +cd ${WORKSPACE}/calamari-clients/vagrant/centos-package && vagrant destroy +-f && vagrant up + +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 +4>/tmp/${BUILD_TAG}.out + +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' +< /tmp/${BUILD_TAG}.out) + +rm /tmp/${BUILD_TAG}.out + +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit +1; fi + +vagrant destroy -f + +cd $WORKSPACE + +rm -rf $BRANCH + +mkdir $BRANCH + +mv *rpm $BRANCH diff --git a/calamari-clients-centos/config/definitions/calamari-clients-centos.yml b/calamari-clients-centos/config/definitions/calamari-clients-centos.yml new file mode 100644 index 00000000..afa4475e --- /dev/null +++ b/calamari-clients-centos/config/definitions/calamari-clients-centos.yml @@ -0,0 +1,41 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - copyartifact: + filter: $BRANCH/calamari-clients-build-output.tar.gz + flatten: true + project: calamari-clients-precise-vagrant + target: ${WORKSPACE} + which-build: last-successful + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-clients-centos' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/calamari-clients*rpm + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/calamari-clients*rpm + record-artifacts: false + scm: + - git: + basedir: calamari-clients + branches: '*/${BRANCH}' + url: git@github.com:ceph/calamari-clients.git diff --git a/calamari-clients-precise-vagrant/build/build b/calamari-clients-precise-vagrant/build/build new file mode 100644 index 00000000..68865ba2 --- /dev/null +++ b/calamari-clients-precise-vagrant/build/build @@ -0,0 +1,15 @@ +set -e +rm -f ${WORKSPACE}/calamari-clients*deb +rm -f ${WORKSPACE}/calamari-clients-build-output.tar.gz +cd ${WORKSPACE}/calamari-clients/vagrant/precise-build +vagrant destroy -f && vagrant up +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +cd $WORKSPACE +rm -rf $BRANCH +mkdir $BRANCH +mv *deb $BRANCH +mv calamari-clients-build-output.tar.gz $BRANCH diff --git a/calamari-clients-precise-vagrant/config/definitions/calamari-clients-precise-vagrant.yml b/calamari-clients-precise-vagrant/config/definitions/calamari-clients-precise-vagrant.yml new file mode 100644 index 00000000..7828d2a3 --- /dev/null +++ b/calamari-clients-precise-vagrant/config/definitions/calamari-clients-precise-vagrant.yml @@ -0,0 +1,34 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '10' + name: 'calamari-clients-precise-vagrant' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/calamari-clients*deb, $BRANCH/calamari-clients-build-output.tar.gz + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/calamari-clients*deb, $BRANCH/calamari-clients-build-output.tar.gz + scm: + - git: + basedir: calamari-clients + branches: '*/${BRANCH}' + url: git@github.com:ceph/calamari-clients.git diff --git a/calamari-clients-precise/build/build b/calamari-clients-precise/build/build new file mode 100644 index 00000000..b414aaf8 --- /dev/null +++ b/calamari-clients-precise/build/build @@ -0,0 +1,9 @@ +set -e +rm -f ${WORKSPACE}/calamari-clients*deb +rm -f ${WORKSPACE}/calamari-clients-build-output.tar.gz +cd $WORKSPACE +sudo -E salt-call --local --file-root $WORKSPACE/calamari-clients/vagrant/salt/roots -l debug state.highstate +rm -rf $BRANCH +mkdir $BRANCH +mv *deb $BRANCH +mv calamari-clients-build-output.tar.gz $BRANCH diff --git a/calamari-clients-precise/config/definitions/calamari-clients-precise.yml b/calamari-clients-precise/config/definitions/calamari-clients-precise.yml new file mode 100644 index 00000000..2be2866e --- /dev/null +++ b/calamari-clients-precise/config/definitions/calamari-clients-precise.yml @@ -0,0 +1,34 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '10' + name: 'calamari-clients-precise' + node: calamari-buildslave-precise + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/calamari-clients*deb, $BRANCH/calamari-clients-build-output.tar.gz + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/calamari-clients*deb, $BRANCH/calamari-clients-build-output.tar.gz + scm: + - git: + basedir: calamari-clients + branches: ${BRANCH} + url: git@github.com:red-hat-storage/romana.git diff --git a/calamari-clients-rhel/build/build b/calamari-clients-rhel/build/build new file mode 100644 index 00000000..0e429388 --- /dev/null +++ b/calamari-clients-rhel/build/build @@ -0,0 +1,18 @@ +set -e +test -e ${WORKSPACE}/calamari-clients-build-output.tar.gz || ( echo "no build-output tarball"; exit 1 ) +rm -f ${WORKSPACE}/calamari-clients*rpm +cd ${WORKSPACE}/calamari-clients/vagrant/rhel-package +vagrant destroy -f +vagrant up --no-provision +vagrant ssh -c 'sudo subscription-manager refresh' +vagrant ssh -c 'sudo subscription-manager list' +vagrant provision +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +cd $WORKSPACE +rm -rf $BRANCH +mkdir $BRANCH +mv *rpm $BRANCH diff --git a/calamari-clients-rhel/config/definitions/calamari-clients-rhel.yml b/calamari-clients-rhel/config/definitions/calamari-clients-rhel.yml new file mode 100644 index 00000000..97f004b0 --- /dev/null +++ b/calamari-clients-rhel/config/definitions/calamari-clients-rhel.yml @@ -0,0 +1,41 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - copyartifact: + filter: $BRANCH/calamari-clients-build-output.tar.gz + flatten: true + project: calamari-clients-precise-vagrant + target: ${WORKSPACE} + which-build: last-successful + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-clients-rhel' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/calamari-clients*rpm + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/calamari-clients*rpm + record-artifacts: false + scm: + - git: + basedir: calamari-clients + branches: '*/${BRANCH}' + url: git@github.com:ceph/calamari-clients.git diff --git a/calamari-clients-rhel7/build/build b/calamari-clients-rhel7/build/build new file mode 100644 index 00000000..5f814fc3 --- /dev/null +++ b/calamari-clients-rhel7/build/build @@ -0,0 +1,19 @@ +set -e +test -e ${WORKSPACE}/calamari-clients-build-output.tar.gz || ( echo "no build-output tarball"; exit 1 ) +rm -f ${WORKSPACE}/calamari-clients*rpm +cd ${WORKSPACE}/calamari-clients/vagrant/rhel7-package +vagrant destroy -f +vagrant up --no-provision +#XXX rhel7 isn't yet subscribed +#vagrant ssh -c 'sudo subscription-manager refresh' +#vagrant ssh -c 'sudo subscription-manager list' +vagrant provision +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +cd $WORKSPACE +rm -rf $BRANCH +mkdir $BRANCH +mv *rpm $BRANCH diff --git a/calamari-clients-rhel7/config/definitions/calamari-clients-rhel7.yml b/calamari-clients-rhel7/config/definitions/calamari-clients-rhel7.yml new file mode 100644 index 00000000..3a85d341 --- /dev/null +++ b/calamari-clients-rhel7/config/definitions/calamari-clients-rhel7.yml @@ -0,0 +1,41 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - copyartifact: + filter: $BRANCH/calamari-clients-build-output.tar.gz + flatten: true + project: calamari-clients-precise-vagrant + target: ${WORKSPACE} + which-build: last-successful + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-clients-rhel7' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/calamari-clients*rpm + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/calamari-clients*rpm + record-artifacts: false + scm: + - git: + basedir: calamari-clients + branches: '*/${BRANCH}' + url: git@github.com:ceph/calamari-clients.git diff --git a/calamari-clients-trusty/build/build b/calamari-clients-trusty/build/build new file mode 100644 index 00000000..e1be3775 --- /dev/null +++ b/calamari-clients-trusty/build/build @@ -0,0 +1,13 @@ +set -e +test -e ${WORKSPACE}/calamari-clients-build-output.tar.gz || ( echo "no build-output tarball"; exit 1 ) +rm -f ${WORKSPACE}/calamari-clients*rpm +cd ${WORKSPACE}/calamari-clients/vagrant/trusty-package && vagrant destroy -f && vagrant up +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +cd $WORKSPACE +rm -rf $BRANCH +mkdir $BRANCH +mv *deb $BRANCH diff --git a/calamari-clients-trusty/config/definitions/calamari-clients-trusty.yml b/calamari-clients-trusty/config/definitions/calamari-clients-trusty.yml new file mode 100644 index 00000000..5f53d27b --- /dev/null +++ b/calamari-clients-trusty/config/definitions/calamari-clients-trusty.yml @@ -0,0 +1,41 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - copyartifact: + filter: $BRANCH/calamari-clients-build-output.tar.gz + flatten: true + project: calamari-clients-precise-vagrant + target: ${WORKSPACE} + which-build: last-successful + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-clients-trusty' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/calamari-clients*deb + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/calamari-clients*deb + record-artifacts: false + scm: + - git: + basedir: calamari-clients + branches: '*/${BRANCH}' + url: git@github.com:ceph/calamari-clients.git diff --git a/calamari-clients-vagrant/build/build b/calamari-clients-vagrant/build/build new file mode 100644 index 00000000..48a331b0 --- /dev/null +++ b/calamari-clients-vagrant/build/build @@ -0,0 +1,43 @@ +#!/bin/bash +set -ex +echo "BRANCH: ${BRANCH} DIST: $dist ARCH: $arch WORKSPACE: $WORKSPACE PWD: ${PWD}" +ls $WORKSPACE +rm -f $WORKSPACE/*{rpm,deb} +ls $WORKSPACE +cd $WORKSPACE/calamari-clients/vagrant/${dist}-package && vagrant destroy -f + +# CDN == PITA +if [ ${dist:0:4} = 'rhel' ] ; then + vagrant up --no-provision + vagrant ssh -c 'sudo subscription-manager refresh; sudo subscription-manager list' + if [ $dist = 'rhel' ] ; then + vagrant ssh -c ' + echo " +[server] +name=server +enabled=1 +gpgcheck=0 +baseurl=http://apt-mirror.front.sepia.ceph.com/rhel6repo-server + +[server-optional] +name=server-optional +enabled=1 +gpgcheck=0 +baseurl=http://apt-mirror.front.sepia.ceph.com/rhel6repo-server-optional" | sudo tee /etc/yum.repos.d/local.repo' + vagrant ssh -c 'sudo yum clean all' + vagrant ssh -c 'sudo yum makecache' + fi + vagrant provision +else + vagrant up +fi +vagrant up + +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +rm -rf $WORKSPACE/$BRANCH +mkdir $WORKSPACE/$BRANCH +find $WORKSPACE -maxdepth 1 -name '*.deb' -print0 -o -name '*.rpm' -print0 -o -name 'calamari-clients.build.output.tar.gz' -print0 | xargs --verbose -0 -I'{}' mv '{}' $WORKSPACE/$BRANCH diff --git a/calamari-clients-vagrant/config/definitions/calamari-clients-vagrant.yml b/calamari-clients-vagrant/config/definitions/calamari-clients-vagrant.yml new file mode 100644 index 00000000..d04084aa --- /dev/null +++ b/calamari-clients-vagrant/config/definitions/calamari-clients-vagrant.yml @@ -0,0 +1,65 @@ +- job: + axes: + - axis: + name: arch + type: label-expression + values: + - x86_64 + - axis: + name: dist + type: label-expression + values: + - centos + - rhel + - rhel7 + - trusty + - wheezy + - axis: + name: label + type: slave + values: + - vagrant + block-downstream: false + block-upstream: false + builders: + - copyartifact: + exclude-pattern: '' + filter: $BRANCH/calamari-clients-build-output.tar.gz + flatten: true + project: calamari-clients-precise-vagrant + target: $WORKSPACE + which-build: last-successful + - shell: !include-raw ../../build/build + combination-filter: dist != "wheezy" + concurrent: false + description: Build all the non-precise distros (which really means "package them") + execution-strategy: + run-sequentially: false + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-clients-vagrant' + node: vagrant + parameters: + - string: + default: master + description: '' + name: BRANCH + project-type: matrix + properties: + - github: + url: https://github.com/red-hat-storage/calamari/ + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/* + default-excludes: true + fingerprint: false + only-if-success: false + scm: + - git: + basedir: calamari-clients + branches: '*/$BRANCH' + url: git@github.com:red-hat-storage/calamari-clients.git diff --git a/calamari-clients-wheezy/build/build b/calamari-clients-wheezy/build/build new file mode 100644 index 00000000..2c9495ba --- /dev/null +++ b/calamari-clients-wheezy/build/build @@ -0,0 +1,13 @@ +set -e +test -e ${WORKSPACE}/calamari-clients-build-output.tar.gz || ( echo "no build-output tarball"; exit 1 ) +rm -f ${WORKSPACE}/calamari-clients*deb +cd ${WORKSPACE}/calamari-clients/vagrant/wheezy-package && vagrant destroy -f && vagrant up +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +cd $WORKSPACE +rm -rf $BRANCH +mkdir $BRANCH +mv *deb $BRANCH diff --git a/calamari-clients-wheezy/config/definitions/calamari-clients-wheezy.yml b/calamari-clients-wheezy/config/definitions/calamari-clients-wheezy.yml new file mode 100644 index 00000000..41ba89c6 --- /dev/null +++ b/calamari-clients-wheezy/config/definitions/calamari-clients-wheezy.yml @@ -0,0 +1,41 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - copyartifact: + filter: $BRANCH/calamari-clients-build-output.tar.gz + flatten: true + project: calamari-clients-precise-vagrant + target: ${WORKSPACE} + which-build: last-successful + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-clients-wheezy' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/calamari-clients*deb + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/calamari-clients*deb + record-artifacts: false + scm: + - git: + basedir: calamari-clients + branches: '*/${BRANCH}' + url: git@github.com:ceph/calamari-clients.git diff --git a/calamari-clients/build/build b/calamari-clients/build/build new file mode 100644 index 00000000..3e81c865 --- /dev/null +++ b/calamari-clients/build/build @@ -0,0 +1,17 @@ +#!/bin/bash +set -ex +echo "BRANCH: ${BRANCH} DIST: $dist ARCH: $arch WORKSPACE: $WORKSPACE PWD: ${PWD}" +ls $WORKSPACE +rm -f $WORKSPACE/*{rpm,deb} +ls $WORKSPACE + +sudo -E salt-call --local --file-root=$WORKSPACE/calamari-clients/vagrant/salt/roots state.highstate | \ + multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi + +rm -rf $WORKSPACE/$BRANCH +mkdir $WORKSPACE/$BRANCH +find $WORKSPACE -maxdepth 1 -name '*.deb' -print0 -o -name '*.rpm' -print0 \ + -o -name 'calamari-clients.build.output.tar.gz' -print0 | xargs --verbose -0 -I'{}' mv '{}' $WORKSPACE/$BRANCH diff --git a/calamari-clients/config/definitions/calamari-clients.yml b/calamari-clients/config/definitions/calamari-clients.yml new file mode 100644 index 00000000..0b1d3c9f --- /dev/null +++ b/calamari-clients/config/definitions/calamari-clients.yml @@ -0,0 +1,62 @@ +- job: + axes: + - axis: + name: arch + type: label-expression + values: + - x86_64 + - axis: + name: dist + type: label-expression + values: + - centos + - rhel7 + - trusty + - axis: + name: label + type: slave + values: + - calamari-buildslave + block-downstream: false + block-upstream: false + builders: + - copyartifact: + exclude-pattern: '' + filter: $BRANCH/calamari-clients-build-output.tar.gz + flatten: true + project: calamari-clients-precise + target: $WORKSPACE + which-build: last-successful + - shell: !include-raw ../../build/build + combination-filter: dist != "wheezy" + concurrent: false + description: 'Build all the non-precise distros (which really means "package them")' + execution-strategy: + run-sequentially: false + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-clients' + parameters: + - string: + default: master + description: '' + name: BRANCH + project-type: matrix + properties: + - github: + url: https://github.com/red-hat-storage/romana/ + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/* + default-excludes: true + fingerprint: false + only-if-success: false + scm: + - git: + basedir: calamari-clients + branches: $BRANCH + url: git@github.com:red-hat-storage/romana.git diff --git a/calamari-server-centos/build/build b/calamari-server-centos/build/build new file mode 100644 index 00000000..224167d1 --- /dev/null +++ b/calamari-server-centos/build/build @@ -0,0 +1,16 @@ +set -e +echo "Building ${BRANCH}" +echo "${SALT_BOOTSTRAP_URL}" +rm -f ${WORKSPACE}/*rpm ${WORKSPACE}/calamari-repo-el6.tar.gz +cd ${WORKSPACE}/calamari/vagrant/centos-build && vagrant destroy -f +vagrant up +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +cd $WORKSPACE +rm -rf $BRANCH +mkdir $BRANCH +mv *rpm $BRANCH +mv calamari-repo-el6.tar.gz $BRANCH diff --git a/calamari-server-centos/config/definitions/calamari-server-centos.yml b/calamari-server-centos/config/definitions/calamari-server-centos.yml new file mode 100644 index 00000000..018a8fc6 --- /dev/null +++ b/calamari-server-centos/config/definitions/calamari-server-centos.yml @@ -0,0 +1,37 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-server-centos' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + properties: + - github: + url: https://github.com/ceph/calamari/ + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/*.rpm,$BRANCH/calamari-repo-el6.tar.gz + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/*.rpm,$BRANCH/calamari-repo-el6.tar.gz + scm: + - git: + basedir: Diamond + branches: '*/calamari' + url: git@github.com:ceph/Diamond diff --git a/calamari-server-precise/build/build b/calamari-server-precise/build/build new file mode 100644 index 00000000..87869996 --- /dev/null +++ b/calamari-server-precise/build/build @@ -0,0 +1,15 @@ +set -e +echo "Building ${BRANCH}" +rm -f ${WORKSPACE}/*.deb ${WORKSPACE}/calamari-repo-precise.tar.gz +cd ${WORKSPACE}/calamari/vagrant/precise-build && vagrant destroy -f +vagrant up +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +cd $WORKSPACE +rm -rf $BRANCH +mkdir $BRANCH +mv *deb $BRANCH +mv calamari-repo-precise.tar.gz $BRANCH diff --git a/calamari-server-precise/config/definitions/calamari-server-precise.yml b/calamari-server-precise/config/definitions/calamari-server-precise.yml new file mode 100644 index 00000000..c1a9d983 --- /dev/null +++ b/calamari-server-precise/config/definitions/calamari-server-precise.yml @@ -0,0 +1,37 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-server-precise' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + properties: + - github: + url: https://github.com/ceph/calamari/ + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/*.deb,$BRANCH/calamari-repo-precise.tar.gz + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/*.deb,$BRANCH/calamari-repo-precise.tar.gz + scm: + - git: + basedir: Diamond + branches: '*/calamari' + url: git@github.com:ceph/Diamond diff --git a/calamari-server-rhel/build/build b/calamari-server-rhel/build/build new file mode 100644 index 00000000..89ee16df --- /dev/null +++ b/calamari-server-rhel/build/build @@ -0,0 +1,17 @@ +set -e +echo "Building ${BRANCH}" +rm -f ${WORKSPACE}/*rpm ${WORKSPACE}/calamari-repo-rhel6.tar.gz +cd ${WORKSPACE}/calamari/vagrant/rhel-build && vagrant destroy -f +vagrant up --no-provision +vagrant ssh -c 'sudo subscription-manager refresh; sudo subscription-manager list' +vagrant provision +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +cd $WORKSPACE +rm -rf $BRANCH +mkdir $BRANCH +mv *rpm $BRANCH +mv calamari-repo-rhel6.tar.gz $BRANCH diff --git a/calamari-server-rhel/config/definitions/calamari-server-rhel.yml b/calamari-server-rhel/config/definitions/calamari-server-rhel.yml new file mode 100644 index 00000000..1372c6ca --- /dev/null +++ b/calamari-server-rhel/config/definitions/calamari-server-rhel.yml @@ -0,0 +1,37 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-server-rhel' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + properties: + - github: + url: https://github.com/ceph/calamari/ + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/*.rpm,$BRANCH/calamari-repo-rhel6.tar.gz + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/*.rpm,$BRANCH/calamari-repo-rhel6.tar.gz + scm: + - git: + basedir: Diamond + branches: '*/calamari' + url: git@github.com:ceph/Diamond diff --git a/calamari-server-rhel7/build/build b/calamari-server-rhel7/build/build new file mode 100644 index 00000000..0c8db0a3 --- /dev/null +++ b/calamari-server-rhel7/build/build @@ -0,0 +1,16 @@ +set -e +echo "Building ${BRANCH}" +rm -f ${WORKSPACE}/*rpm ${WORKSPACE}/calamari-repo-rhel7.tar.gz +cd ${WORKSPACE}/calamari/vagrant/rhel7-build +vagrant destroy -f +vagrant up +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +cd $WORKSPACE +rm -rf $BRANCH +mkdir $BRANCH +mv *rpm $BRANCH +mv calamari-repo-rhel7.tar.gz $BRANCH diff --git a/calamari-server-rhel7/config/definitions/calamari-server-rhel7.yml b/calamari-server-rhel7/config/definitions/calamari-server-rhel7.yml new file mode 100644 index 00000000..58153c50 --- /dev/null +++ b/calamari-server-rhel7/config/definitions/calamari-server-rhel7.yml @@ -0,0 +1,37 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '10' + name: 'calamari-server-rhel7' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + properties: + - github: + url: https://github.com/ceph/calamari/ + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/*.rpm,$BRANCH/calamari-repo-rhel7.tar.gz + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/*.rpm,$BRANCH/calamari-repo-rhel7.tar.gz + scm: + - git: + basedir: Diamond + branches: '*/calamari' + url: git@github.com:ceph/Diamond diff --git a/calamari-server-trusty/build/build b/calamari-server-trusty/build/build new file mode 100644 index 00000000..14ea327b --- /dev/null +++ b/calamari-server-trusty/build/build @@ -0,0 +1,15 @@ +set -e +echo "Building ${BRANCH}" +rm -f ${WORKSPACE}/*.deb ${WORKSPACE}/calamari-repo-trusty.tar.gz +cd ${WORKSPACE}/calamari/vagrant/trusty-build && vagrant destroy -f +vagrant up +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +cd $WORKSPACE +rm -rf $BRANCH +mkdir $BRANCH +mv *deb $BRANCH +mv calamari-repo-trusty.tar.gz $BRANCH diff --git a/calamari-server-trusty/config/definitions/calamari-server-trusty.yml b/calamari-server-trusty/config/definitions/calamari-server-trusty.yml new file mode 100644 index 00000000..5e266dcf --- /dev/null +++ b/calamari-server-trusty/config/definitions/calamari-server-trusty.yml @@ -0,0 +1,37 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-server-trusty' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + properties: + - github: + url: https://github.com/ceph/calamari/ + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/*.deb,$BRANCH/calamari-repo-trusty.tar.gz + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/*.deb,$BRANCH/calamari-repo-trusty.tar.gz + scm: + - git: + basedir: Diamond + branches: '*/calamari' + url: git@github.com:ceph/Diamond diff --git a/calamari-server-vagrant/build/build b/calamari-server-vagrant/build/build new file mode 100644 index 00000000..2a93cba9 --- /dev/null +++ b/calamari-server-vagrant/build/build @@ -0,0 +1,27 @@ +#!/bin/bash +set -ex +echo "BRANCH: ${BRANCH} DIST: $dist ARCH: $arch WORKSPACE: $WORKSPACE PWD: ${PWD}" +ls $WORKSPACE +rm -f $WORKSPACE/*{rpm,deb} $WORKSPACE/calamari-repo-*.tar.gz +ls $WORKSPACE +cd $WORKSPACE/calamari/vagrant/${dist}-build && vagrant destroy -f + +# CDN == PITA +if [ ${dist:0:4} = 'rhel' ] ; then + vagrant up --no-provision + vagrant ssh -c 'sudo subscription-manager refresh; sudo subscription-manager list' + vagrant provision +else + vagrant up +fi + +vagrant ssh -c 'mkdir ~/.pip; echo -e "[global]\nindex-url = http://apt-mirror.front.sepia.ceph.com/pypi/simple\n" >~/.pip/pip.conf' + +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +rm -rf $WORKSPACE/$BRANCH +mkdir $WORKSPACE/$BRANCH +find $WORKSPACE -maxdepth 1 -name '*.deb' -print0 -o -name '*.rpm' -print0 -o -name 'calamari-repo-*.tar.gz' -print0 | xargs --verbose -0 -I'{}' mv '{}' $WORKSPACE/$BRANCH diff --git a/calamari-server-vagrant/config/definitions/calamari-server-vagrant.yml b/calamari-server-vagrant/config/definitions/calamari-server-vagrant.yml new file mode 100644 index 00000000..fcd48a32 --- /dev/null +++ b/calamari-server-vagrant/config/definitions/calamari-server-vagrant.yml @@ -0,0 +1,54 @@ +- job: + axes: + - axis: + name: arch + type: label-expression + values: + - x86_64 + - axis: + name: dist + type: label-expression + values: + - centos + - rhel + - rhel7 + - precise + - trusty + - wheezy + block-downstream: false + block-upstream: false + builders: + - shell: !include-raw ../../build/build + combination-filter: dist != "wheezy" + concurrent: false + description: '' + execution-strategy: + run-sequentially: false + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-server-vagrant' + node: vagrant + parameters: + - string: + default: master + description: '' + name: BRANCH + project-type: matrix + properties: + - github: + url: https://github.com/ceph/calamari/ + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/* + default-excludes: true + fingerprint: false + only-if-success: false + scm: + - git: + basedir: Diamond + branches: '*/calamari' + url: git@github.com:ceph/Diamond diff --git a/calamari-server-wheezy/build/build b/calamari-server-wheezy/build/build new file mode 100644 index 00000000..2fa96989 --- /dev/null +++ b/calamari-server-wheezy/build/build @@ -0,0 +1,15 @@ +set -e +echo "Building ${BRANCH}" +rm -f ${WORKSPACE}/*.deb ${WORKSPACE}/calamari-repo-wheezy.tar.gz +cd ${WORKSPACE}/calamari/vagrant/wheezy-build && vagrant destroy -f +vagrant up +vagrant ssh -c 'sudo salt-call --local state.highstate' | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi +vagrant destroy -f +cd $WORKSPACE +rm -rf $BRANCH +mkdir $BRANCH +mv *deb $BRANCH +mv calamari-repo-wheezy.tar.gz $BRANCH diff --git a/calamari-server-wheezy/config/definitions/calamari-server-wheezy.yml b/calamari-server-wheezy/config/definitions/calamari-server-wheezy.yml new file mode 100644 index 00000000..77e29e3d --- /dev/null +++ b/calamari-server-wheezy/config/definitions/calamari-server-wheezy.yml @@ -0,0 +1,37 @@ +- job: + block-downstream: false + block-upstream: false + builders: + - shell: !include-raw ../../build/build + concurrent: false + description: '' + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-server-wheezy' + node: vagrant + parameters: + - string: + default: '' + description: '' + name: BRANCH + project-type: freestyle + properties: + - github: + url: https://github.com/ceph/calamari/ + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/*.deb,$BRANCH/calamari-repo-wheezy.tar.gz + default-excludes: true + fingerprint: false + only-if-success: false + - fingerprint: + files: $BRANCH/*.deb,$BRANCH/calamari-repo-wheezy.tar.gz + scm: + - git: + basedir: Diamond + branches: '*/calamari' + url: git@github.com:ceph/Diamond diff --git a/calamari-server/build/build b/calamari-server/build/build new file mode 100644 index 00000000..abca6db6 --- /dev/null +++ b/calamari-server/build/build @@ -0,0 +1,22 @@ +#!/bin/bash +set -ex +echo "BRANCH: ${BRANCH} DIST: $dist ARCH: $arch WORKSPACE: $WORKSPACE PWD: ${PWD}" +ls $WORKSPACE +rm -f $WORKSPACE/*{rpm,deb} $WORKSPACE/calamari-repo-*.tar.gz +ls $WORKSPACE + +# CDN == PITA +if [ "${dist:0:4}" = "rhel" -a "${dist:4}" != "7" ] ; then + sudo subscription-manager refresh; sudo subscription-manager list +fi + +sudo -E salt-call --file-root $WORKSPACE/calamari/vagrant/${dist}-build/salt/roots \ + --local state.highstate | multitee 0-1,4 4>/tmp/${BUILD_TAG}.out +errs=$(sed --regexp-extended -n 's/^Failed:[[:space:]]+([[:digit:]]+)/\1/p' < /tmp/${BUILD_TAG}.out) +rm /tmp/${BUILD_TAG}.out +if [ $errs != 0 ] ; then echo "$errs HIGHSTATE ERRORS, BUILD FAILED"; exit 1; fi + +rm -rf $WORKSPACE/$BRANCH +mkdir $WORKSPACE/$BRANCH +find $WORKSPACE/pkgs -maxdepth 1 -name '*.deb' -print0 -o -name '*.rpm' -print0 \ + -o -name 'calamari-repo-*.tar.gz' -print0 | xargs --verbose -0 -I'{}' mv '{}' $WORKSPACE/$BRANCH diff --git a/calamari-server/config/definitions/calamari-server.yml b/calamari-server/config/definitions/calamari-server.yml new file mode 100644 index 00000000..97ea0aa7 --- /dev/null +++ b/calamari-server/config/definitions/calamari-server.yml @@ -0,0 +1,64 @@ +- job: + axes: + - axis: + name: arch + type: label-expression + values: + - x86_64 + - axis: + name: dist + type: label-expression + values: + - centos + - rhel + - rhel7 + - precise + - trusty + - wheezy + - axis: + name: label + type: slave + values: + - calamari-buildslave + block-downstream: false + block-upstream: false + builders: + - shell: !include-raw ../../build/build + combination-filter: dist != 'wheezy' && dist != 'rhel' + concurrent: false + description: '' + execution-strategy: + run-sequentially: false + logrotate: + artifactDaysToKeep: '-1' + artifactNumToKeep: '-1' + daysToKeep: '-1' + numToKeep: '-1' + name: 'calamari-server' + node: calamari-buildslave + parameters: + - string: + default: master + description: '' + name: BRANCH + project-type: matrix + properties: + - github: + url: https://github.com/ceph/calamari/ + publishers: + - archive: + allow-empty: false + artifacts: $BRANCH/* + default-excludes: true + fingerprint: false + only-if-success: false + - description-setter: + description: \1 + regexp: 'BRANCH: (\S+)' + regexp-for-failed: '' + set-for-matrix: false + scm: + - git: + basedir: Diamond + branches: '*/calamari' + url: git@github.com:ceph/Diamond