Skip to content

How to SD Template: Routine Build and Deploy Process #27

Description

@rgleason

Normal Sequential Process after the plugin is setup and running.

See Original Thread: Rasbats/shipdriver_pi#406

  1. Remove auto branch and Create a branch called auto in github.com//plugins fork:
    See https://opencpn-manuals.github.io/main/AlternativeWorkflow/InstallConfigure/GithubPreps.html
    For builds targeting the master catalog: drop possible existing auto branch and create a new on top of master:
 git branch -D auto ①
 git remote update upstream ②
 git checkout -b auto upstream/master ③
 git push -f origin auto:auto ④

Note: the above does not need to be done each time, but it is safer to do it each time.

  1. Update SD Template with script "update-templates"
    https://github.com/Rasbats/shipdriver_pi/blob/master/UPDATE_TEMPLATES.md
    See "2. Run the script" https://github.com/Rasbats/shipdriver_pi/blob/master/UPDATE_TEMPLATES.md#2-run-script
    First update the update-templates script using the link above for bootstrapping.
    For example to update using a tag when in Windows OS
    "C:\Program Files\Git\bin\bash.exe" update-templates sd3.0.2
    OR

  2. At the bash prompt bash ./update-templates -l <---lower case "l" to get the version list.

  3. At the bash prompt pick recent version bash ./update-templates sd3.2.4+beta3 wait.

  4. Add and commit any files from git status.

  5. At the bash prompt repeat the command bash ./update-templates sd3.2.4+beta3 wait, there should be a long list of rm files and adding files.

  6. See if there are any files to commit with git status. If so do that.

  7. Find the local file Plugin.Cmake and change the version number.

  8. git add Plugin.Cmake then git commit -am "[new version number]"

  9. Build Locally and test

  10. git tag v[new version number]

  11. Setup the plugins auto branch

  12. git push --tags origin master
    https://opencpn-manuals.github.io/main/AlternativeWorkflow/usage.html
    Read the Install.md file for complete instructions.
    Run the batch files locally, creating the tarball in the build directory.

  13. From Bash Prompt started with administrative rights.

  • From the PI root directory run
set PATH=C:/ProgramData/chocolatey/bin;C:/Windows/system32;C:/Windows
./buildwin/win_deps.bat 
rm -rf build; mkdir build; cd build
cmake -T v141_xp -G "Visual Studio 15 2017" -DCMAKE_BUILD_TYPE=RelWithDebInfo  ..
cmake --build . --target tarball --config RelWithDebInfo
  • Then start Opencpn and from options>plugins "Import Plugin" and import the local tarball
  • Then install the local tarball, enable and test.
  • Alternatively, you can commit and push an "untagged" build, and then use Options > Import Plugins to import the tarball from the Cloudsmith alpha directory for the plugin.
  1. Commit a tagged build
    https://opencpn-manuals.github.io/main/AlternativeWorkflow/InstallConfigure/GitHub.html#_building_the_plugin
    First create a tagged beta build, using the tag (in this case) "v1.3.19.beta" then a tagged build.
    To DEPLOY using Tags
Deploy to Beta Branch  in your Cloudsmith Repository

$ git add <files changed>
$ git commit -am "1.3.4-beta")
$ git tag v1.3.4-beta
$ git push --tags origin master:master

Deploy to Prod Branch

$ git commit -am "1.3.4")
$ git tag v1.3.4
$ git push --tags origin master:master

Tagged Deployment

$ git commit -am "my last changes")
$ git tag v[new version number]
$ git push --tags origin master:master

- The last step pushes the tag and the branch in one step, 
- thus avoiding the problem of deployment being split between “prod” and “beta”.
- It's also much simpler. (All tags from your local clone are pushed to origin. 
- If this is a problem they can also be removed.)

  1. Check the Metadata that has been automatically pushed to plugins/auto branch
    https://opencpn-manuals.github.io/main/AlternativeWorkflow/InstallConfigure/GitHub.html#_check_the_metadata_push

  2. Automatic steps taken during the build and push to opencpn/plugins/master
    https://opencpn-manuals.github.io/main/AlternativeWorkflow/InstallConfigure/Catalog-Github-Integration.html#_during_the_build

  3. Cleaning up old metadata https://opencpn-manuals.github.io/main/AlternativeWorkflow/InstallConfigure/Catalog-Github-Integration.html#_cleaning_up_old_metadata

  4. Making a Pull request. https://opencpn-manuals.github.io/main/AlternativeWorkflow/InstallConfigure/Catalog-Github-Integration.html#make-PR

  5. If metadata files are missing, check the "builder" logs. Usually it is a bad auth key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions