Deployment

OpenCPN Plugin Team on Cloudsmith

Requires

  1. Cloudsmith Account

  2. Make your accunt name visible and public under settings

  3. Then join by PM rgleason or resbats on Cruiser’s Forum

  4. NOTE The management of Cloudsmith has advised that Organizations will in the future be restricted to having repositories in the Organization’s Folder, so it is best to start out that way.

  5. Once you are accepted as a member

    1. You will be able to create three repositories for your plugin.

    2. Follow these details to Create Cloudsmith Opensource Repositories

    3. Configuration of uploads to Cloudsmith destinations:

      1. ci\cloudsmith-upload.sh points to ..cmake\in-files\cloudsmith-upload.sh.in …​.See for standard repository directories.

        • @CLOUDSMITH_BASE_REPOSITORY@-prod

        • @CLOUDSMITH_BASE_REPOSITORY@-beta

        • @CLOUDSMITH_BASE_REPOSITORY@-alpha

    4. The Frontend2 defaults to 'CLOUDSMITH_BASE_REPOSTORY' = 'yoour Github Repository', however you should set this value in CMakeLists.txt as "opencpn"

      1. In the organization "OpenCPN" create (pluginname)-alpha, (pluginname)-beta and (pluginname)-alpha repositories.

      2. Make sure that you select "Open Source", not just "public". It must be "Open Source"

      3. See the more detailed instructions in the Developer’s Manual wiki.

      4. For custom Cloudsmith repository destinations, modify if needed.

Testplugin Repositories

Actions - Results:

  • Non-Master branch - Push with no tag → Alpha repository

  • Non-Master branch - Push with tag → Beta repository

  • Master branch - Push with no tag → Beta repository

  • Master branch - Push with tag → Prod repository

    There are several ways to issue a "push with tag" or "tagged push"
  • See Deploy to prod repository $ git commit -am "my last changes") $ git tag v[new version number] $ git push <repo-name> <tag-name> OR $ git push origin refs/tags/tag_a

Not preferred:

$ git push --tags origin master:master

Is not preferred due possibility of pushing all old tags..

Example:

  1. Change version number and date in CMakeLists.txt . Save

  2. git add CMakeLists.txt

  3. git commit -am "v1.9.5.10"

  4. git tag v1.9.5.10

  5. git push origin refs/tags/v1.9.5.10

    • Enumerating objects: 5, done.

    • remote: Resolving deltas: 100% (2/2), completed with 2 local objects.

    • To https://github.com/xxxx/weatherfax_pi.git

    • * [new tag] v1.9.5.10 → v1.9.5.10

  6. git push origin master

For information about building locally for local deployment refer to Read-Build.md

EDIT or ADD

Plugin Repository Types and Use

Follow the name conventions above. Each plugin should have three repositories with these suffixes:

ALPHA

  • Development

  • Retainage - Limit by 36 days, Limit by Count 27 packages, Limit by Size 0 disabled.

  • Old packages will be deleted when new packages are synchronized.

  • Retention is performed in the following order: By count, then by days, then by size.

BETA

  • Testing

  • Retainage - Limit by days 0 disabled, Limit by count 223 packages, Limit by Size 0 disabled.

  • See general comments above.

PROD

  • Releases

  • Retainage - Limit by days 0 disabled, Limit by count 223 packages, Limit by Size 0 disabled.

  • See general comments above.

  • Generally, plugins that are deployed to the Plugin Manager should be located in this repository.

  • The retainage for this repository should retain at least the 4 last releases.

  • Currently each plugin has between 12-15 environments, each environment deploys a tarball and metadata file and may deploy one additional file (for deb linux, exe windows or pkg macos file).

  • 15 environments x 3 files x 4 releases = 180 packages.