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

SD Template: Routine Build and Deploy Process #53

Open
rgleason opened this issue Feb 4, 2022 · 0 comments
Open

SD Template: Routine Build and Deploy Process #53

rgleason opened this issue Feb 4, 2022 · 0 comments

Comments

@rgleason
Copy link
Owner

rgleason commented Feb 4, 2022

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: this does not need to be done 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

  2. Build Locally and test
    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.

  3. 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.

4a. Increment Version Number and sd frontend number in Plugin.cmake

  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.

@rgleason rgleason changed the title Routine Build and Deploy Process SD Template: Routine Build and Deploy Process Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant