Add ceph-grafana job to build ceph-grafana container. 1826/head
authorDan Mick <dmick@redhat.com>
Tue, 4 May 2021 22:03:38 +0000 (15:03 -0700)
committerDan Mick <dmick@redhat.com>
Thu, 27 May 2021 19:31:07 +0000 (12:31 -0700)
This job builds from the ceph workspace based on a ceph branch and an
architecture (x86_64 or arm64).  A parent job calls this job for
branches or architectures.  More versions etc. could be parameterized,
but for now they're hardcoded in the ceph branch in
monitoring/grafana/build/Makefile.

ceph-grafana/build/build [new file with mode: 0644]
ceph-grafana/config/definitions/ceph-grafana.yml [new file with mode: 0644]

diff --git a/ceph-grafana/build/build b/ceph-grafana/build/build
new file mode 100644 (file)
index 0000000..2c8099e
--- /dev/null
@@ -0,0 +1,5 @@
+sudo yum install -y buildah
+cd monitoring/grafana/build
+make build
+make push
+make clean
diff --git a/ceph-grafana/config/definitions/ceph-grafana.yml b/ceph-grafana/config/definitions/ceph-grafana.yml
new file mode 100644 (file)
index 0000000..85953db
--- /dev/null
@@ -0,0 +1,54 @@
+- job:
+    name: ceph-grafana
+    description: 'Builds the ceph-grafana container.'
+    project-type: freestyle
+    concurrent: true
+    display-name: 'ceph-grafana'
+    properties:
+      - groovy-label:
+          script: return ARCH + '&&centos8'
+      - build-discarder:
+          days-to-keep: -1
+          num-to-keep: 25
+          artifact-days-to-keep: 25
+          artifact-num-to-keep: 25
+      - github:
+          url: https://github.com/ceph/ceph
+
+    scm:
+        - git:
+            url: https://github.com/ceph/ceph
+            branches:
+                - $BRANCH
+            wipe-workspace: true
+
+    parameters:
+      - string:
+          name: BRANCH
+          description: "The git branch (or tag) to build"
+          default: master
+      - string:
+          name: ARCH
+          description: "Architecture to build for. Available options are: x86_64, arm64"
+          default: "x86_64"
+
+    builders:
+        - shell:
+            !include-raw:
+                ../../build/build
+
+    wrappers:
+      - inject-passwords:
+          global: true
+          mask-password-params: true
+      - credentials-binding:
+          - username-password-separated:
+              credential-id: dmick-quay
+              username: CONTAINER_REPO_USERNAME
+              password: CONTAINER_REPO_PASSWORD
+          - username-password-separated:
+              credential-id: docker-hub-leseb
+              username: DOCKER_HUB_USERNAME
+              password: DOCKER_HUB_PASSWORD
+      - build-name:
+          name: "#${BUILD_NUMBER} ${BRANCH}, ${ARCH}"