Commit 34f041a9 authored by Tomas Kraus's avatar Tomas Kraus Committed by Tomáš Kraus
Browse files

Removed specification artifacts from release job.

Signed-off-by: default avatarTomas Kraus <Tomas.Kraus@oracle.com>
parent 55180e90
......@@ -7,8 +7,6 @@
// SPDX-License-Identifier: BSD-3-Clause
// Job input parameters:
// SPEC_VERSION - Specification version to release
// NEXT_SPEC_VERSION - Next specification snapshot version to set (e.g. 1.2.4-SNAPSHOT)
// API_VERSION - API version to release
// NEXT_API_VERSION - Next API snapshot version to set (e.g. 1.2.4-SNAPSHOT)
// BRANCH - Branch to release
......@@ -33,7 +31,6 @@ pipeline {
}
environment {
SPEC_DIR="${WORKSPACE}/spec"
API_DIR="${WORKSPACE}"
}
......@@ -74,8 +71,7 @@ pipeline {
)]) {
sshagent([SSH_CREDENTIALS_ID]) {
sh '''
etc/jenkins/release.sh "${SPEC_VERSION}" "${NEXT_SPEC_VERSION}" \
"${API_VERSION}" "${NEXT_API_VERSION}" \
etc/jenkins/release.sh "${API_VERSION}" "${NEXT_API_VERSION}" \
"${DRY_RUN}" "${OVERWRITE}"
'''
}
......
......@@ -10,37 +10,28 @@
#
# Arguments:
# $1 - SPEC_VERSION
# $2 - NEXT_SPEC_VERSION
# $3 - API_VERSION
# $4 - NEXT_API_VERSION
# $5 - DRY_RUN
# $6 - OVERWRITE
SPEC_VERSION="${1}"
NEXT_SPEC_VERSION="${2}"
API_VERSION="${3}"
NEXT_API_VERSION="${4}"
DRY_RUN="${5}"
OVERWRITE="${6}"
# $1 - API_VERSION
# $2 - NEXT_API_VERSION
# $3 - DRY_RUN
# $4 - OVERWRITE
API_VERSION="${1}"
NEXT_API_VERSION="${2}"
DRY_RUN="${3}"
OVERWRITE="${4}"
. etc/scripts/maven.incl.sh
. etc/scripts/nexus.incl.sh
read_version 'SPEC' "${SPEC_DIR}"
read_version 'API' "${API_DIR}"
if [ -z "${API_RELEASE_VERSION}" ]; then
echo '-[ Missing required API release version number! ]-------------------------------'
exit 1
fi
if [ -z "${SPEC_RELEASE_VERSION}" ]; then
echo '-[ Missing required specification release version number! ]---------------------'
exit 1
fi
RELEASE_TAG="SPEC-${SPEC_RELEASE_VERSION}_API-${API_RELEASE_VERSION}"
RELEASE_BRANCH="SPEC-${SPEC_RELEASE_VERSION}_API-${API_RELEASE_VERSION}_RELEASE"
RELEASE_TAG="${API_RELEASE_VERSION}"
RELEASE_BRANCH="${API_RELEASE_VERSION}-RELEASE"
if [ ${DRY_RUN} = 'true' ]; then
echo '-[ Dry run turned on ]----------------------------------------------------------'
......@@ -79,32 +70,20 @@ git checkout -b ${RELEASE_BRANCH}
git tag --delete "${RELEASE_TAG}" && true
# Read Maven identifiers
read_mvn_id 'SPEC' "${SPEC_DIR}"
read_mvn_id 'API' "${API_DIR}/jaxb-api"
# Set Nexus identifiers
SPEC_STAGING_DESC="${SPEC_GROUP_ID}:${SPEC_ARTIFACT_ID}:${SPEC_RELEASE_VERSION}"
SPEC_STAGING_KEY=$(echo ${SPEC_STAGING_DESC} | sed -e 's/\./\\\./g')
API_STAGING_DESC="${API_GROUP_ID}:${API_ARTIFACT_ID}:${API_RELEASE_VERSION}"
API_STAGING_KEY=$(echo ${API_STAGING_DESC} | sed -e 's/\./\\\./g')
# Set release versions
echo '-[ SPEC release version ]-------------------------------------------------------'
set_version 'SPEC' "${SPEC_DIR}" "${SPEC_RELEASE_VERSION}" "${SPEC_GROUP_ID}" "${SPEC_ARTIFACT_ID}" ''
echo '-[ API release version ]--------------------------------------------------------'
set_version 'API' "${API_DIR}" "${API_RELEASE_VERSION}" "${API_GROUP_ID}" "${API_ARTIFACT_ID}" ''
drop_artifacts "${SPEC_STAGING_KEY}" "${SPEC_DIR}"
drop_artifacts "${API_STAGING_KEY}" "${API_DIR}"
echo '-[ Deploy artifacts to staging repository ]-----------------------------'
# Verify, sign and deploy release
(cd ${SPEC_DIR} && \
mvn -U -C \
-Poss-release,staging -DskipTests \
-Dstatus='Final Release' \
-DstagingDescription="${SPEC_STAGING_DESC}" \
clean ${MVN_DEPLOY_ARGS})
(cd ${API_DIR} && \
mvn -U -C \
-Poss-release,staging -DskipTests \
......@@ -112,11 +91,9 @@ echo '-[ Deploy artifacts to staging repository ]-----------------------------'
clean ${MVN_DEPLOY_ARGS})
echo '-[ Tag release ]----------------------------------------------------------------'
git tag "${RELEASE_TAG}" -m "JSON-B Specification and API release"
git tag "${RELEASE_TAG}" -m "JSON-B API ${API_RELEASE_VERSION} release"
# Set next release cycle snapshot version
echo '-[ SPEC next snapshot version ]-------------------------------------------------'
set_version 'SPEC' "${SPEC_DIR}" "${SPEC_NEXT_SNAPSHOT}" "${SPEC_GROUP_ID}" "${SPEC_ARTIFACT_ID}" ''
echo '-[ API next snapshot version ]--------------------------------------------------'
set_version 'API' "${API_DIR}" "${API_NEXT_SNAPSHOT}" "${API_GROUP_ID}" "${API_ARTIFACT_ID}" ''
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment