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

Update 20_snapshot-deployment.yml #12

Merged
merged 71 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
3b29b49
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
77612de
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
0c0566e
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
e6788db
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
0fcf8b4
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
5590f62
Update setup-idefix.sh
peterkir May 20, 2024
9bcca35
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
8fbedc7
Update setup-idefix.sh
peterkir May 20, 2024
39360db
Update setup-idefix.sh
peterkir May 20, 2024
d07bd0a
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
09fd1b3
Update toolchains.xml
peterkir May 20, 2024
83c2665
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
4229c4a
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
50cc6f9
improve doc
peterkir May 20, 2024
c85aa09
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
e46f63e
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
64a5725
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
93caa47
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
bd3e48f
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
909415f
Update 20_snapshot-deployment.yml
peterkir May 20, 2024
6b46b95
fixing release attachment
peterkir May 21, 2024
1dc6279
fixing release attachment
peterkir May 21, 2024
5c765ff
fixing release attachment
peterkir May 21, 2024
6b7a668
fixing release attachment
peterkir May 21, 2024
d80d123
fixing release attachment
peterkir May 21, 2024
3ac5c0f
fixing release attachment
peterkir May 21, 2024
cc3349a
fixing release attachment
peterkir May 21, 2024
bf9419b
fixing release attachment
peterkir May 21, 2024
9a8ba1b
fixing release attachment
peterkir May 21, 2024
1ddaa62
Update 20_snapshot-deployment.yml
peterkir May 21, 2024
9aa7fcb
fixing release attachment
peterkir May 21, 2024
ec1ed11
improve doc
peterkir May 21, 2024
3085619
Update 20_snapshot-deployment.yml
peterkir May 21, 2024
c79e86e
improve doc
peterkir May 21, 2024
5a70e5a
improve doc
peterkir May 21, 2024
05b8341
improve doc
peterkir May 21, 2024
91b673e
configure release
peterkir May 21, 2024
88eef3a
initial release
peterkir May 21, 2024
82afc2c
initial release
peterkir May 21, 2024
24e7220
initial release
peterkir May 21, 2024
dbae967
initial release
peterkir May 21, 2024
847d1a4
deploy snapshot/release
peterkir May 22, 2024
56c78e4
deploy snapshot/release
peterkir May 22, 2024
6ba45eb
deploy snapshot/release
peterkir May 22, 2024
1cb2dfc
deploy snapshot/release
peterkir May 22, 2024
f7825b7
deploy snapshot/release
peterkir May 22, 2024
05e7a29
deploy snapshot/release
peterkir May 22, 2024
1e127d8
deploy snapshot/release
peterkir May 22, 2024
61f6012
deploy snapshot/release
peterkir May 22, 2024
3fa209f
deploy snapshot/release
peterkir May 22, 2024
25ebd53
deploy snapshot/release
peterkir May 22, 2024
83b56d5
deploy snapshot/release
peterkir May 22, 2024
badc060
deploy snapshot/release
peterkir May 22, 2024
3dfd12e
deploy snapshot/release
peterkir May 22, 2024
7eb810e
deploy snapshot/release
peterkir May 22, 2024
061ff88
deploy snapshot/release
peterkir May 22, 2024
e8dea6d
deploy snapshot/release
peterkir May 22, 2024
9187fc5
deploy snapshot/release
peterkir May 22, 2024
3ded214
deploy snapshot/release
peterkir May 22, 2024
41ccf1c
deploy snapshot/release
peterkir May 22, 2024
8d112d1
deploy snapshot/release
peterkir May 22, 2024
e15c2c3
deploy snapshot/release
peterkir May 22, 2024
922fd3a
deploy snapshot/release
peterkir May 22, 2024
80dfb33
deploy snapshot/release
peterkir May 22, 2024
1600b43
deploy snapshot/release
peterkir May 22, 2024
85295b7
deploy snapshot/release
peterkir May 22, 2024
f04a158
deploy snapshot/release
peterkir May 22, 2024
712605f
deploy snapshot/release
peterkir May 22, 2024
7be4a97
deploy snapshot/release
peterkir May 22, 2024
04275c3
deploy snapshot/release
peterkir May 22, 2024
685080c
deploy snapshot/release
peterkir May 22, 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
49 changes: 31 additions & 18 deletions .github/workflows/10_build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,10 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
environment: dev
env:
REPOSILITE_ID: ${{ vars.REPOSILITE_ID }}
REPOSILITE_URL: ${{ vars.REPOSILITE_URL }}
REPOSILITE_USERNAME: ${{ secrets.REPOSILITE_USERNAME }}
REPOSILITE_TOKEN: ${{ secrets.REPOSILITE_TOKEN }}
APP_FEATURE_PRODUCT: 'example.rcp.app.ui.feature.product'
APP_BUNDLE_PRODUCT: 'example.rcp.app.ui.plugin.product'
APP_FEATURE: 'example-rcp-app-ui-feature'
APP_BUNDLE: 'example-rcp-app-ui-plugin'

