You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by pr...@apache.org on 2018/08/01 17:14:09 UTC

[geode] branch develop updated: GEODE-5425: Use new Docker image for metrics pipeline

This is an automated email from the ASF dual-hosted git repository.

prhomberg pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new d17ef00  GEODE-5425: Use new Docker image for metrics pipeline
d17ef00 is described below

commit d17ef006bd9e2744b0ad1e29a6bf1dd02ee8c955
Author: Patrick Rhomberg <pr...@pivotal.io>
AuthorDate: Wed Aug 1 10:11:27 2018 -0700

    GEODE-5425: Use new Docker image for metrics pipeline
    
    Co-authored-by: Jacob Barrett <jb...@pivotal.io>
---
 ci/images/metric-tools/Dockerfile       | 26 +++++++++++
 ci/pipelines/images/images.yml          | 29 +++++++++++++
 ci/pipelines/metrics.yml                | 76 +++++++++++++++++----------------
 ci/scripts/concourse_job_performance.sh | 37 ----------------
 4 files changed, 95 insertions(+), 73 deletions(-)

diff --git a/ci/images/metric-tools/Dockerfile b/ci/images/metric-tools/Dockerfile
new file mode 100644
index 0000000..2abc61b
--- /dev/null
+++ b/ci/images/metric-tools/Dockerfile
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+FROM alpine
+
+RUN apk --no-cache add \
+      bash \
+      python3 \
+  && pip3 install --upgrade pip \
+  && pip3 install requests \
+      ansicolors \
+      sseclient-py \
+      urllib3 \
+      tqdm
diff --git a/ci/pipelines/images/images.yml b/ci/pipelines/images/images.yml
index 373eee2..1b1914e 100644
--- a/ci/pipelines/images/images.yml
+++ b/ci/pipelines/images/images.yml
@@ -91,6 +91,21 @@ resources:
     password: ((!docker-password))
     repository: gcr.io/apachegeode-ci/((!docker-image-prefix))concourse-metadata-resource
 
