Skip to content

Commit

Permalink
Nightly build fix - Jenkins pipeline (#1704)
Browse files Browse the repository at this point in the history
This fix related with #1703 and etc/jenkins/build.groovy pipeline. Due security reason "Publish to nightly" stage is executed under different container, than EclipseLink build and tests. There should be Maven, but in different version, than el-buildcontainer used for a build and tests.

Signed-off-by: Radek Felcman radek.felcman@oracle.com
  • Loading branch information
rfelcman committed Sep 14, 2022
1 parent e081108 commit fd9e4ec
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
10 changes: 10 additions & 0 deletions etc/jenkins/build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,16 @@ spec:
}
}
}
// Prepare artifacts to nightly
stage('Prepare to nightly') {
steps {
container('el-build') {
sh """
etc/jenkins/prepare_nightly.sh
"""
}
}
}
// Publish to nightly
stage('Publish to nightly') {
steps {
Expand Down
25 changes: 25 additions & 0 deletions etc/jenkins/prepare_nightly.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash -e
#
# Copyright (c) 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
# http://www.eclipse.org/org/documents/edl-v10.php.
#
# SPDX-License-Identifier: BSD-3-Clause

#
# Arguments:
# N/A

echo '-[ EclipseLink Nightly Build Preparation ]-----------------------------------------------------------'

if [ ${CONTINUOUS_BUILD} = "true" ]; then
echo '-[ EclipseLink Continuous Build -> No preparing any artifacts]-------------------------------'
else
echo '-[ EclipseLink Prepare Artifacts to Nightly ]-----------------------------------------------------------'
mvn -V -B clean package -f bundles/nightly/pom.xml
fi



3 changes: 1 addition & 2 deletions etc/jenkins/publish_nightly.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e
#
# 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 @@ -16,6 +16,5 @@ if [ ${CONTINUOUS_BUILD} = "true" ]; then
echo '-[ EclipseLink Continuous Build -> No publishing any artifacts]-------------------------------'
else
echo '-[ EclipseLink Publish to Nightly ]-----------------------------------------------------------'
mvn -V -B clean package -f bundles/nightly/pom.xml
scp -r $WORKSPACE/bundles/nightly/target/nightlybuild/* genie.eclipselink@projects-storage.eclipse.org:$BUILD_RESULTS_TARGET_DIR
fi

0 comments on commit fd9e4ec

Please sign in to comment.