Skip to content

Latest commit

 

History

History
76 lines (58 loc) · 2.69 KB

CONTRIBUTING.md

File metadata and controls

76 lines (58 loc) · 2.69 KB

Hacking Outscale SDK

SDK itself is generated from Outscale's OpenAPI description. Any change directly applied to source code will be overwritten at generation time.

Examples and tests are welcome!

Versioning

This SDK follows semantic versioning from the SDK perspective (not API). Some events may trigger a major (breaking) version of the SDK:

  1. OpenAPI generator introduce a new major version.
  2. Outscale introduce a new major version of its API.

When OpenAPI generator introduce a breaking change, SDK can be generated in several versions (see corresponding branches).

Generate SDK

  1. Have some tools ready: GNU make, git, docker.
  2. Edit api_version file and to the latest Outscale API version.
  3. Edit sdk_version file and change it according to semantic versioning.
  4. Launch sdk generation by running make gen.

Under the hood it get official Outscale yaml and run openapi-generator through docker.

Sending a Merge Request

If you plan to make some change in source code, consider making a pull request in openapi-generator project.

Otherwise:

  • Your merge request must be rebased on the latest commit.
  • Be sure that tests still pass by running make test.

How to release

Gitub bot should have produced a new version and creating the new release tag should push release to crate.io.

If this is not the case:

  1. Be sure have the latest version from repository.
  2. Update api_version to the last Outscale API version.
  3. Update sdk_version following semantic versioning logic.
  4. make gen to re-build the sdk.
  5. make test and fix any issue.
  6. Commit changes.
  7. Create PR.
  8. Review and merge PR.
  9. Create and push new sdk version tag.
  10. Create new release from tag.

Manual Publish

  1. Import gpg key gpg --import <FILE>
  2. Set gpg key as default if multiple in the computer, ~/.gnupg/gpg.conf
    default-key <FINGERPRINT>
    
    The fingerprint can be retrieved using gpg --list-keys
  3. Add credentials to the nexus server, ~/.m2/settings.xml
    <settings>
        <servers>
            <server>
                <id>ossrh</id>
                <username>USERNAME</username>
                <password>PASSWORD</password>
            </server>
        </servers>
    </settings>
    
  4. mvn deploy
  5. In case of failure during the publish, check https://s01.oss.sonatype.org/ (login using sonatype-ci credentials)
  6. Check https://central.sonatype.com/artifact/io.github.outscale/osc-sdk-java after few hours

More details

Check this site for deploying using sonatype: https://central.sonatype.org/publish/