geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sai_boorlaga...@apache.org
Subject [geode] 02/02: Added a new pipeline for windows
Date Fri, 13 Jul 2018 17:26:15 GMT
This is an automated email from the ASF dual-hosted git repository.

sai_boorlagadda pushed a commit to branch feature/GEODE-5212
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 2d68aff0a5be21ee9942f4ad3b14569c4df55c8f
Author: Sai Boorlagadda <sai.boorlagadda@gmail.com>
AuthorDate: Fri Jul 13 10:25:56 2018 -0700

    Added a new pipeline for windows
---
 ci/pipelines/geode-build/base.yml               |  22 +++
 ci/pipelines/geode-build/deploy_win_pipeline.sh |  76 ++++++++++
 ci/pipelines/geode-build/win.yml                | 190 ++++++++++++++++++++++++
 3 files changed, 288 insertions(+)

diff --git a/ci/pipelines/geode-build/base.yml b/ci/pipelines/geode-build/base.yml
index f37e6e0..f67997a 100644
--- a/ci/pipelines/geode-build/base.yml
+++ b/ci/pipelines/geode-build/base.yml
@@ -219,6 +219,17 @@ jobs:
       - get: geode-ci-windows
       - get: geode-build-version
         passed: [Build]
+    - task: cleanup-java-processes
+      tags: [windows-acceptance-tests]
+      config:
+        platform: windows
+        run:
+          path: powershell
+          args:
+          - -command
+          - |
+            gwmi win32_process -filter 'name = "java.exe"' | select commandline | format-list
+            kill -name java
     - task: run-acceptance-tests
       tags: [windows-acceptance-tests]
       timeout: 8h
@@ -283,6 +294,17 @@ jobs:
       - get: geode-ci-windows
       - get: geode-build-version
         passed: [Build]
+    - task: cleanup-java-processes
+      tags: [windows-integration-tests]
+      config:
+        platform: windows
+        run:
+          path: powershell
+          args:
+          - -command
+          - |
+            gwmi win32_process -filter 'name = "java.exe"' | select commandline | format-list
+            kill -name java
     - task: run-integration-tests
       tags: [windows-integration-tests]
       timeout: 8h
