From 03614883897903152688f9f6ea4deb129c8fcc6c Mon Sep 17 00:00:00 2001 From: Nigel Babu Date: Fri, 17 Aug 2018 07:29:46 +0530 Subject: Add a job for gd2 containers Change-Id: I42ebd35471af8e0b7b36d1039be48a28912f409f --- build-gluster-org/jobs/glusterd2-containers.yml | 36 +++++++++++++++++++++++ build-gluster-org/scripts/glusterd2-containers.sh | 10 +++++++ 2 files changed, 46 insertions(+) create mode 100644 build-gluster-org/jobs/glusterd2-containers.yml create mode 100644 build-gluster-org/scripts/glusterd2-containers.sh 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 -- cgit