Skip to content

Commit

Permalink
Removed auto release setup from Travis CI.
Browse files Browse the repository at this point in the history
Fixes #80.
  • Loading branch information
morazow committed Sep 30, 2020
1 parent 151f8b4 commit 5bd5265
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 84 deletions.
28 changes: 0 additions & 28 deletions .travis.yml
Expand Up @@ -9,33 +9,6 @@ addons:
packages:
- shellcheck

env:
matrix:
- RELEASE=false

global:
# ENCRYPTION_KEY
- secure: |-
PFjAMiewDaHDYt9gwtjv+EKCt864T3UwIutZVSmtZABP/DRcRSsDHEs0sY9WMTE0EvFN4XjwkzpkYv5IM5C3/f83O
CP4BsHsQ+3s8VmakQDhB3BSFnuz0g/Ot3cA3e54Xu8BhlTeeX5m0Y4tHYrFojDMUVGrLQ24WViqaCxGpr0ojn0ytr
gBMD11cdtcQwe3q2tjdkYnEKiLjdtaLIPdO9bv9n/HH2wIC1VliMngyTqL0UI+AjdmIa0Yrmb7HPtEsDJR5gDLlOd
agq8aQ2vXUigBGH9oIoDCE/s0aRwUiMRWlIj+vkTJBgbrnzC2UcO4qkx4qodNuiRagqVnscwe13wVPmQEkXqJ22Tk
j338jEiV7sVGIb4RdmMhlrvDQ1rHjRo270sTVCqww6YieRvkB/UhRkrXs1x8r6ZaSHhLLf4A7jR/EvS5dNLQ0LLxC
X/g2Mi/zRCRMTdwzPipN437D8LOwj7q+WEkVzsd9QasZncYpBaFgCfoNWiyuKeQF1c2hFYoPNRMFGFUER+sgJ6NYI
XmmtM/vJeok6N1Re+c5+iGACT30CL/yF8BmgBF7Xfu1jJH9LzQH6Dd0wH/G7XN7Kb0IzsvTw1nckgvFMo/4hSbT7P
nglwKzxWg3kPhRPaJshiZyRbtP0PWFDzPoRP3HrleYTSuS33OuesSJC5vVqQ=
# PGP_PASSPHRASE
- secure: |-
AzxFI14cBnjxDFqm3Kq/SoEZLsTm4u5x7JWrch09WUBDwIFOLTp6CHdAcMzMYZ2LOqjLXVxqKs7gK0ZcK9oFsx0Wz
APxKvzKkjBZ/Fe6eLMCjtGGSgnHtOg1F2gTEChuXZf/pIsgFAx8N9pb3sJWfWQVzTBxr5CdW3uNcekiatq1zhLRYc
VGMOsCk+HftklUoO5Qjknsju3Kug7WZTpW86ULWBllQ3ZALMLyTAVuP65IFcN11DghGF69SojL7XuWNWjU6VL30N3
IOKKI2nwIm++EMkK0zIzX7qxJGoj1WYr2hiy16RrBLFvG1Gd6hKlvGZoT5CWB3QdXN7QB6OsHmq/XcXUF9LA/a5vN
fR5uIpqsJmcjc14TF+U8/J3blJDc5PkD8v0TAJRaz7RcE6tKBYl2V0+aIkMBUlcCSs2ukjjO1jHcq7iJcY5edJL0g
ijwpmAHrxb/GJk3ZtvWRTCDvyQPw+8RyxGVWjo8MNrrxjYr34AXjDiCLJh2dRiMZkmPWCP8FIG65wBLa2JmB5l9eT
TE0+3vsd+7GULh5II/fTIc+jc0KrP28gOBmSEdK/zHcbsDFmYcicP16zTh1bXZ0+6CMs6NAS//jc/0N5YwkGYMz5C
gXwtqIW9ynF9CYK8ftX4GUbmPVAY9BhZrxsU5qPXXqqZKSmOIVynZujcVydw=
before_install:
- git fetch --tags
- docker pull exasol/docker-db:7.0.2
Expand Down Expand Up @@ -66,7 +39,6 @@ script:
after_success:
- bash <(curl -s https://codecov.io/bash)
- ./sbtx coveralls
- ./scripts/publish.sh

cache:
directories:
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -28,6 +28,7 @@ and saving Spark DataFrame as an Exasol table.
## Information for Contributors

* [Developer Guide](doc/development/developer_guide.md)
* [Releasing Guide](doc/development/releasing.md)

## Dependencies

Expand Down
1 change: 1 addition & 0 deletions doc/changes/changes_0.3.2.md
Expand Up @@ -13,6 +13,7 @@ to `7.0.0`.

## Documentation

* [#80](https://github.com/exasol/spark-exasol-connector/issues/80): Removed auto release setup from Travis CI (PR [#83](https://github.com/exasol/spark-exasol-connector/pull/83)).
* [#81](https://github.com/exasol/spark-exasol-connector/issues/81): Updated user and development guide (PR [#82](https://github.com/exasol/spark-exasol-connector/pull/82)).

## Dependency Updates
Expand Down
116 changes: 116 additions & 0 deletions doc/development/releasing.md
@@ -0,0 +1,116 @@
# Releasing

The Spark Exasol Connector is released to the Sonatype.

## Prerequisite

Please make sure that your have a Sonatype account and
[permission](https://issues.sonatype.org/browse/OSSRH-43049) to publish to the
`com.exasol` group.

## GPG Key Preparation

> This step should be setup only once.
It is important to sign every artifact we publish. It ensures that our releases
are not manipulated by third parties.

For that we use GPG.

We recommend to create a different GPG key for publishing artifacts even if you
already have a personal one.

### Create GPG Key and Files

First create a separate folder for the keys, `mkdir -p gpg-keys/`.

- Change to that directory: `cd gpg-keys/`
- Generate a key: `gpg --homedir . --gen-key`
- Enter your details, please make specific for the project
- Choose a passphrase with good password generator

You have created a key, let us obtain ASCII files that
[sbt-gpg](https://github.com/sbt/sbt-pgp) uses for artifact publishing.

We store the project signing keys in `spark-exasol-connector/project/.gnupg/`
folder.

- Change to that directory: `cd spark-exasol-connector/project/.gnupg/`
- Export the public key from new key: `gpg --homedir ~/gpg-keys -a --export > local.pubring.asc`
- Export the secret key from new key: `gpg --homedir ~/gpg-keys -a --export-secret-keys > local.secring.asc`

Please check out the [detailed manual](https://www.gnupg.org/gph/en/manual.html)
for more information.

### Publish Your GPG Public Key

To publish the artifacts to the Sonatype, you need to publish your GPG public
key so that others can confirm that it really belongs to you.

There are many GPG servers. We recommend the [MIT PGP][mit-pgp] server.

[mit-pgp]: http://pgp.mit.edu/

To publish your GPG public key:

- [Visit the website][mit-pgp]
- Copy and paste the contents of `local.pubring.asc`, in the form with a "Submit a key"
- Click on "Submit this key to the server!" button

If no errors occured, your key should already be published to the public GPG
Server.

## Pre Release Steps

- Make sure that the latest master branch continuous integration is green
- Checkout to the master branch: `git checkout master`
- Pull latest changes from master branch: `git pull origin master`
- Fetch the latest tags from remote: `git fetch --tags`
- Ensure that you have updated `doc/changes/changelog.md` file
- Ensure that you have updated `doc/changes/changes_VERSION.md` file
- Make sure the builds are green
- Run `./scripts/ci.sh` and check that everything works locally
- Add new version as a git tag, for example, `git tag -a 0.3.2 -m "Release version 0.3.2"`
- Push tags to the remote, `git push --tags`

Please make sure that the new version follows the [Semantic Versioning
2.0.0](https://semver.org/).

## Release

Make sure that you do not have any uncommitted or untracked files:

```sh
git status --porcelain
```

First check that you can publish to local repository:

```
./sbtx ";+clean ;+publishLocalSigned"
```

Provide your GPG passphrase when asked. Please notice that I used plus sign
(`+`) with the commands. This publishes artifacts for the cross Scala versions.

Publish to Sonatype:

```
PGP_PASSPHRASE=<GPG_PASSPHRASE> SONATYPE_USERNAME=<USERNAME> SONATYPE_PASSWORD=<PASSWORD> ./sbtx ";+clean ;+publishSigned ;sonatypeReleaseAll"
```

You can use the environment variable to provide the GPG passphrase, Sonatype
username and password.

## Post Release Steps

After successful release, update the Github Release notes. It should be the same
as the pre-release update to the `doc/changes/changes_VERSION.md` file.

Github should already create a draft release from the git tag. Click on the
"Edit release" button on the draft release version on the Github releases page,
and add the release notes.

## Using Release Robot

TODO
Empty file added project/.gnupg/.gitkeep
Empty file.
Binary file removed project/.gnupg/rings.tar.enc
Binary file not shown.
56 changes: 0 additions & 56 deletions scripts/publish.sh

This file was deleted.

0 comments on commit 5bd5265

Please sign in to comment.