# ============LICENSE_END=========================================================
- project:
- name: 'apache-geode-build'
+ name: 'apache-geode-build-release'
build-executor: 'apache-geode-execute-build-macro'
artifact-slug: 'build'
dunit-parallel-forks: '0'
jobs:
- - 'apache-geode-build-jdk{java-build-version}'
+ - 'apache-geode-build-release-jdk{java-build-version}'
else
GEODE_VERSION=$(cat ${GEODE_BUILD_VERSION_FILE} | cut -d'-' -f1)
echo -e "\nGEODE VERSION is ${GEODE_VERSION}"
- BUILD_ID=$(cat ${GEODE_BUILD_VERSION_FILE} | cut -d'.' -f4)
+ BUILD_DATE=$(cat ${GEODE_BUILD_VERSION_FILE} | cut -d'-' -f2 | cut -d'.' -f2)
+ echo -e "GEODE BUILD_DATE is ${BUILD_DATE}"
FULL_PRODUCT_VERSION=$(cat ${GEODE_BUILD_VERSION_FILE})
echo -e "FULL PRODUCT VERSION is ${FULL_PRODUCT_VERSION}\n"
fi
${GRADLE_SKIP_TASK_OPTIONS} \
${GRADLE_GLOBAL_ARGS} \
-Pversion=${FULL_PRODUCT_VERSION} \
- -PbuildId=${BUILD_ID} \
+ -PbuildId=${BUILD_DATE} \
build install javadoc spotlessCheck rat checkPom resolveDependencies -x test"
EXEC_COMMAND="mkdir -p tmp && cd geode && ${SET_JAVA_HOME} && ./gradlew ${GRADLE_ARGS}"
--- /dev/null
+#!/usr/bin/env bash
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 2018-2019 Nordix Foundation.
+# ================================================================================
+# Licensed 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+set -o errexit
+set -o nounset
+set -o pipefail
+
+ARTIFACTORY_URL="https://artifactory.nordix.org/artifactory"
+GEODE_BUILD_VERSION=$(cat $WORKSPACE/geode-build-version/number)
+GEODE_UPSTREAM_VERSION=$(echo ${GEODE_BUILD_VERSION} | awk -F "." '{print $1"."$2"."$3}')
+cd $WORKSPACE/geode
+
+GEODE_ARTIFACT_PATH=$(find geode-assembly/build/distributions \( -name \*.tgz ! -name \*src.tgz \))
+GEODE_ARTIFACT=${GEODE_ARTIFACT_PATH##*/}
+SHA_CHECKSUM=$(shasum -a 1 ${GEODE_ARTIFACT_PATH} | awk '{ print $1 }')
+SHA256_CHECKSUM=$(sha256sum ${GEODE_ARTIFACT_PATH} | awk '{ print $1 }')
+MD5_CHECKSUM=$(md5sum ${GEODE_ARTIFACT_PATH} | awk '{ print $1 }')
+
+if [[ ${GEODE_BUILD_VERSION} =~ \.RC[0-9]+ ]] ; then
+ LOCATION="staging"
+else
+ LOCATION="release"
+fi
+echo "-----------------------------------------------------------"
+echo -e "\nUploading ${GEODE_ARTIFACT} to geode staging area: "
+echo -e "geode/${GEODE_UPSTREAM_VERSION}/${LOCATION} on artifactory.nordix.org\n"
+curl -H "X-JFrog-Art-Api:${ARTIFACTORY_API_KEY}" \
+ -H "X-Checksum-Sha1:${SHA_CHECKSUM}" \
+ -H "X-Checksum-Sha256:${SHA256_CHECKSUM}" \
+ -H "X-Checksum-MD5:${MD5_CHECKSUM}" \
+ -X PUT "${ARTIFACTORY_URL}/geode/${GEODE_UPSTREAM_VERSION}/${LOCATION}/${GEODE_ARTIFACT}" \
+ -T ${GEODE_ARTIFACT_PATH}
+echo "-----------------------------------------------------------"
cd $WORKSPACE/geode
# Get most recent tag that is reachable from a commit
-GEODE_VERSION=$(git describe | sed -r "s#rel/v(.*)#\1#")
+GEODE_VERSION=$(git describe --abbrev=0 | sed -r "s#rel/v(.*)#\1#")
+BUILD_DATE=$(date '+%Y%m%d%H%M')
if [ ! -d ${WORKSPACE}/geode-build-version ] ; then
mkdir ${WORKSPACE}/geode-build-version
fi
-echo "$GEODE_VERSION" > ${WORKSPACE}/geode-build-version/number
+# Make sure the Geode tag version is in agreed fromat: \d.\d.\d.[ \d or RC\d ]
+if [[ ${GEODE_VERSION} =~ ^[0-9]+\.[0-9]+\.[0-9]+\.(RC[0-9]+|[0-9]+)$ ]] ; then
+ echo "${GEODE_VERSION}-NORDIX.${BUILD_DATE}" > ${WORKSPACE}/geode-build-version/number
+else
+ echo "ERROR: Incorrect geode version specified: ${GEODE_VERSION}"
+ exit 1
+fi
!include-raw: ./apache-geode-build/set_geode_build_version.sh
- shell:
!include-raw: ./apache-geode-build/execute_build.sh
+ - shell:
+ !include-raw: ./apache-geode-build/publish_geode.sh
- builder:
name: 'apache-geode-setup-slave-macro'
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
- job-template:
- name: 'apache-geode-build-jdk{java-build-version}'
+ name: 'apache-geode-build-release-jdk{java-build-version}'
node: geode-ubuntu1804
disabled: false
- logrotate
- github:
url: 'https://github.com/Nordix/geode.git/'
+ wrappers:
+ - credentials-binding:
+ - username-password-separated:
+ credential-id: infra-nordix-artifactory-api-key
+ username: ARTIFACTORY_USER
+ password: ARTIFACTORY_API_KEY
parameters:
- string: