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

Kamelets release improvements #1023

Merged
merged 2 commits into from
Aug 31, 2022
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
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,23 @@ Then perform the release:
./mvnw release:perform -Prelease
```

Go to https://repository.apache.org/ and close the staging repository.

A URL will be generated for the repository, like: https://repository.apache.org/content/repositories/orgapachecamel-xxxx. The URL needs to be communicated during the voting process.

Now run:

```
cd release-utils/scripts/
./upload-sources.sh $CAMEL_KAMELET_VERSION $CAMEL_KAMELET_VERSION
```

You'll be requested to insert the password to unlock the secret key to sign the artifacts and after uploading to nexus dev repository.

You could verify the result at the following URL:

https://dist.apache.org/repos/dist/dev/camel/camel-kamelets/<$CAMEL_KAMELET_VERSION>

Restore Kamelets:

```
Expand All @@ -228,3 +245,5 @@ git commit -am "Restore Kamelets for development"

git push upstream main
```

Send an email to dev mailing list to start the vote.
35 changes: 35 additions & 0 deletions release-utils/scripts/sign.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This is a utility script to sign and sha512 all files in the given directory.

if [ "$#" -ne 1 ]; then
echo "usage: $0 dir"
exit 1
fi

dir=$1

pushd . && cd $dir

for f in $(ls | grep -e ".*tar.gz$");
do
sha512sum -b $f > $f.sha512
gpg --output $f.asc --armor --detach-sig $f
done

popd
36 changes: 36 additions & 0 deletions release-utils/scripts/upload-source.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

if [ "$#" -lt 2 ]; then
echo "usage: $0 upload-sources release-version destination-version"
exit 1
fi

location=$(dirname $0)
version=$1

mkdir $1/
cd $1/

wget https://github.com/apache/camel-kamelets/archive/refs/tags/v$1.tar.gz -O camel-kamelets-sources-$1.tar.gz
cd ../
./sign.sh $1/
svn import $1/ https://dist.apache.org/repos/dist/dev/camel/camel-kamelets/$2/ -m "Import camel-kamelets release"

rm -rf $1/