-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IJMP-1873 Kotlin SDK docs update + license header update + GitHub Act…
…ions build workflow Signed-off-by: Uladzislau <[email protected]>
- Loading branch information
Showing
138 changed files
with
1,700 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build + Test + Sonar | ||
|
||
on: [push, workflow_dispatch] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build_and_test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 40 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
token: ${{ secrets.ZOWE_ROBOT_TOKEN }} | ||
|
||
- uses: ./.github/actions/setup | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build | ||
|
||
- name: Prepare lib Artifact | ||
id: artifact | ||
shell: bash | ||
run: | | ||
cd ${{ github.workspace }}/build/libs | ||
FILENAME=`ls | grep -vE '(-javadoc|-sources)\.jar$'` | ||
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT | ||
echo "zip artifact name:" | ||
echo "$FILENAME" | ||
- name: Publish built lib to artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ steps.artifact.outputs.filename }} | ||
path: ./build/libs/* | ||
|
||
- name: Test with Gradle | ||
run: ./gradlew test | ||
|
||
- name: Publish tests result to artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: tests-report-${{ steps.artifact.outputs.filename }} | ||
path: ${{ github.workspace }}/build/reports/* | ||
|
||
- name: Publish results to SonarCloud | ||
run: > | ||
./gradlew --info sonar -Dresults="build/reports/tests/test,build/test-results" | ||
-Psonar.host.url=$SONAR_HOST_URL -Dsonar.token=$SONAR_TOKEN | ||
-Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_PASSWORD | ||
-Dsonar.coverage.jacoco.xmlReportPaths="build/reports/jacoco.xml" | ||
env: | ||
ARTIFACTORY_USE RNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: ./.github/actions/teardown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,17 @@ | |
name: Release new binary version manually | ||
|
||
on: | ||
# push: | ||
# branches: [ main ] | ||
# pull_request: | ||
# branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
changelog-and-preparations: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 40 | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
token: ${{ secrets.ZOWE_ROBOT_TOKEN }} | ||
|
@@ -24,22 +22,114 @@ jobs: | |
- name: Build with Gradle | ||
run: ./gradlew build | ||
|
||
- name: Fetch Gradle properties | ||
id: properties | ||
shell: bash | ||
run: | | ||
PROPERTIES="$(./gradlew properties --console=plain -q)" | ||
VERSION_FULL="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" | ||
CURR_COMMIT="$(git rev-parse HEAD)" | ||
echo "versionSemVer: $VERSION_FULL" | ||
echo "currCommit: $CURR_COMMIT" | ||
echo "versionSemVer=$VERSION_FULL" >> $GITHUB_OUTPUT | ||
echo "currCommit=$CURR_COMMIT" >> $GITHUB_OUTPUT | ||
- name: Clean git | ||
run: git reset --hard HEAD | ||
|
||
- name: Set email | ||
run: git config user.email "[email protected]" | ||
- name: Set email and user name | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "For Mainframe" | ||
# - name: Release with Gradle automatic | ||
# run: ./gradlew release -x test -x updateVersion -x commitNewVersion -Prelease.useAutomaticVersion=true -Prelease.scope=${{ github.event.inputs.scope || env.DEFAULT_SCOPE }} -Pzowe.deploy.username=$ARTIFACTORY_USERNAME -Pzowe.deploy.password=$ARTIFACTORY_PASSWORD -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_USERNAME | ||
# env: | ||
# ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
# ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
# DEFAULT_SCOPE: 'patch' | ||
# BUILD_NUMBER: ${{ github.run_number }} | ||
# BRANCH_NAME: ${{ github.ref_name }} | ||
|
||
- name: Prepare changelog | ||
shell: bash | ||
run: ./gradlew patchChangelog | ||
|
||
- name: Prepare release notes | ||
id: release_notes | ||
shell: bash | ||
run: | | ||
CHANGELOG="$(./gradlew getChangelog -q)" | ||
echo 'version_release_notes<<EOF' >> $GITHUB_OUTPUT | ||
echo "$CHANGELOG" >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
echo "Release notes to be added:" | ||
echo "$CHANGELOG" | ||
- name: Create new release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release create ${{ steps.properties.outputs.versionSemVer }} --title ${{ steps.properties.outputs.versionSemVer }} --target ${{ steps.properties.outputs.currCommit }} -F- <<EOF | ||
${{ steps.release_notes.outputs.version_release_notes }} | ||
EOF | ||
- name: Upload Release Built Artifact | ||
continue-on-error: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh release upload ${{ steps.properties.outputs.versionSemVer }} ./build/libs/* | ||
|
||
- name: Bump version in gradle.properties | ||
run: | | ||
# Read current version in gradle.properties | ||
current_version=$(grep -E "^version=" gradle.properties | cut -d'=' -f2) | ||
echo "Current version: $current_version" | ||
# Splitting the prefix and the last number | ||
prefix=$(echo "$current_version" | sed 's/[0-9]*$//') # Leave prefix without the last number | ||
last_number=$(echo "$current_version" | grep -oE '[0-9]+$') # Fetching the number | ||
new_number=$((last_number + 1)) | ||
new_version="${prefix}${new_number}" | ||
echo "New version: $new_version" | ||
# Update version in gradle.properties | ||
sed -i "s/^version=.*/version=${new_version}/" gradle.properties | ||
echo "gradle.properties after change:" | ||
cat gradle.properties | ||
- name: Create branch with CHANGELOG changes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
VERSION="${{ steps.properties.outputs.versionSemVer }}" | ||
BRANCH="release-changelog-update-$VERSION" | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Action" | ||
- name: Set name | ||
run: git config user.name "For Mainframe" | ||
git checkout -b $BRANCH | ||
git add gradle.properties | ||
# No need to change CHANGELOG in -rc. builds | ||
if [[ "$VERSION" == *"-rc"* ]]; then | ||
git restore CHANGELOG.md | ||
fi | ||
git commit -am ":moyai: ${VERSION}" -m "[skip ci]" | ||
git push --set-upstream origin $BRANCH | ||
- name: Release with Gradle automatic | ||
run: ./gradlew release -x test -x updateVersion -x commitNewVersion -Prelease.useAutomaticVersion=true -Prelease.scope=${{ github.event.inputs.scope || env.DEFAULT_SCOPE }} -Pzowe.deploy.username=$ARTIFACTORY_USERNAME -Pzowe.deploy.password=$ARTIFACTORY_PASSWORD -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_USERNAME | ||
- name: Close Milestone | ||
continue-on-error: true | ||
env: | ||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
DEFAULT_SCOPE: 'patch' | ||
BUILD_NUMBER: ${{ github.run_number }} | ||
BRANCH_NAME: ${{ github.ref_name }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh api repos/{owner}/{repo}/milestones \ | ||
--jq '.[] | select(.title == "${{ steps.properties.outputs.versionSemVer }}") | .number' \ | ||
| xargs -I '{}' gh api -X PATCH repos/{owner}/{repo}/milestones/{} -F state='closed' | ||
- uses: ./.github/actions/teardown |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
_site | ||
.sass-cache | ||
.jekyll-cache | ||
.jekyll-metadata | ||
vendor | ||
.idea | ||
.idea/*.xml | ||
.idea/*.iml | ||
.idea/modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,30 @@ | ||
# Zowe Client Kotlin SDK Changelog | ||
|
||
All notable changes to the Zowe Kotlin SDK will be documented in this file. | ||
All notable changes to the Zowe Client Kotlin SDK will be documented in this file. | ||
|
||
## `0.4.0 (2023-03-07)` | ||
## [Unreleased] | ||
|
||
### Features | ||
|
||
* Feature: Added BYTES, KILOBYTES and MEGABYTES to Dataset class ([7f0d087a](https://github.com/zowe/zowe-client-kotlin-sdk/commit/7f0d087a)) | ||
* Feature: Added "failOnPrompt" parameter to the "issueTsoCommand" function ([b6903eb5](https://github.com/zowe/zowe-client-kotlin-sdk/commit/b6903eb5)) | ||
* Feature: Added responses validator ([c659e038](https://github.com/zowe/zowe-client-kotlin-sdk/commit/c659e038)) | ||
* Feature: Migrated "build.gradle" to "build.gradle.kts" ([f9eefc83](https://github.com/zowe/zowe-client-kotlin-sdk/commit/f9eefc83)) | ||
* Feature: Added "saveNewSecureProperties" function ([7c81c2a6](https://github.com/zowe/zowe-client-kotlin-sdk/commit/7c81c2a6)) | ||
* Feature: Added "executeTsoCommand" function to TsoApi ([c7fcb97b](https://github.com/zowe/zowe-client-kotlin-sdk/commit/c7fcb97b)) | ||
* Feature: Added parsing of nested profiles of Zowe Team Config v2 ([3ce259b8](https://github.com/zowe/zowe-client-kotlin-sdk/commit/3ce259b8)) | ||
|
||
### Bugfixes | ||
|
||
* Bugfix: Fix for Windows credentials store ([4db02f88](https://github.com/zowe/zowe-client-kotlin-sdk/commit/4db02f88)) | ||
|
||
## [0.4.0] (2023-03-07) | ||
|
||
### Features | ||
|
||
* Feature: GitHub issue #3: Zowe Kotlin SDK: Java-like Kotlin API ([56788c1a](https://github.com/zowe/zowe-client-kotlin-sdk/commit/56788c1a)) | ||
* Feature: Implement ZosUssFile (copying methods - from uss to dsn and to uss folder) ([2bb0b257](https://github.com/zowe/zowe-client-kotlin-sdk/commit/2bb0b257)) | ||
|
||
### Bugfixes | ||
|
||
* Bugfix: GitHub issue #9: Error Creating Connection ([bbc16d72](https://github.com/zowe/zowe-client-kotlin-sdk/commit/bbc16d72)) |
Oops, something went wrong.