Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRE-6187 - Migrate Spinner to liferay-lxc repository #295

Closed
wants to merge 140 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
f0c7f5e
2024.q2.7
natocesarrego Aug 1, 2024
a359fe2
LPD-30119 Add generate_javadocs function to the package release process
kiwm Aug 1, 2024
9fd0785
LPD-30119 Wordsmith
brianchandotcom Aug 5, 2024
85dc5c5
LPD-31859 Add prepare next release branch function
kiwm Jul 23, 2024
bc25d25
LPD-31859 Wordsmith
natocesarrego Jul 25, 2024
58b4617
LPD-31859 Rename
natocesarrego Jul 25, 2024
b8cf204
LPD-31859 Optimize
natocesarrego Jul 25, 2024
00e7687
LPD-31859 Fix regex
natocesarrego Jul 25, 2024
4de2d34
LPD-31859 Getting the latest quarterly product version from the
kiwm Jul 26, 2024
dee9e26
LPD-31859 SF
natocesarrego Aug 2, 2024
276c343
LPD-31859 SF/Rename
brianchandotcom Aug 5, 2024
6c380b4
LPD-31859 Wordsmith
brianchandotcom Aug 5, 2024
b20eb7c
LPD-31859 Wordsmith
brianchandotcom Aug 5, 2024
9f103ca
LPD-31468 Set git links based on LIFERAY_RELEASE_PRODUCT_NAME variable
Wykenz Jul 16, 2024
e394ae4
LPD-31468 Rename
natocesarrego Jul 29, 2024
e71f464
LPD-31468 Move code to reuse in new tests
natocesarrego Jul 29, 2024
399a2ef
LPD-31468 Use colors to highlight tests results
natocesarrego Jul 29, 2024
958405a
LPD-31468 Simplify usage of function assert_equals
natocesarrego Jul 31, 2024
4414d2f
LPD-31468 Add support to files comparison in function assert_equals
natocesarrego Jul 31, 2024
a3662ce
LPD-31468 Add test to cover generation of BOM Compile Only
natocesarrego Jul 31, 2024
81689c0
LPD-31468 Add test to cover generation of BOM Third Party
natocesarrego Jul 31, 2024
abfd22e
LPD-31468 SF
natocesarrego Jul 31, 2024
067f859
LPD-31468 Sublime sort
brianchandotcom Aug 5, 2024
f04b1da
LPD-31468 Sublime sort
brianchandotcom Aug 5, 2024
9969df2
LPD-31468 Follow our Java pattern
brianchandotcom Aug 5, 2024
82948fc
LPD-31468 Sort
brianchandotcom Aug 5, 2024
1418bc0
LPD-31468 Rename
brianchandotcom Aug 5, 2024
1c3f6d1
u125
natocesarrego Aug 6, 2024
fc537c3
2024.q2.8
natocesarrego Aug 6, 2024
643b981
LPD-30139 Add the dependencies.jar for 7.3 package releases
kiwm Aug 6, 2024
6c65083
LPD-30139 Optimize
natocesarrego Aug 7, 2024
37b0875
LPD-30139 Impossible to print anything with 'rm -fr' right?
brianchandotcom Aug 7, 2024
7bfee20
LPD-30139 SF
brianchandotcom Aug 7, 2024
cffa543
LPD-27597 Fix boms generation when releasing 7.3
lucasmiranda0 Aug 7, 2024
b934d5d
LPD-29676 Add support to GA/Portal versions and add support to intern…
kiwm Jul 18, 2024
016e616
LPD-29676 Do not download bundle from CDN to prevent issues
natocesarrego Jul 25, 2024
6dae613
LPD-29676 SF
natocesarrego Aug 8, 2024
46768d6
LPD-29676 Sublime sort
brianchandotcom Aug 8, 2024
3c45d54
LPD-30139 Using 'cp' instead of an 'mv'
kiwm Aug 8, 2024
a7a20c9
DOCKER-249 Ensure that all needed modules are loaded before reporting…
zsoltbalogh May 13, 2024
271affc
DOCKER-249 Sort
natocesarrego Aug 8, 2024
99326c5
DOCKER-249 SF
natocesarrego Aug 8, 2024
c187217
DOCKER-249 Sort
brianchandotcom Aug 8, 2024
4eff114
DOCKER-249 local
brianchandotcom Aug 8, 2024
5cfce46
DOCKER-249 SF
brianchandotcom Aug 8, 2024
8628596
DOCKER-249 Wordsmith
brianchandotcom Aug 8, 2024
e3a8e25
LRP-4868 Add add_fixed_issues_to_project_version function
kiwm May 17, 2024
c7de3d1
LRP-4868 Rename
natocesarrego Jul 11, 2024
325604a
LRP-4868 Rename
brianchandotcom Jul 17, 2024
408e422
LRP-4868 SF
brianchandotcom Jul 17, 2024
ddaf4c8
LRP-4868 Fix naming inconsistencies
kiwm Jul 17, 2024
292540d
LRP-4868 Using if instead of case
kiwm Jul 17, 2024
a25ee03
LRP-4868 Using patcher_project_version instead of project_version
kiwm Aug 6, 2024
fd11afc
LRP-4868 SF
natocesarrego Aug 8, 2024
b7a40db
LRP-4868 Enable Patcher Project Version creation
natocesarrego Aug 7, 2024
e38a2d0
LRP-4868 SF
natocesarrego Aug 8, 2024
47ebece
LRP-4868 Wordsmith
brianchandotcom Aug 8, 2024
7de806b
LRP-4868 Sort
brianchandotcom Aug 8, 2024
2ab82db
LRP-4868 SF
brianchandotcom Aug 8, 2024
0b06b24
LRP-4868 Sort
brianchandotcom Aug 8, 2024
e2323ad
LRP-4868 Wordsmith
brianchandotcom Aug 8, 2024
c252f29
LRP-4868 Wordsmith
brianchandotcom Aug 8, 2024
aa512a6
SRE-6066 Fix Spinner's build_service_liferay to work with new branchi…
pedropaccola Jul 29, 2024
c9dc052
SRE-6066 Make it backwards compatible
pedropaccola Jul 30, 2024
75271e2
SRE-6066 SF
zsoltbalogh Aug 1, 2024
94e85fc
SRE-6066 Rename retrieve_descriptor_data
pedropaccola Aug 5, 2024
67bb164
SRE-6066 SF
natocesarrego Aug 7, 2024
ab8662f
SRE-6066 validate if in master branch on check_usage
pedropaccola Aug 8, 2024
c80c963
LPD-30133 Generating the client resources zip for the 7.3 package rel…
kiwm Aug 8, 2024
f1b1344
LPD-30133 Sort
brianchandotcom Aug 12, 2024
6928b1a
2024.q2.9
natocesarrego Aug 13, 2024
e789b1c
7.0.1 change log
natocesarrego Aug 13, 2024
1d97659
DOCKER-256 Make symbolic link target support JDK 21
natocesarrego Aug 14, 2024
9c70455
DOCKER-256 Rename
brianchandotcom Aug 14, 2024
9593e42
DOCKER-256 Can you verify that this works
brianchandotcom Aug 14, 2024
e69ac33
7.0.2 change log
brianchandotcom Aug 14, 2024
37ad61d
Revert "LPD-29676 Do not download bundle from CDN to prevent issues"
brianchandotcom Aug 14, 2024
c1d0267
LPD-32530 Remove unintended content in bundles folder
lucasmiranda0 Aug 14, 2024
15399ce
LPD-32530 SF
natocesarrego Aug 14, 2024
e9d90ce
LPD-32530 SF
brianchandotcom Aug 14, 2024
4678213
LPD-32530 Bash does not delete everything if * is between parentheses
lucasmiranda0 Aug 14, 2024
8618f42
Use development mode for nightly (once a week) to rebuild everything)
brianchandotcom Aug 15, 2024
cee896c
LRP-4868 Downloading the release-notes.txt instead of using local file
kiwm Aug 14, 2024
3a6195a
LRP-4868 Skipping the add patcher project version step for ga releases
kiwm Aug 14, 2024
fb46da1
LRP-4868 Setting different nomenclature for 7.3 releases
kiwm Aug 14, 2024
cf8402d
LRP-4868 Using the HTTP response code to check if the curl was succes…
kiwm Aug 14, 2024
a3f253c
LPD-32745 Add missing TLDs to api-jar
lucasmiranda0 Aug 9, 2024
7299bda
LPD-32745 As used
brianchandotcom Aug 15, 2024
8d8ff0c
LPD-32745 SF
brianchandotcom Aug 15, 2024
cedb6af
LPD-32745 SF
brianchandotcom Aug 15, 2024
eb48a49
LPD-32745 Create resources folder to copy files to it afterwards
lucasmiranda0 Aug 16, 2024
303af11
LPD-32745 SF
brianchandotcom Aug 16, 2024
54b70fb
DOCKER-257 - curl --fail docker preventing container from getting live
wagnersantana Aug 16, 2024
f90bf47
DOCKER-257 Remove EOL
brianchandotcom Aug 16, 2024
d74ff74
7.0.3 change log
brianchandotcom Aug 16, 2024
fec116e
DOCKER-258 - Revert DOCKER-257
wagnersantana Aug 19, 2024
07076f7
LPD-32411 Publish distro BOM .pom file when publishing a new release
natocesarrego Jul 25, 2024
3e62a66
LPD-32411 Publish distro BOM .jar file when publishing a new release
natocesarrego Jul 25, 2024
13a0662
LPD-32411 Add test to cover promotion of distro BOMs
lucasmiranda0 Aug 22, 2024
64f5d39
LPD-32410 Fixing issue where the previous release should not keep the…
kiwm Aug 19, 2024
385ef4e
LPD-32410 Adding test for process_new_product
kiwm Aug 19, 2024
64382c9
LPD-32410 Sort
brianchandotcom Aug 22, 2024
09dfe82
LPD-24539 Move invoke_github_api to _github.sh
lucasmiranda0 Aug 19, 2024
df2eddc
LPD-24539 Create test for GitHub tag creation
lucasmiranda0 Aug 21, 2024
e20d637
LPD-24539 Add script to run all tests
lucasmiranda0 Aug 21, 2024
32096fb
LPD-24539 Create a GitHub Action to run tests related to release scripts
lucasmiranda0 Aug 21, 2024
d63bbfe
LPD-24539 Cover the possibility of a fail assertion among success ass…
lucasmiranda0 Aug 21, 2024
6724d39
LPD-24539 Skip the test if liferay-portal-ee does not exist
lucasmiranda0 Aug 21, 2024
1186447
LPD-24539 Wordsmith
brianchandotcom Aug 22, 2024
2c767df
LPD-24539 Add local
brianchandotcom Aug 22, 2024
4cbb1b0
LPD-24539 Rename
brianchandotcom Aug 22, 2024
4db9641
2024.q2.10
natocesarrego Aug 23, 2024
f315426
7.0.4 change log
natocesarrego Aug 23, 2024
181faad
LPD-31859 Not using the cached file
kiwm Aug 23, 2024
c01229f
LPD-31859 Fix typo
natocesarrego Aug 23, 2024
a62cba0
LPD-34371 Fixing the target platform version on release.properties fo…
kiwm Aug 21, 2024
1631544
LPD-34371 Adding test for generate_release_properties_file
kiwm Aug 22, 2024
eab6f9a
u126
natocesarrego Aug 27, 2024
9e85518
2024.q2.11
natocesarrego Aug 28, 2024
ea4a61a
LPD-32410 Skip cache for download file
kiwm Aug 29, 2024
bc8470c
LPD-32530 Clean logs folder
lucasmiranda0 Aug 30, 2024
c3f176e
LPD-31467 Validate the type of artifact before trying to download it
lucasmiranda0 Aug 27, 2024
d2b7823
LPD-31467 Check if folder exists
lucasmiranda0 Aug 27, 2024
00c0996
LPD-31467 Remove duplication
lucasmiranda0 Aug 27, 2024
f893056
DOCKER-259 Batch image script fails when payload size is too big
rotty3000 Aug 30, 2024
56232c5
DOCKER-259 Rename and hard code it
brianchandotcom Aug 30, 2024
63755af
7.0.5 change log
brianchandotcom Aug 30, 2024
1e43ca0
LPD-34563 Fix issue that prevented the script from entering the if co…
kiwm Aug 27, 2024
faf21c0
LPD-34563 Add the releases content to GCP
kiwm Aug 27, 2024
a9bafa4
LPD-34563 More an info
brianchandotcom Aug 30, 2024
875c79d
Bump nightlies to 4 hours for now
brianchandotcom Aug 30, 2024
ddced01
SRE-6161 The 10_after_import.sql script should also delete the Analyt…
jorgediaz-lr Aug 23, 2024
1ad02db
SRE-6161 Delete the MFA settings in the same way it is done in the MO…
jorgediaz-lr Aug 23, 2024
76762ec
SRE-6161 As of 2024.Q2, 'Configuration_' is no longer a control table…
jorgediaz-lr Aug 23, 2024
a1c936e
SRE-6161 Sort
brianchandotcom Sep 4, 2024
0f115f7
2024.q2.12
natocesarrego Sep 5, 2024
0e37991
LRP-4868 Making the curls errors more meaningful
kiwm Sep 4, 2024
9d5adcc
LRP-4868 Changing the execution order of the release_gold
kiwm Sep 6, 2024
fc7c9d7
LRP-4868 SF
brianchandotcom Sep 9, 2024
bf0fcdd
SRE-6187 Migrate Spinner to liferay-lxc repository
ZoltanTakacs Sep 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
jobs:
release:
env:
LIFERAY_RELEASE_GITHUB_PAT: ${{ secrets.LIFERAY_RELEASE_GITHUB_PAT }}
if: (github.repository == 'natocesarrego/liferay-docker')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Execute run_tests.sh
run: |
cd release

./run_tests.sh
shell: bash
name: Release
on:
pull_request:
types: [opened, reopened]
35 changes: 35 additions & 0 deletions .releng/docker-image.changelog
Original file line number Diff line number Diff line change
Expand Up @@ -1068,3 +1068,38 @@ docker.image.git.id-6.0.0=ca10bd5d0abeae4e45b35a088595fb629b739070

docker.image.change.log-7.0.0=DOCKER-255 DOCKER-252
docker.image.git.id-7.0.0=b0f66de42ec364ab56be96091dbdad37e3d02d11

#
# Liferay Docker Image Version 7.0.1
#

docker.image.change.log-7.0.1=DOCKER-249
docker.image.git.id-7.0.1=6928b1afa32f89b10e1892c52a287a7e965de52e

#
# Liferay Docker Image Version 7.0.2
#

docker.image.change.log-7.0.2=DOCKER-256
docker.image.git.id-7.0.2=9593e425d466068cef5d0c3271b87d69fdfeebb0

#
# Liferay Docker Image Version 7.0.3
#

docker.image.change.log-7.0.3=DOCKER-257
docker.image.git.id-7.0.3=f90bf478c9bda90a5727e27f3a90f34a701e405f

#
# Liferay Docker Image Version 7.0.4
#

docker.image.change.log-7.0.4=DOCKER-258
docker.image.git.id-7.0.4=4db964182c3510b2918d456a3ba4aeb06a3b97d2