runs-on: ubuntu-latest

steps:
Expand All @@ -35,14 +25,37 @@ jobs:
# ~/.p2
# key: dev-${{ hashFiles('~/.klibio/klibio.sh') }}

- name: setup idefix
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
8
11
17
21

- name: build
shell: bash
run: |
$GITHUB_WORKSPACE/.github/workflows/setup-idefix.sh
continue-on-error: false

- name: build
echo -e "#\n# build\n#\n"
echo "# configure environment for maven/tycho calls"
export JAVA_HOME_8=$JAVA_HOME_8_X64
export JAVA_HOME_11=$JAVA_HOME_11_X64
export JAVA_HOME_17=$JAVA_HOME_17_X64
export JAVA_HOME_21=$JAVA_HOME_21_X64
export PATH=$JAVA_HOME/bin:$PATH
./build.sh --jar-signing
continue-on-error: true

- name: validate-build-results
shell: bash
run: |
./build.sh
continue-on-error: false
NUM_PRODUCTS=$(find releng/products/target -name 'example.rcp.app.ui.*' -type f | wc -l)
NUM_REPO_PRODUCT=$(find releng/products/target -name 'products-*.zip' -type f | wc -l)
NUM_REPO_BINARY=$(find releng/repo.binary/target -name 'repo.binary-*.zip' -type f | wc -l)
NUM_REPO_SDK=$(find releng/repo.sdk/target -name 'repo.sdk-*.zip' -type f | wc -l)

[[ $NUM_PRODUCTS -gt 0 ]] & echo "products existing!"
[[ $NUM_REPO_PRODUCT -ne 0 ]] & echo "product repo existing!"
[[ $NUM_REPO_BINARY -ne 0 ]] & echo "binary repo existing!"
[[ $NUM_REPO_SDK -ne 0 ]] & echo "sdk repo existing!"
86 changes: 56 additions & 30 deletions .github/workflows/20_snapshot-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ on:

jobs:
snapshot:
environment: dev
runs-on: ubuntu-latest
env:
REPOSILITE_ID: '${{ vars.REPOSILITE_ID }}'
REPOSILITE_URL: '${{ vars.REPOSILITE_URL }}'
REPOSILITE_USERNAME: '${{ secrets.REPOSILITE_USERNAME }}'
REPOSILITE_TOKEN: '${{ secrets.REPOSILITE_TOKEN }}'
APP_FEATURE_PRODUCT: 'example.rcp.app.ui.feature.product'
APP_BUNDLE_PRODUCT: 'example.rcp.app.ui.plugin.product'
APP_FEATURE: 'example-rcp-app-ui-feature'
APP_BUNDLE: 'example-rcp-app-ui-plugin'

runs-on: ubuntu-latest
REPOSILITE_USER_RELEASE: '${{ secrets.REPOSILITE_USER_RELEASE }}'
REPOSILITE_TOKEN_RELEASE: '${{ secrets.REPOSILITE_TOKEN_RELEASE }}'
REPOSILITE_USER_SNAPSHOT: '${{ secrets.REPOSILITE_USER_SNAPSHOT }}'
REPOSILITE_TOKEN_SNAPSHOT: '${{ secrets.REPOSILITE_TOKEN_SNAPSHOT }}'

steps:

Expand All @@ -34,29 +30,59 @@ jobs:
# ~/.p2
# key: dev-${{ hashFiles('~/.klibio/klibio.sh') }}

- name: setup idefix
shell: bash
run: |
.github/workflows/setup-idefix.sh
continue-on-error: false
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
8
11
17
21

