Skip to content

Commit

Permalink
Make some corrections to whitespace and build script.
Browse files Browse the repository at this point in the history
skip-checks: true
  • Loading branch information
PurelyApplied committed Nov 30, 2018
1 parent 6e18493 commit d0fdba0
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 83 deletions.
124 changes: 63 additions & 61 deletions ci/pipelines/pull-request/jinja.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,72 +88,74 @@ jobs:
- do:
- put: concourse-metadata-resource
- task: create_instance
{{- alpine_tools_config()|indent(8) }}
{{- alpine_tools_config()|indent(10) }}
params:
CPUS: {{build_test.CPUS}}
RAM: {{build_test.RAM}}
GCP_PROJECT: ((gcp-project))
GEODE_BRANCH: {{repository.branch}}
GEODE_FORK: {{repository.fork}}
JAVA_BUILD_VERSION: 8
JAVA_TEST_VERSION: 8
run:
path: geode-ci/ci/scripts/create_instance.sh
inputs:
- name: concourse-metadata-resource
- name: geode
- name: geode-ci
outputs:
- name: instance-data
timeout: 15m
attempts: 100
- task: rsync_code_up
{{- alpine_tools_config()|indent(4) }}
run:
path: geode-ci/ci/scripts/rsync_code_up.sh
inputs:
- name: geode-ci
- name: geode
- name: instance-data
timeout: 5m
- task: build
{{- alpine_tools_config()|indent(4) }}
params:
JAVA_BUILD_VERSION: 8
GRADLE_TASK: {{ build_test.GRADLE_TASK }}
ARTIFACT_SLUG: {{build_test.ARTIFACT_SLUG}}
JAVA_TEST_VERSION: 8
CALL_STACK_TIMEOUT: {{build_test.CALL_STACK_TIMEOUT}}
DUNIT_PARALLEL_FORKS: {{build_test.DUNIT_PARALLEL_FORKS}}
GRADLE_TASK_OPTIONS: ""
MAINTENANCE_VERSION: {{repository.branch}}
PARALLEL_DUNIT: {{build_test.PARALLEL_DUNIT}}
PARALLEL_GRADLE: {{build_test.PARALLEL_GRADLE}}
ARTIFACT_BUCKET: ((artifact-bucket))
SERVICE_ACCOUNT: ((concourse-gcp-account))
GRADLE_GLOBAL_ARGS: ((gradle-global-args))
run:
path: geode-ci/ci/scripts/execute_build.sh
inputs:
- name: geode-ci
- name: geode
- name: instance-data
do:
- put: pull-request-job-failure
resource: geode
params:
context: {{ build_test.name }}
path: geode
status: failure
get_params: {skip_download: true}
CPUS: {{build_test.CPUS}}
RAM: {{build_test.RAM}}
GCP_PROJECT: ((gcp-project))
GEODE_BRANCH: {{repository.branch}}
GEODE_FORK: {{repository.fork}}
JAVA_BUILD_VERSION: 8
JAVA_TEST_VERSION: 8
run:
path: geode-ci/ci/scripts/create_instance.sh
inputs:
- name: concourse-metadata-resource
- name: geode
- name: geode-ci
outputs:
- name: instance-data
timeout: 15m
attempts: 100
- task: rsync_code_up
{{- alpine_tools_config()|indent(6) }}
run:
path: geode-ci/ci/scripts/rsync_code_up.sh
inputs:
- name: geode-ci
- name: geode
- name: instance-data
timeout: 5m
- task: build
{{- alpine_tools_config()|indent(6) }}
params:
JAVA_BUILD_VERSION: 8
GRADLE_TASK: {{ build_test.GRADLE_TASK }}
ARTIFACT_SLUG: {{build_test.ARTIFACT_SLUG}}
JAVA_TEST_VERSION: 8
CALL_STACK_TIMEOUT: {{build_test.CALL_STACK_TIMEOUT}}
DUNIT_PARALLEL_FORKS: {{build_test.DUNIT_PARALLEL_FORKS}}
GRADLE_TASK_OPTIONS: ""
MAINTENANCE_VERSION: {{repository.branch}}
PARALLEL_DUNIT: {{build_test.PARALLEL_DUNIT}}
PARALLEL_GRADLE: {{build_test.PARALLEL_GRADLE}}
ARTIFACT_BUCKET: ((artifact-bucket))
SERVICE_ACCOUNT: ((concourse-gcp-account))
GRADLE_GLOBAL_ARGS: ((gradle-global-args))
run:
path: geode-ci/ci/scripts/execute_build.sh
inputs:
- name: geode-ci
- name: geode
- name: instance-data
timeout: {{build_test.execute_test_timeout}}
on_failure:
do:
- put: pull-request-job-failure
resource: geode
params:
context: {{ build_test.name }}
path: geode
status: failure
get_params: {skip_download: true}
ensure:
do:
- task: rsync_code_down
{{- alpine_tools_config()|indent(8) }}
params:
JAVA_BUILD_VERSION: {{ java_build_version.version }}
JAVA_BUILD_VERSION: 8
ARTIFACT_SLUG: {{build_test.ARTIFACT_SLUG}}
run:
run:
path: geode-ci/ci/scripts/rsync_code_down.sh
inputs:
- name: geode
Expand All @@ -165,7 +167,7 @@ jobs:
ensure:
aggregate:
- task: archive_results
{{- alpine_tools_config()|indent(12) }}
{{- alpine_tools_config()|indent(10) }}
params:
ARTIFACT_SLUG: {{build_test.ARTIFACT_SLUG}}
GRADLE_TASK: {{build_test.GRADLE_TASK}}
Expand All @@ -180,7 +182,7 @@ jobs:
- name: geode-ci
- name: geode-results
- task: delete_instance
{{- alpine_tools_config()|indent(12) }}
{{- alpine_tools_config()|indent(10) }}
run:
path: geode-ci/ci/scripts/delete_instance.sh
inputs:
Expand Down
46 changes: 24 additions & 22 deletions ci/scripts/execute_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,31 @@ fi
ROOT_DIR=$(pwd)
BUILD_DATE=$(date +%s)

GEODE_BUILD_VERSION_FILE=${ROOT_DIR}/geode-build-version/number
GEODE_RESULTS_VERSION_FILE=${ROOT_DIR}/results/number
GEODE_BUILD_VERSION_NUMBER=$(grep "versionNumber *=" geode/gradle.properties | awk -F "=" '{print $2}' | tr -d ' ')
GEODE_BUILD_DIR=/tmp/geode-build
GEODE_PULL_REQUEST_ID_FILE=${ROOT_DIR}/geode/.git/id

if [ -e "${GEODE_PULL_REQUEST_ID_FILE}" ]; then
GEODE_PULL_REQUEST_ID=$(cat ${GEODE_PULL_REQUEST_ID_FILE})
FULL_PRODUCT_VERSION="geode-pr-${GEODE_PULL_REQUEST_ID}"
else
CONCOURSE_VERSION=$(cat ${GEODE_BUILD_VERSION_FILE})
CONCOURSE_PRODUCT_VERSION=${CONCOURSE_VERSION%%-*}
GEODE_PRODUCT_VERSION=${GEODE_BUILD_VERSION_NUMBER}
CONCOURSE_BUILD_SLUG=${CONCOURSE_VERSION##*-}
BUILD_ID=${CONCOURSE_VERSION##*.}
FULL_PRODUCT_VERSION=${GEODE_PRODUCT_VERSION}-${CONCOURSE_BUILD_SLUG}
echo "Concourse VERSION is ${CONCOURSE_VERSION}"
echo "Geode product VERSION is ${GEODE_PRODUCT_VERSION}"
echo "Build ID is ${BUILD_ID}"
fi

echo -n "${FULL_PRODUCT_VERSION}" > ${GEODE_RESULTS_VERSION_FILE}
# Precheckin does not get a geode-build-version
if [ -e "${ROOT_DIR}/geode-build-version" ] ; then
GEODE_BUILD_VERSION_FILE=${ROOT_DIR}/geode-build-version/number
GEODE_RESULTS_VERSION_FILE=${ROOT_DIR}/results/number
GEODE_BUILD_VERSION_NUMBER=$(grep "versionNumber *=" geode/gradle.properties | awk -F "=" '{print $2}' | tr -d ' ')
GEODE_BUILD_DIR=/tmp/geode-build
GEODE_PULL_REQUEST_ID_FILE=${ROOT_DIR}/geode/.git/id

if [ -e "${GEODE_PULL_REQUEST_ID_FILE}" ]; then
GEODE_PULL_REQUEST_ID=$(cat ${GEODE_PULL_REQUEST_ID_FILE})
FULL_PRODUCT_VERSION="geode-pr-${GEODE_PULL_REQUEST_ID}"
else
CONCOURSE_VERSION=$(cat ${GEODE_BUILD_VERSION_FILE})
CONCOURSE_PRODUCT_VERSION=${CONCOURSE_VERSION%%-*}
GEODE_PRODUCT_VERSION=${GEODE_BUILD_VERSION_NUMBER}
CONCOURSE_BUILD_SLUG=${CONCOURSE_VERSION##*-}
BUILD_ID=${CONCOURSE_VERSION##*.}
FULL_PRODUCT_VERSION=${GEODE_PRODUCT_VERSION}-${CONCOURSE_BUILD_SLUG}
echo "Concourse VERSION is ${CONCOURSE_VERSION}"
echo "Geode product VERSION is ${GEODE_PRODUCT_VERSION}"
echo "Build ID is ${BUILD_ID}"
fi

echo -n "${FULL_PRODUCT_VERSION}" > ${GEODE_RESULTS_VERSION_FILE}
fi

if [[ ${PARALLEL_GRADLE:-"true"} == "true" ]]; then
PARALLEL_GRADLE="--parallel"
Expand Down

0 comments on commit d0fdba0

Please sign in to comment.