Skip to content

Commit

Permalink
Jenkins release job update
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
  • Loading branch information
senivam authored and lukasj committed Feb 10, 2022
1 parent 0339eb7 commit c22d73a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions etc/jenkins/release.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -24,7 +24,7 @@ pipeline {
agent any

tools {
jdk 'openjdk-jdk11-latest'
jdk 'openjdk-jdk17-latest'
maven 'apache-maven-latest'
}

Expand Down
9 changes: 6 additions & 3 deletions etc/jenkins/release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -ex
#
# Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -24,6 +24,9 @@ export MAVEN_SKIP_RC="true"
. etc/scripts/maven.incl.sh
. etc/scripts/nexus.incl.sh

#Fix due to JDK 17/maven release plugin
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"

read_version 'API' "${API_DIR}"

if [ -z "${API_RELEASE_VERSION}" ]; then
Expand Down Expand Up @@ -52,7 +55,7 @@ else
fi
fi
echo '-[ Release tag cleanup ]--------------------------------------------------------'
if [[ -n `git ls-remote --tags ${GIT_ORIGIN} | grep "${RELEASE_TAG}"` ]]; then
if [[ -n `git ls-remote --tags ${GIT_ORIGIN} | grep "${RELEASE_TAG}\$"` ]]; then
if [ "${OVERWRITE}" = 'true' ]; then
echo "${RELEASE_TAG} tag already exists, deleting"
git push --delete origin "${RELEASE_TAG}" && true
Expand Down Expand Up @@ -92,7 +95,7 @@ echo '-[ Deploy artifacts to staging repository ]-----------------------------'
clean ${MVN_DEPLOY_ARGS})

echo '-[ Tag release ]----------------------------------------------------------------'
git tag "${RELEASE_TAG}" -m "JSON-B API ${API_RELEASE_VERSION} release"
git tag "${RELEASE_TAG}" -m "SAAJ API ${API_RELEASE_VERSION} release"

# Set next release cycle snapshot version
echo '-[ API next snapshot version ]--------------------------------------------------'
Expand Down
4 changes: 2 additions & 2 deletions etc/scripts/nexus.incl.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -12,7 +12,7 @@
# $2 - Build directory
drop_artifacts() {
echo '-[ Drop old staging repository deployments ]------------------------------------'
for staging_key in `(cd ${2} && mvn -B nexus-staging:rc-list | egrep "^\[INFO\] [A-Z,a-z,-]+-[0-9]+\s+[A-Z]+\s+${1}" | awk '{print $2}')`; do
for staging_key in `(cd ${2} && mvn -B nexus-staging:rc-list | egrep "^\[INFO\] [A-Z,a-z,-]+-[0-9]+\s+[A-Z]+\s+${1}\$" | awk '{print $2}')`; do
echo "Repository ID: ${staging_key}"
(cd ${2} && \
mvn -U -C \
Expand Down

0 comments on commit c22d73a

Please sign in to comment.