- name: build
shell: bash
run: |
echo -e "#\n# build\n#\n"
echo "# configure environment for maven/tycho calls"
export JAVA_HOME_8=$JAVA_HOME_8_X64
export JAVA_HOME_11=$JAVA_HOME_11_X64
export JAVA_HOME_17=$JAVA_HOME_17_X64
export JAVA_HOME_21=$JAVA_HOME_21_X64
export PATH=$JAVA_HOME/bin:$PATH
./build.sh --jar-signing --deploy
continue-on-error: false

- name: Generate Changelog
run: echo "# Good things have arrived" > ${{ github.workspace }}-CHANGELOG.txt

- name: Release
uses: softprops/action-gh-release@v2
# if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ github.workspace }}-CHANGELOG.txt
releng/repo.binary/target/repository/p2.index
releng/repo.binary/target/repository/content.xml.xz
releng/repo.binary/target/repository/artifacts.xml.xz
draft: true
prerelease: false
continue-on-error: true

- name: create release
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
pom_version=$(grep -oPm1 "(?<=<version>)[^<]+" "pom.xml")
if [[ $pom_version =~ ([0-9]+)\.([0-9]+)\.([0-9]+)(.*) ]]; then
major="${BASH_REMATCH[1]}"
minor="${BASH_REMATCH[2]}"
bugfix="${BASH_REMATCH[3]}"
snapshot="${BASH_REMATCH[4]}"
else
echo "Version format not recognized."
exit 1
fi
version=$major.$minor.$bugfix
release=rel_$version
snapshot=snapshot_$version
PRODUCTS=$(find releng/products/target -name 'example.rcp.app.ui.*' -type f)
REPO_PRODUCT=$(find releng/products/target -name 'products-*.zip' -type f)
REPO_BINARY=$(find releng/repo.binary/target -name 'repo.binary-*.zip' -type f)
REPO_SDK=$(find releng/repo.sdk/target -name 'repo.sdk-*.zip' -type f)
if [[ $pom_version =~ (.*+SNAPSHOT.*+) ]]; then
echo "eval if snapshot release $snapshot is already existing"
gh release list --json tagName | jq --arg jqSnapshot "$snapshot" 'select(.[].tagName == $jqSnapshot)' > snapshot.json
if [[ -s snapshot.json ]]; then
echo "delete existiong snapshot release, before creating new one"
gh release delete $snapshot
git push --delete origin $snapshot
fi
gh release create $snapshot $PRODUCTS $REPO_BINARY $REPO_PRODUCT $REPO_SDK -p
else
gh release create $release $PRODUCTS $REPO_BINARY $REPO_PRODUCT $REPO_SDK --latest
fi
83 changes: 59 additions & 24 deletions .github/workflows/30_release-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: 30 release deployment

on:
# push:
# branches: [ "main" ]
workflow_dispatch:
inputs:
release-version:
Expand All @@ -16,18 +14,14 @@ on:

jobs:
release:
environment: release
runs-on: ubuntu-latest
env:
REPOSILITE_ID: '${{ vars.REPOSILITE_ID }}'
REPOSILITE_URL: '${{ vars.REPOSILITE_URL }}'
REPOSILITE_USERNAME: '${{ secrets.REPOSILITE_USERNAME }}'
REPOSILITE_TOKEN: '${{ secrets.REPOSILITE_TOKEN }}'
APP_FEATURE_PRODUCT: 'example.rcp.app.ui.feature.product'
APP_BUNDLE_PRODUCT: 'example.rcp.app.ui.plugin.product'
APP_FEATURE: 'example-rcp-app-ui-feature'
APP_BUNDLE: 'example-rcp-app-ui-plugin'

runs-on: ubuntu-latest
REPOSILITE_USER_RELEASE: '${{ secrets.REPOSILITE_USER_RELEASE }}'
REPOSILITE_TOKEN_RELEASE: '${{ secrets.REPOSILITE_TOKEN_RELEASE }}'
REPOSILITE_USER_SNAPSHOT: '${{ secrets.REPOSILITE_USER_SNAPSHOT }}'
REPOSILITE_TOKEN_SNAPSHOT: '${{ secrets.REPOSILITE_TOKEN_SNAPSHOT }}'

steps:

Expand All @@ -43,18 +37,25 @@ jobs:
# ~/.p2
# key: dev-${{ hashFiles('~/.klibio/klibio.sh') }}

- name: setup idefix
shell: bash
run: |
.github/workflows/setup-idefix.sh
continue-on-error: false
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
8
11
17
21

- name: build
shell: bash
run: |
echo -e "#\n# build\n#\n"
echo "# configure environment for maven/tycho calls"
export JAVA_HOME=~/.klibio/java/ee/JAVA17
export JAVA_HOME_8=$JAVA_HOME_8_X64
export JAVA_HOME_11=$JAVA_HOME_11_X64
export JAVA_HOME_17=$JAVA_HOME_17_X64
export JAVA_HOME_21=$JAVA_HOME_21_X64
export PATH=$JAVA_HOME/bin:$PATH

echo -e "#\n# update to release version $RELEASE_VERSION\n#\n"
./mvnw org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$RELEASE_VERSION
Expand All @@ -65,16 +66,50 @@ jobs:
echo -e "#\n# RELEASE build and deploy to artifactory\n#\n"
MAVEN_OPTS="-Dtycho.localArtifacts=ignore -Dmaven.repo.local=.local_m2_cache"
./build.sh --jar-signing --deploy
continue-on-error: true

echo -e "#\n# tag RELEASE in git\n#\n"
git tag -a rel_$RELEASE_VERSION -m "release $RELEASE_VERSION" && git push --tags
- name: create release
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
pom_version=$(grep -oPm1 "(?<=<version>)[^<]+" "pom.xml")
if [[ $pom_version =~ ([0-9]+)\.([0-9]+)\.([0-9]+)(.*) ]]; then
major="${BASH_REMATCH[1]}"
minor="${BASH_REMATCH[2]}"
bugfix="${BASH_REMATCH[3]}"
snapshot="${BASH_REMATCH[4]}"
else
echo "Version format not recognized."
exit 1
fi
version=$major.$minor.$bugfix
release=rel_$version
snapshot=snapshot_$version
PRODUCTS=$(find releng/products/target -name 'example.rcp.app.ui.*' -type f)
REPO_PRODUCT=$(find releng/products/target -name 'products-*.zip' -type f)
REPO_BINARY=$(find releng/repo.binary/target -name 'repo.binary-*.zip' -type f)
REPO_SDK=$(find releng/repo.sdk/target -name 'repo.sdk-*.zip' -type f)
if [[ $pom_version =~ (.*+SNAPSHOT.*+) ]]; then
echo "eval if snapshot release $snapshot is already existing"
gh release list --json tagName | jq --arg jqSnapshot "$snapshot" 'select(.[].tagName == $jqSnapshot)' > snapshot.json
if [[ -s snapshot.json ]]; then
echo "delete existiong snapshot release, before creating new one"
gh release delete $snapshot
git push --delete origin $snapshot
fi
gh release create $snapshot $PRODUCTS $REPO_BINARY $REPO_PRODUCT $REPO_SDK -p
else
gh release create $release $PRODUCTS $REPO_BINARY $REPO_PRODUCT $REPO_SDK --latest
fi

echo -e "#\n# start next development release cycle with new version $NEXT_SNAPSHOT_VERSION\n#\n"
- name: start next development cycle
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run:
echo -e "#\n# start next development cycle with new version $NEXT_SNAPSHOT_VERSION\n#\n"
./mvnw org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$NEXT_SNAPSHOT_VERSION
git add . && git commit -m "starting next dev cycle - new version $NEXT_SNAPSHOT_VERSION" && git push
git tag -a $NEXT_SNAPSHOT_VERSION -m "start dev cycle with version $NEXT_SNAPSHOT_VERSION" && git push --tags

