Skip to content

build: update travis configuration #27

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

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
language: java
dist: bionic
dist: jammy

jdk:
- openjdk11
Expand Down Expand Up @@ -29,8 +29,7 @@ stages:

before_install:
- sudo apt-get update
- env | grep TRAVIS
- pyenv global 3.8
- echo -e "machine github.ibm.com\n login $GITHUB_ACCESS_TOKEN" > ~/.netrc

jobs:
include:
Expand All @@ -48,7 +47,9 @@ jobs:

- stage: Semantic-Release
install:
- nvm install 14
- nvm install 18
- node --version
- npm --version
- npm install
- pip install --user bump2version
script:
Expand Down
7 changes: 4 additions & 3 deletions build/generateJavadocIndex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ echo '<!DOCTYPE html>
| <a href="https://github.com/IBM/ibm-iae-java-sdk">GitHub</a>
</p>

<p>Javadoc by branch/release:</p>
<ul><li><a href="docs/latest">Latest</a></li>'
ls docs | grep --invert-match index.html | sed 's/^.*/<li><a href="docs\/&">&<\/a><\/li>/'
<p>Javadoc by release:</p>
<ul>'
echo ${TRAVIS_BRANCH} | sed 's/^.*/ <li><a href="docs\/&">Latest release<\/a><\/li>/'
ls docs | grep --invert-match index.html | sed 's/^.*/ <li><a href="docs\/&">&<\/a><\/li>/'
echo ' </ul>
</div>
</body>
Expand Down
21 changes: 5 additions & 16 deletions build/publishJavadoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# The javadocs are committed and pushed to the git repository's gh-pages branch.
# Be sure to customize this file to reflect your SDK project's settings (git url,

# Avoid publishing javadocs for a PR build
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" ]; then
# Publish javadocs only for a tagged-release.
if [[ -n "${TRAVIS_TAG}" ]]; then

printf "\n>>>>> Publishing javadoc for release build: repo=%s branch=%s build_num=%s job_num=%s\n" ${TRAVIS_REPO_SLUG} ${TRAVIS_BRANCH} ${TRAVIS_BUILD_NUMBER} ${TRAVIS_JOB_NUMBER}

Expand All @@ -15,31 +15,20 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" ]; then

printf "\n>>>>> Finished cloning...\n"


pushd gh-pages

# Create a new directory for this branch/tag and copy the aggregated javadocs there.
printf "\n>>>>> Copying aggregated javadocs to new tagged-release directory: %s\n" ${TRAVIS_BRANCH}
# Create a new directory for this branch/tag and copy the javadocs there.
printf "\n>>>>> Copying javadocs to new directory: docs/%s\n" ${TRAVIS_BRANCH}
rm -rf docs/${TRAVIS_BRANCH}
mkdir -p docs/${TRAVIS_BRANCH}
cp -rf ../target/site/apidocs/* docs/${TRAVIS_BRANCH}

printf "\n>>>>> Generating gh-pages index.html...\n"
../build/generateJavadocIndex.sh > index.html

# Update the 'latest' symlink to point to this branch if it's a tagged release.
if [ -n "$TRAVIS_TAG" ]; then
pushd docs
rm latest
ln -s ./${TRAVIS_TAG} latest
printf "\n>>>>> Updated 'docs/latest' symlink:\n"
ls -l latest
popd
fi

printf "\n>>>>> Committing new javadoc...\n"
git add -f .
git commit -m "Javadoc for release ${TRAVIS_TAG} (${TRAVIS_COMMIT})"
git commit -m "docs: latest javadoc for ${TRAVIS_BRANCH} (${TRAVIS_COMMIT})"
git push -f origin gh-pages

popd
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
"description": "This package.json is being used to manage semantic-release and its dependencies",
"license": "Apache-2.0",
"devDependencies": {
"semantic-release": "19.0.5",
"@semantic-release/changelog": "6.0.2",
"semantic-release": "21.0.7",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/exec": "6.0.3",
"@semantic-release/git": "10.0.1"
},
"overrides": {
"semver": "^7.5.3"
},
"scripts": {
"semantic-release": "semantic-release"
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
of the SDK generator used to generate your SDK code.
See this link for details: https://github.ibm.com/CloudEngineering/openapi-sdkgen/wiki/Compatibility-Chart
-->
<sdk-core-version>9.17.5</sdk-core-version>
<sdk-core-version>9.19.0</sdk-core-version>

<!-- >>> Replace this with the name of your SDK's github repository -->
<git-repository-name>ibm-iae-java-sdk</git-repository-name>
Expand Down
2 changes: 1 addition & 1 deletion scripts/templates/parent-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<!-- This is the version associated with the Java core. The version used
here should be compatible with the version of the SDK generator used to generate
your SDK code. See this link for details: https://github.ibm.com/CloudEngineering/openapi-sdkgen/wiki/Compatibility-Chart -->
<sdk-core-version>9.17.5</sdk-core-version>
<sdk-core-version>9.19.0</sdk-core-version>

<!-- >>> Replace this with the name of your SDK's github repository -->
<git-repository-name>my-services-java-sdk</git-repository-name>
Expand Down