diff options
-rw-r--r-- | build-gluster-org/jobs/glusterd2-containers.yml | 36 | ||||
-rw-r--r-- | build-gluster-org/scripts/glusterd2-containers.sh | 10 |
2 files changed, 46 insertions, 0 deletions
diff --git a/build-gluster-org/jobs/glusterd2-containers.yml b/build-gluster-org/jobs/glusterd2-containers.yml new file mode 100644 index 0000000..86ea623 --- /dev/null +++ b/build-gluster-org/jobs/glusterd2-containers.yml @@ -0,0 +1,36 @@ +- job: + name: glusterd2-containers + node: fedora + description: Build glusterfs containers with GD2 and push it to dockerhub + project-type: freestyle + concurrent: true + + scm: + - git: + url: https://github.com/gluster/glusterd2.git + branches: + - master + + properties: + - discard-after-x: + x: 10 + - one-build-per-node + + triggers: + - timed: "H 14 * * *" + + builders: + - shell: !include-raw: ../scripts/glusterd2-containers.sh + + parameters: + - bool: + default: true + description: Push to Docker Hub + name: PUSH_TO_HUB + + wrappers: + - timestamps + - credentials-binding: + - file: + credential-id: aa47a72d-743b-4958-a14a-cb597bb22d92 + variable: AUTH_JSON diff --git a/build-gluster-org/scripts/glusterd2-containers.sh b/build-gluster-org/scripts/glusterd2-containers.sh new file mode 100644 index 0000000..d5a8637 --- /dev/null +++ b/build-gluster-org/scripts/glusterd2-containers.sh @@ -0,0 +1,10 @@ +#!/bin/bash +IMG_NAME="gluster/glusterd2-nightly" +IMG_VERSION=$(date +%Y%m%d) + +cd extras/nightly-container +./build.sh +if [ "$PUSH_TO_HUB" = true ]; then + buildah push --authfile $AUTH_JSON "localhost/$IMG_NAME:$IMG_VERSION" "docker://docker.io/gluster/glusterd2-nightly:$IMG_VERSION" + buildah push --authfile $AUTH_JSON "localhost/$IMG_NAME:$IMG_VERSION" "docker://docker.io/gluster/glusterd2-nightly:latest" +fi |