From 823ac97b89f3838aa8faa715cbe03120a6aeb39c Mon Sep 17 00:00:00 2001 From: Nigel Babu Date: Tue, 18 Sep 2018 17:56:25 +0530 Subject: New job for gluster-csi-containers Change-Id: I2aea2d741b14c321cb3664f80cb240b57ca4f534 --- build-gluster-org/jobs/gluster-csi-containers.yml | 37 ++++++++++++++++++++++ .../scripts/gluster-csi-containers.sh | 22 +++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 build-gluster-org/jobs/gluster-csi-containers.yml create mode 100644 build-gluster-org/scripts/gluster-csi-containers.sh diff --git a/build-gluster-org/jobs/gluster-csi-containers.yml b/build-gluster-org/jobs/gluster-csi-containers.yml new file mode 100644 index 0000000..ac1b9cb --- /dev/null +++ b/build-gluster-org/jobs/gluster-csi-containers.yml @@ -0,0 +1,37 @@ +- job: + name: gluster-csi-containers + node: fedora + description: Build gluster-sci containers and push it to dockerhub + project-type: freestyle + concurrent: true + + scm: + - git: + basedir: go/src/github.com/gluster/gluster-csi-driver + url: https://github.com/gluster/gluster-csi-driver.git + branches: + - master + + properties: + - discard-after-x: + x: 10 + - one-build-per-node + + triggers: + - timed: "H 14 * * *" + + builders: + - shell: !include-raw: ../scripts/gluster-csi-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/gluster-csi-containers.sh b/build-gluster-org/scripts/gluster-csi-containers.sh new file mode 100644 index 0000000..4fe79a0 --- /dev/null +++ b/build-gluster-org/scripts/gluster-csi-containers.sh @@ -0,0 +1,22 @@ +#!/bin/bash +IMG_NAME="gluster/glusterd2-nightly" +IMG_VERSION=$(date +%Y%m%d) + + +mkdir -p go/{pkg,src,bin} +export GOPATH=$PWD/go +export PATH=$PATH:$GOPATH/bin +export PATH=/usr/sbin:$PATH + +export CSISRC=$GOPATH/src/github.com/gluster/gluster-csi-driver +cd $CSISRC +go get github.com/alecthomas/gometalinter +go get -u github.com/golang/dep/cmd/dep +make + +cp pkg/glusterfs/Dockerfile . +buildah bud . +#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