diff options
author | Nigel Babu <nigelb@redhat.com> | 2018-08-17 07:29:46 +0530 |
---|---|---|
committer | Nigel Babu <nigelb@redhat.com> | 2018-08-30 06:09:40 +0000 |
commit | 03614883897903152688f9f6ea4deb129c8fcc6c (patch) | |
tree | b5dea94333024cae1b00660b91c697f7157a843a | |
parent | 16ba5cbddcb7e06502e1d6f12a6295b353bd6ee0 (diff) |
Add a job for gd2 containers
Change-Id: I42ebd35471af8e0b7b36d1039be48a28912f409f
-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 |