#
# Liferay Docker Image Version 7.0.5
#

docker.image.change.log-7.0.5=DOCKER-259
docker.image.git.id-7.0.5=56232c5444c9df9259b09bbfb9971d85145f3736
10 changes: 7 additions & 3 deletions build_nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ while true
do
git pull origin master

LIFERAY_DOCKER_IMAGE_FILTER=7.4.13.nightly ./build_all_images.sh --push

if [ $(date +%w) == 0 ]
then
docker system prune --all --force

git clean -dfx

LIFERAY_DOCKER_DEVELOPER_MODE=true LIFERAY_DOCKER_IMAGE_FILTER=7.4.13.nightly ./build_all_images.sh --push
else
LIFERAY_DOCKER_IMAGE_FILTER=7.4.13.nightly ./build_all_images.sh --push
fi

echo ""
echo `date`
echo ""

sleep 1d
sleep 4h
done
8 changes: 8 additions & 0 deletions bundles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,8 @@
7.4.13-u122:
7.4.13-u123:
7.4.13-u124:
7.4.13-u125:
7.4.13-u126:
7.4.13.nightly:
bundle_url: releases-cdn.liferay.com/dxp/nightly/liferay-dxp-tomcat-7.4.13.nightly.7z
quarterly:
Expand Down Expand Up @@ -729,6 +731,12 @@ quarterly:
2024.q2.4:
2024.q2.5:
2024.q2.6:
2024.q2.7:
2024.q2.8:
2024.q2.9:
2024.q2.10:
2024.q2.11:
2024.q2.12:
latest: true
snapshot:
snapshot-master:
Expand Down
112 changes: 100 additions & 12 deletions release/_bom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function generate_api_jars {
for artifact in ${enforce_version_artifacts}
do
if (! echo "${artifact}" | grep -q "com.fasterxml") &&
(! echo "${artifact}" | grep -q "com.liferay.alloy-taglibs:alloy-taglib:") &&
(! echo "${artifact}" | grep -q "com.liferay.alloy-taglibs:alloy-taglib:") &&
(! echo "${artifact}" | grep -q "com.liferay.portletmvc4spring:com.liferay.portletmvc4spring.test:") &&
(! echo "${artifact}" | grep -q "com.liferay:biz.aQute.bnd.annotation:") &&
Expand All @@ -50,13 +49,16 @@ function generate_api_jars {
local name=$(echo "${artifact}" | sed -e "s/.*:\(.*\):.*/\\1/")
local version=${artifact##*:}

lc_log INFO "Downloading and unzipping https://repository-cdn.liferay.com/nexus/content/groups/public/${group_path}/${name}/${version}/${name}-${version}-sources.jar."
if (! echo "${artifact}" | grep -q "com.liferay.alloy-taglibs:alloy-taglib:")
then
lc_log INFO "Downloading and unzipping https://repository-cdn.liferay.com/nexus/content/groups/public/${group_path}/${name}/${version}/${name}-${version}-sources.jar."

lc_download "https://repository-cdn.liferay.com/nexus/content/groups/public/${group_path}/${name}/${version}/${name}-${version}-sources.jar" "${name}-${version}-sources.jar"
lc_download "https://repository-cdn.liferay.com/nexus/content/groups/public/${group_path}/${name}/${version}/${name}-${version}-sources.jar" "${name}-${version}-sources.jar"

unzip -d api-sources-jar -o -q "${name}-${version}-sources.jar"
unzip -d api-sources-jar -o -q "${name}-${version}-sources.jar"

rm -f "${name}-${version}-sources.jar"
rm -f "${name}-${version}-sources.jar"
fi

lc_log INFO "Downloading and unzipping https://repository-cdn.liferay.com/nexus/content/groups/public/${group_path}/${name}/${version}/${name}-${version}.jar."

Expand All @@ -67,15 +69,64 @@ function generate_api_jars {
rm -f "${name}-${version}.jar"
done

for portal_jar in portal-impl portal-kernel support-tomcat util-bridges util-java util-slf4j util-taglib
do
_manage_bom_jar "${_BUNDLES_DIR}/tomcat/webapps/ROOT/WEB-INF/shielded-container-lib/${portal_jar}.jar"
done
if [[ "${_PRODUCT_VERSION}" == "7.3."* ]]
then
for portal_jar in portal-kernel support-tomcat
do
_manage_bom_jar "${_BUNDLES_DIR}/tomcat/lib/ext/${portal_jar}.jar"
done

for portal_jar in portal-impl util-bridges util-java util-slf4j util-taglib
do
_manage_bom_jar "${_BUNDLES_DIR}/tomcat/webapps/ROOT/WEB-INF/lib/${portal_jar}.jar"
done

find "${_BUNDLES_DIR}/osgi" "${_BUNDLES_DIR}/tomcat/lib/ext" "${_BUNDLES_DIR}/tomcat/webapps/ROOT/WEB-INF/lib" -name "com.liferay.*.jar" -type f -print0 | while IFS= read -r -d '' module_jar
do
_manage_bom_jar "${module_jar}"
done

for artifact in "commons*.jar" "org.apache.commons.*.jar" "poi*.jar" "spring*.jar"
do
find "${_BUNDLES_DIR}/tomcat/webapps/ROOT/WEB-INF/lib" -name "${artifact}" -type f -print0 | while IFS= read -r -d '' module_jar
do
local module_jar_basename=$(basename "${module_jar}")

if (grep $(echo "${module_jar_basename%.jar}:") "${_PROJECTS_DIR}/liferay-portal-ee/lib/development/dependencies.properties" || grep $(echo "${module_jar_basename%.jar}:") "${_PROJECTS_DIR}/liferay-portal-ee/lib/portal/dependencies.properties")
then
_manage_bom_jar "${module_jar}"
fi
done
done
else
for portal_jar in portal-impl portal-kernel support-tomcat util-bridges util-java util-slf4j util-taglib
do
_manage_bom_jar "${_BUNDLES_DIR}/tomcat/webapps/ROOT/WEB-INF/shielded-container-lib/${portal_jar}.jar"
done

find "${_BUNDLES_DIR}/osgi" "${_BUNDLES_DIR}/tomcat/webapps/ROOT/WEB-INF/shielded-container-lib" -name "com.liferay.*.jar" -type f -print0 | while IFS= read -r -d '' module_jar
do
_manage_bom_jar "${module_jar}"
done
fi

find "${_BUNDLES_DIR}/osgi" "${_BUNDLES_DIR}/tomcat/webapps/ROOT/WEB-INF/shielded-container-lib" -name "com.liferay.*.jar" -type f -print0 | while IFS= read -r -d '' module_jar
for file in $(ls api-jar/META-INF --almost-all | grep --extended-regexp --invert-match '^(alloy-util.tld|alloy.tld|c.tld|liferay.tld)$')
do
_manage_bom_jar "${module_jar}"
if [[ "$file" == *.tld ]]
then
rm "api-jar/META-INF/${file}"
fi
done

_copy_tld "api-jar/META-INF" "liferay-*.tld" "ratings.tld"

mkdir -p api-jar/META-INF/resources

_copy_tld "api-jar/META-INF/resources" "liferay-application-list.tld" "liferay-data-engine.tld" "liferay-ddm.tld" "liferay-export-import-changeset.tld" "liferay-form.tld" "liferay-staging.tld" "liferay-template.tld" "react.tld" "soy.tld"

mkdir api-jar/META-INF/resources/WEB-INF

_copy_tld "api-jar/META-INF/resources/WEB-INF" "liferay-*.tld" "ratings.tld" "react.tld" "soy.tld"
}

function generate_api_source_jar {
Expand Down Expand Up @@ -108,6 +159,11 @@ function generate_api_source_jar {

local package_dir=$(dirname "${packageinfo_file}")

if [ ! -d "${package_dir}" ]
then
continue
fi

lc_log DEBUG "Copying ${package_dir} because it has a packageinfo."

_copy_source_package "${package_dir}"
Expand Down Expand Up @@ -144,6 +200,10 @@ function generate_distro_jar {
lc_cd "${_BUNDLES_DIR}/tomcat/bin"

./catalina.sh stop

rm -fr "${_BUNDLES_DIR}"/logs/*
rm -f "${_BUNDLES_DIR}/osgi/modules/biz.aQute.remote.agent-6.4.0.jar"
rm -fr "${_BUNDLES_DIR}"/tomcat/logs/*
}

function generate_pom_release_api {
Expand All @@ -167,6 +227,7 @@ function generate_pom_release_bom {
sed \
-e "s/__ARTIFACT_ID__/release.${LIFERAY_RELEASE_PRODUCT_NAME}.bom/" \
-e "s/__BUILD_TIMESTAMP__/${_BUILD_TIMESTAMP}/" \
-e "s/__GITHUB_REPOSITORY__/liferay-${LIFERAY_RELEASE_PRODUCT_NAME}/" \
-e "s/__PRODUCT_VERSION__/${_PRODUCT_VERSION}/" \
-e "w ${pom_file_name}" \
"${_RELEASE_TOOL_DIR}/templates/release.bom.pom.tpl" > /dev/null
Expand All @@ -178,7 +239,7 @@ function generate_pom_release_bom {
> /tmp/artifact_urls.txt

for artifact_file in $(
find "${_BUNDLES_DIR}/osgi" "${_BUNDLES_DIR}/tomcat/webapps/ROOT/WEB-INF" -name '*.jar' | \
find "${_BUNDLES_DIR}/osgi" "${_BUNDLES_DIR}/tomcat/lib/ext" "${_BUNDLES_DIR}/tomcat/webapps/ROOT/WEB-INF" -name '*.jar' | \
sed \
-e 's/\.jar$//' \
-e "s@.*/@@" \
Expand Down Expand Up @@ -229,6 +290,7 @@ function generate_pom_release_bom_compile_only {
sed \
-e "s/__ARTIFACT_ID__/release.${LIFERAY_RELEASE_PRODUCT_NAME}.bom.compile.only/" \
-e "s/__BUILD_TIMESTAMP__/${_BUILD_TIMESTAMP}/" \
-e "s/__GITHUB_REPOSITORY__/liferay-${LIFERAY_RELEASE_PRODUCT_NAME}/" \
-e "s/__PRODUCT_VERSION__/${_PRODUCT_VERSION}/" \
-e "s/__RELEASE_API_DEPENDENCY__/release.${LIFERAY_RELEASE_PRODUCT_NAME}.api/" \
-e "w ${pom_file_name}" \
Expand Down Expand Up @@ -261,6 +323,7 @@ function generate_pom_release_bom_third_party {
sed \
-e "s/__ARTIFACT_ID__/release.${LIFERAY_RELEASE_PRODUCT_NAME}.bom.third.party/" \
-e "s/__BUILD_TIMESTAMP__/${_BUILD_TIMESTAMP}/" \
-e "s/__GITHUB_REPOSITORY__/liferay-${LIFERAY_RELEASE_PRODUCT_NAME}/" \
-e "s/__PRODUCT_VERSION__/${_PRODUCT_VERSION}/" \
-e "w ${pom_file_name}" \
"${_RELEASE_TOOL_DIR}/templates/release.bom.third.party.pom.tpl" > /dev/null
Expand Down Expand Up @@ -364,6 +427,31 @@ function _copy_source_package {
cp -a "${1}" "${new_dir_name}"
}

function _copy_tld {
local arguments=""

local tlds=("${@:2}")

for tld in "${tlds[@]}"
do
if [ -n "${arguments}" ]
then
arguments+=" -o "
fi

arguments+="-name \"${tld}\""
done

for file in $(eval find "${_PROJECTS_DIR}" \
"${arguments}" -type f | \
awk -F "/" '{print $NF, $0}' | \
sort -k 1,1 -u | \
awk '{print $2}')
do
cp "${file}" "${1}"
done
}

function _manage_bom_jar {
lc_log DEBUG "Processing ${1} for api jar."

Expand Down
45 changes: 45 additions & 0 deletions release/_github.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

source _liferay_common.sh

function invoke_github_api_delete {
_invoke_github_api "${1}" "${2}" "DELETE"

echo $?
}

function invoke_github_api_post {
_invoke_github_api "${1}" "${2}" "POST"

echo $?
}

function _invoke_github_api {
if [ -z "${LIFERAY_RELEASE_REPOSITORY_OWNER}" ]
then
LIFERAY_RELEASE_REPOSITORY_OWNER=liferay
fi

local curl_response=$(\
curl \
"https://api.github.com/repos/${LIFERAY_RELEASE_REPOSITORY_OWNER}/${1}" \
--data "${2}" \
--fail \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer ${LIFERAY_RELEASE_GITHUB_PAT}" \
--header "X-GitHub-Api-Version: 2022-11-28" \
--include \
--max-time 10 \
--request "${3}" \
--retry 3 \
--silent)

if ! [[ $(echo "${curl_response}" | awk '/^HTTP/{print $2}') =~ ^2 ]]
then
echo "Unable to inkove GitHub API."

return "${LIFERAY_COMMON_EXIT_CODE_SKIPPED}"
fi

return "${LIFERAY_COMMON_EXIT_CODE_OK}"
}
Loading