diff --git a/ci/pipelines/geode-build/deploy_win_pipeline.sh b/ci/pipelines/geode-build/deploy_win_pipeline.sh
new file mode 100755
index 0000000..8dc4f9e
--- /dev/null
+++ b/ci/pipelines/geode-build/deploy_win_pipeline.sh
@@ -0,0 +1,76 @@
+#!/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.
+
+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 )"
+
+if ! [ -x "$(command -v spruce)" ]; then
+    echo "Spruce must be installed for pipeline deployment to work."
+    echo "For macos: 'brew tap starkandwayne/cf; brew install spruce'"
+    echo "For Ubuntu: follow the instructions at https://github.com/geofffranks/spruce"
+    echo ""
+    exit 1
+else
+    SPRUCE=$(which spruce || true)
+fi
+
+set -e
+
+if [ -z "${GEODE_BRANCH}" ]; then
+  GEODE_BRANCH=$(git rev-parse --abbrev-ref HEAD)
+fi
+
+if [ "${GEODE_BRANCH}" = "HEAD" ]; then
+  echo "Unable to determine branch for deployment. Quitting..."
+  exit 1
+fi
+
+SANITIZED_GEODE_BRANCH=$(echo ${GEODE_BRANCH} | tr "/" "-")
+
+BIN_DIR=${OUTPUT_DIRECTORY}/bin
+TMP_DIR=${OUTPUT_DIRECTORY}/tmp
+mkdir -p ${BIN_DIR} ${TMP_DIR}
+curl -o ${BIN_DIR}/fly "https://concourse.apachegeode-ci.info/api/v1/cli?arch=amd64&platform=darwin"
+chmod +x ${BIN_DIR}/fly
+
+PATH=${PATH}:${BIN_DIR}
+
+echo "Spruce branch-name into resources"
+rm -f ${TMP_DIR}/final-win.yml
+${SPRUCE} merge --prune metadata \
+  ${SCRIPTDIR}/win.yml \
+  <(echo "metadata:"; \
+    echo "  geode-build-branch: ${GEODE_BRANCH}"; \
+    echo "  geode-fork: ${GEODE_FORK}"; \
+    echo "  ") \
+  > ${TMP_DIR}/final-win.yml
+
+TARGET="geode"
+
+TEAM="staging"
+if [[ "${GEODE_BRANCH}" == "develop" ]] || [[ ${GEODE_BRANCH} =~ ^release/* ]]; then
+  TEAM="main"
+fi
+
+#fly login -t ${TARGET} -n ${TEAM} -c https://concourse.apachegeode-ci.info -u ${CONCOURSE_USERNAME}
-p ${CONCOURSE_PASSWORD}
+fly -t ${TARGET} set-pipeline --pipeline windows --config ${TMP_DIR}/final-win.yml
diff --git a/ci/pipelines/geode-build/win.yml b/ci/pipelines/geode-build/win.yml
new file mode 100644
index 0000000..7766515
--- /dev/null
+++ b/ci/pipelines/geode-build/win.yml
@@ -0,0 +1,190 @@
+#
+# 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.
+#
+
+---
+
+resource_types:
+  - name: gcs-resource
+    type: docker-image
+    source:
+      repository: frodenas/gcs-resource
+
+resources:
+- name: geode
+  type: git
+  source:
+    uri: (( concat "https://github.com/" metadata.geode-fork "/geode.git" ))
+    branch: develop
+    ignore_paths:
+    - ci/*
+- name: geode-ci
+  type: git
+  source:
+    depth: 1
+    uri: (( concat "https://github.com/" metadata.geode-fork "/geode.git" ))
+    branch: feature/GEODE-5212
+    paths:
+    - ci/*
+- name: geode-build-version
+  type: semver
+  source:
+    driver: gcs
+    bucket: ((!concourse-bucket))
+    key: (( concat metadata.geode-build-branch "/version" ))
+    json_key: ((!concourse-gcp-key))
+    initial_version: 1.3.0
+
+jobs:
+- name: WindowsAcceptanceTests
+  serial: true
+  plan:
+    - aggregate:
+      - get: geode
+        trigger: true
+      - get: geode-ci
+      - get: geode-build-version
+    - task: cleanup-java-processes
+      tags: [windows-acceptance-tests]
+      config:
+        platform: windows
+        run:
+          path: powershell
+          args:
+          - -command
+          - |
+            gwmi win32_process -filter 'name = "java.exe"' | select commandline | format-list
+            kill -name java
+            exit 0
+    - task: run-acceptance-tests
+      tags: [windows-acceptance-tests]
+      timeout: 8h
+      config:
+        inputs:
+          - name: geode
+          - name: geode-ci
+          - name: geode-build-version
+        outputs:
+          - name: built-geode
+        params:
+          CALL_STACK_TIMEOUT: 25200
+          DUNIT_PARALLEL_FORKS: 0
+          MAINTENANCE_VERSION: develop
+          PARALLEL_DUNIT: false
+          PUBLIC_BUCKET: ((!public-bucket))
+          SERVICE_ACCOUNT: ((!concourse-gcp-account))
+          JAVA_HOME: "C:\\progra~1\\java\\jdk1.8.0_172"
+          DOCKER_COMPOSE_LOCATION: "C:\\Progra~1\\Docker\\Docker\\resources\\bin\\docker-compose.exe"
+          DOCKER_LOCATION: "C:\\Progra~1\\Docker\\Docker\\resources\\bin\\docker.exe"
+        platform: windows
+        run:
+          path: c:\Progra~1\git\bin\bash.exe
+          args:
+            - geode-ci/ci/scripts/test-run.sh
+            #- :geode-assembly:acceptanceTest :geode-connectors:acceptanceTest
+            - :geode-assembly:acceptanceTest
+            - windows-acceptancetestfiles
+      ensure:
+        aggregate:
+        - task: archive-acceptance-test-results
+          tags: [windows-acceptance-tests]
+          config:
+            inputs:
+              - name: geode
+              - name: geode-ci
+              - name: geode-build-version
+              - name: built-geode
+            params:
+              MAINTENANCE_VERSION: (( grab metadata.geode-build-branch ))
+              SERVICE_ACCOUNT: ((!concourse-gcp-account))
+              PUBLIC_BUCKET: ((!public-bucket))
+              JAVA_HOME: "C:\\progra~1\\java\\jdk1.8.0_172"
+            platform: windows
+            run:
+              path: c:\Progra~1\git\bin\bash.exe
+              args:
+              - geode-ci/ci/scripts/test-archive.sh
+              - :geode-assembly:acceptanceTest
+              - windows-acceptancetestfiles
+
+- name: WindowsIntegrationTests
+  serial: true
+  plan:
+    - aggregate:
+      - get: geode
+        passed: [WindowsAcceptanceTests]
+        trigger: true
+      - get: geode-ci
+      - get: geode-build-version
+    - task: cleanup-java-processes
+      tags: [windows-integration-tests]
+      config:
+        platform: windows
+        run:
+          path: powershell
+          args:
+          - -command
+          - |
+            gwmi win32_process -filter 'name = "java.exe"' | select commandline | format-list
+            kill -name java
+            exit 0
+    - task: run-integration-tests
+      tags: [windows-integration-tests]
+      timeout: 8h
+      config:
+        inputs:
+          - name: geode
+          - name: geode-ci
+          - name: geode-build-version
+        outputs:
+          - name: built-geode
+        params:
+          CALL_STACK_TIMEOUT: 25200
+          DUNIT_PARALLEL_FORKS: 0
+          MAINTENANCE_VERSION: develop
+          PARALLEL_DUNIT: false
+          PUBLIC_BUCKET: ((!public-bucket))
+          SERVICE_ACCOUNT: ((!concourse-gcp-account))
+          JAVA_HOME: "C:\\progra~1\\java\\jdk1.8.0_172"
+        platform: windows
+        run:
+          path: c:\Progra~1\git\bin\bash.exe
+          args:
+            - geode-ci/ci/scripts/test-run.sh
+            - integrationTest
+            - windows-integrationtestfiles
+      ensure:
+        aggregate:
+        - task: archive-integration-test-results
+          tags: [windows-integration-tests]
+          config:
+            inputs:
+              - name: geode
+              - name: geode-ci
+              - name: geode-build-version
+              - name: built-geode
+            params:
+              MAINTENANCE_VERSION: (( grab metadata.geode-build-branch ))
+              SERVICE_ACCOUNT: ((!concourse-gcp-account))
+              PUBLIC_BUCKET: ((!public-bucket))
+              JAVA_HOME: "C:\\progra~1\\java\\jdk1.8.0_172"
+            platform: windows
+            run:
+              path: c:\Progra~1\git\bin\bash.exe
+              args:
+                - geode-ci/ci/scripts/test-archive.sh
+                - integrationTest
+                - windows-integrationtestfiles


Mime
View raw message