+- name: metric-tools-dockerfile
+  type: git
+  source:
+    uri: https://github.com/((!geode-fork))/geode.git
+    branch: ((!geode-build-branch))
+    paths:
+    - ci/images/metric-tools/*
+
+- name: metric-tools-docker-image
+  type: docker-image
+  source:
+    username: ((!docker-username))
+    password: ((!docker-password))
+    repository: gcr.io/apachegeode-ci/((!docker-image-prefix))metric-tools
+
 jobs:
 # apachegeode-build-concourse
 - name: build-apachegeode-build-concourse-docker-image
@@ -160,3 +175,17 @@ jobs:
     params:
       build: concourse-metadata-resource-dockerfile/ci/images/concourse-metadata-resource
       tag_as_latest: true
+
+- name: build-metric-tools-docker-image
+  public: ((!public-pipelines))
+  serial: true
+  plan:
+  - aggregate:
+    - get: alpine-docker-image
+      trigger: true
+    - get: metric-tools-dockerfile
+      trigger: true
+  - put: metric-tools-docker-image
+    params:
+      build: metric-tools-dockerfile/ci/images/metric-tools
+      tag_as_latest: true
diff --git a/ci/pipelines/metrics.yml b/ci/pipelines/metrics.yml
index 48eca0a..b7a57c7 100644
--- a/ci/pipelines/metrics.yml
+++ b/ci/pipelines/metrics.yml
@@ -20,7 +20,7 @@ image_resource: &docker-geode-build-image
   source:
     username: ((!docker-username))
     password: ((!docker-password))
-    repository: gcr.io/apachegeode-ci/((!docker-image-name))
+    repository: gcr.io/apachegeode-ci/((!docker-image-prefix))metric-tools
     tag: latest
 
 resources:
@@ -53,14 +53,15 @@ jobs:
         - name: workspace
       platform: linux
       image_resource: *docker-geode-build-image
-      params:
-        CONCOURSE_URL: https://concourse.apachegeode-ci.info
-        CONCOURSE_PIPELINE: develop
-        CONCOURSE_JOB: Build
-        COUNT: 50
       run:
-        args: [workspace]
-        path: geode-ci/ci/scripts/concourse_job_performance.sh
+        path: /usr/bin/python3
+        args:
+        - geode-ci/ci/bin/concourse_job_performance.py
+        - https://concourse.apachegeode-ci.info
+        - develop
+        - Build
+        - 50
+
 
 - name: GeodeAcceptanceTestMetrics
   serial: true
@@ -77,14 +78,14 @@ jobs:
         - name: workspace
       platform: linux
       image_resource: *docker-geode-build-image
-      params:
-        CONCOURSE_URL: https://concourse.apachegeode-ci.info
-        CONCOURSE_PIPELINE: develop
-        CONCOURSE_JOB: AcceptanceTest
-        COUNT: 50
       run:
-        args: [workspace]
-        path: geode-ci/ci/scripts/concourse_job_performance.sh
+        path: /usr/bin/python3
+        args:
+        - geode-ci/ci/bin/concourse_job_performance.py
+        - https://concourse.apachegeode-ci.info
+        - develop
+        - AcceptanceTest
+        - 50
 
 - name: GeodeDistributedTestMetrics
   serial: true
@@ -101,14 +102,15 @@ jobs:
         - name: workspace
       platform: linux
       image_resource: *docker-geode-build-image
-      params:
-        CONCOURSE_URL: https://concourse.apachegeode-ci.info
-        CONCOURSE_PIPELINE: develop
-        CONCOURSE_JOB: DistributedTest
-        COUNT: 50
       run:
-        args: [workspace]
-        path: geode-ci/ci/scripts/concourse_job_performance.sh
+        path: /usr/bin/python3
+        args:
+        - geode-ci/ci/bin/concourse_job_performance.py
+        - https://concourse.apachegeode-ci.info
+        - develop
+        - DistributedTest
+        - 50
+
 
 - name: GeodeIntegrationTestMetrics
   serial: true
@@ -125,14 +127,15 @@ jobs:
         - name: workspace
       platform: linux
       image_resource: *docker-geode-build-image
-      params:
-        CONCOURSE_URL: https://concourse.apachegeode-ci.info
-        CONCOURSE_PIPELINE: develop
-        CONCOURSE_JOB: IntegrationTest
-        COUNT: 50
       run:
-        args: [workspace]
-        path: geode-ci/ci/scripts/concourse_job_performance.sh
+        path: /usr/bin/python3
+        args:
+        - geode-ci/ci/bin/concourse_job_performance.py
+        - https://concourse.apachegeode-ci.info
+        - develop
+        - IntegrationTest
+        - 50
+
 
 - name: GeodeUpgradeTestMetrics
   serial: true
@@ -149,11 +152,12 @@ jobs:
       - name: workspace
       platform: linux
       image_resource: *docker-geode-build-image
-      params:
-        CONCOURSE_URL: https://concourse.apachegeode-ci.info
-        CONCOURSE_PIPELINE: develop
-        CONCOURSE_JOB: UpgradeTest
-        COUNT: 50
       run:
-        args: [workspace]
-        path: geode-ci/ci/scripts/concourse_job_performance.sh
+        path: /usr/bin/python3
+        args:
+        - geode-ci/ci/bin/concourse_job_performance.py
+        - https://concourse.apachegeode-ci.info
+        - develop
+        - UpgradeTest
+        - 50
+
diff --git a/ci/scripts/concourse_job_performance.sh b/ci/scripts/concourse_job_performance.sh
deleted file mode 100755
index 811fae9..0000000
--- a/ci/scripts/concourse_job_performance.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-set -e
-WORKDIR=${1}
-
-SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
-  SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-  SOURCE="$(readlink "$SOURCE")"
-  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
-done
-SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-
-pip3 install requests
-pip3 install ansicolors
-pip3 install sseclient-py
-pip3 install urllib3
-pip3 install tqdm
-set -x
-python3 geode-ci/ci/bin/concourse_job_performance.py ${CONCOURSE_URL} ${CONCOURSE_PIPELINE} ${CONCOURSE_JOB} ${COUNT}
-set +x