env:
RELEASE_VERSION: ${{ github.event.inputs.release-version }}
NEXT_SNAPSHOT_VERSION: ${{ github.event.inputs.next-snaphot-version }}
continue-on-error: false
12 changes: 9 additions & 3 deletions .github/workflows/setup-idefix.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
002-setup-idefix.sh#!/bin/bash
#!/bin/bash
if [[ ${debug:-false} == true ]]; then
set -o xtrace # activate bash debug
fi
Expand All @@ -10,7 +10,13 @@ if [ -d ~/${bootstrap} ]; then
echo "using existing idefix tooling from ~/${bootstrap} - skipping provisioning"
else
echo "provisioning idefix tooling inside ~/${bootstrap} - please be patient"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/klibio/bootstrap/main/install-klibio.sh)" bash -j
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/klibio/bootstrap/main/install-klibio.sh)" bash -j
export KLIBIO=$(echo ${HOME}/.klibio)
lib_url=https://raw.githubusercontent.com/klibio/bootstrap/main/.klibio/klibio.sh
echo "# sourcing klibio library - ${lib_url}"
install_dir=${HOME}
$(curl -fs${unsafe:-}SLO ${lib_url})
. klibio.sh -j
fi

echo execution completed at $(date +"%Y-%m-%d_%H-%M-%S")
echo execution completed at $(date +"%Y-%m-%d_%H-%M-%S")
8 changes: 4 additions & 4 deletions .mvn/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
</server>
<server>
<id>klibio-maven-releases</id>
<username>${env.REPOSILITE_USERNAME}</username>
<password>${env.REPOSILITE_TOKEN}</password>
<username>${env.REPOSILITE_USER_RELEASE}</username>
<password>${env.REPOSILITE_TOKEN_RELEASE}</password>
</server>
<server>
<id>klibio-maven-snapshots</id>
<username>${env.REPOSILITE_USERNAME}</username>
<password>${env.REPOSILITE_TOKEN}</password>
<username>${env.REPOSILITE_USER_SNAPSHOT}</username>
<password>${env.REPOSILITE_TOKEN_SNAPSHOT}</password>
</server>
</servers>

Expand Down
10 changes: 5 additions & 5 deletions .mvn/toolchains.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<version>21</version>
</provides>
<configuration>
<jdkHome>${env.HOME}/.klibio/java/ee/JAVA21</jdkHome>
<jdkHome>${env.JAVA_HOME_21}</jdkHome>
</configuration>
</toolchain>
<toolchain>
Expand All @@ -20,7 +20,7 @@
<version>17</version>
</provides>
<configuration>
<jdkHome>${env.HOME}/.klibio/java/ee/JAVA17</jdkHome>
<jdkHome>${env.JAVA_HOME_17}</jdkHome>
</configuration>
</toolchain>
<toolchain>
Expand All @@ -31,7 +31,7 @@
<version>11</version>
</provides>
<configuration>
<jdkHome>${env.HOME}/.klibio/java/ee/JAVA11</jdkHome>
<jdkHome>${env.JAVA_HOME_11}</jdkHome>
</configuration>
</toolchain>
<!-- not available on macosx aarch64
Expand All @@ -43,8 +43,8 @@
<version>8</version>
</provides>
<configuration>
<jdkHome>${env.HOME}/.klibio/java/ee/JAVA8</jdkHome>
<jdkHome>${env.JAVA_HOME_8}</jdkHome>
</configuration>
</toolchain>
-->
</toolchains>
</toolchains>
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# example for Eclipse RCP applications

{{ page.date| date: "%m-%d-%Y" }}

## build pipelines

| github action | output |
Expand All @@ -11,8 +9,6 @@
| [![SNAPSHOT build](https://github.com/klibio/example.pde.rcp/actions/workflows/20_snapshot-deployment.yml/badge.svg)](https://github.com/klibio/example.pde.rcp/actions/workflows/20_snapshot-deployment.yml) | [![snapshot](https://reposilite.klib.io/api/badge/latest/snapshots/example/rcp/products/?color=40c14a&name=Maven%20SNAPSHOT%20repo%20example.pde.rcp)](https://reposilite.klib.io/#/snapshots/example/rcp/products) |
| [![RELEASE build](https://github.com/klibio/example.pde.rcp/actions/workflows/30_release-deployment.yml/badge.svg)](https://github.com/klibio/example.pde.rcp/actions/workflows/30_release-deployment.yml) | [![release](https://reposilite.klib.io/api/badge/latest/releases/example/rcp/products/?color=40c14a&name=Maven%20RELEASE%20repo%20example.pde.rcp)](https://reposilite.klib.io/#/releases/example/rcp/products) |



## pre-requisites

based on github repo [klibio/bootstrap](https://github.com/klibio/bootstrap)
Expand Down
Loading
Loading