mauroc / squiddio_pi

squiddio_pi
3 stars 13 forks source link

Deploy to your repository is simple... #77

Closed rgleason closed 4 years ago

rgleason commented 4 years ago

Deploying to your repository is simple, it's basically just to patch REPO= in ci/circleci-upload.sh, soon to be STABLE_REPO= and UNSTABLE_REPO=

Actually, it's also simple to add a patch which makes it possible to use these variables in the environment (if they exists there). This way you could deploy to your own repo without any code patching at all by using some variables set up in cloudsmith.

If you intend to use also make your installer artifacts usable you also need to patch PKG_BASE_URL in CMakeLists.

I believe I've made the necessary changes to deploy to my own cloudsmith account and this is what happens.

Skipping a deployment with the releases provider because this repo's name does not match one specified in .travis.yml's deploy.on.repo: mauroc/squiddio_pi

Skipping a deployment with the releases provider because this is not a tagged commit

Any suggestions now, because this does not seem to work?

rgleason commented 4 years ago

One thing wrong so far, Hadcloudsmith url on line 109 as "rgleason" which is wrong. Username may be wrong too. SET(PKG_BASE_URL dl.cloudsmith.io/public/rick-gleason/squiddio-pi/raw/files

rgleason commented 4 years ago

appveyor & travis deploy to github release is messed up now, but deploy to my cloudsmith seems to work. https://cloudsmith.io/~rick-gleason/repos/squiddio-pi/packages/ Lots of packages. Wish I could read the full names. So this is going to work!

Changes for deployment to your own Cloudsmith account

ci appveyor-upload.sh

REPO='rick-gleason/squiddio-pi' 
# if [ "$branch" != 'master' ]; then

ci appveyor-upload.sh

uses CLOUDSMITH_API_KEY get your key from Cloudsmith> [user]> settings> API Key and copy the number carefully. Then in Appveyor account> squiddio_pi> settings> environment> environment variables> enter CLOUDSMITH_API_KEY [the key value from cloudsmith]

ci circleci-upload.sh

uses

REPO='rick-gleason/squiddio-pi' 

# if [ "$branch" != 'master' ]; then
ci circleci-upload.sh uses  CLOUDSMITH_API_KEY

Your CLOUDSMITH_API_KEY from Cloudsmith> [User]> Settings > API Key .

into Circleci Settings> rgleason> squiddio_pi> Env Variables "CLOUDSMITH_API_KEY"

into Appveyor Projects> squiddio_pi> settings> Environment "CLOUDSMITH_API_KEY"

CMakeLists.txt

Line 8 SET(CLOUDSMITH_USER "rick-gleason")
Line 109 SET(PKG_BASE_URL  
  "https://dl.cloudsmith.io/public/rick-gleason/squiddio-pi/raw/files")

appveyor.yml

deploy:
  provider: release   # or GitHub
  auth_token:     # git-ptoken-squiddio-into-appveyor
    secure: "<encryption from appveyor https://ci.appveyor.com/tools/encrypt>" 

.travis.yml

deploy:
- provider: releases
  api_key:   # git-ptoken-squiddio-into-travis
    secure:  <add TravisCI encryption of git ptoken key>
    repo: rgleason/squiddio_pi
    tags: true
    all_branches: true
rgleason commented 4 years ago

However there is something incorrect due failure of appveyor and travis release uploads.

I ended up having to go back to the standard reccommended configuration by recreating separate keys using

Then put the encryption into the respective travis.yml and appveyor.yml

Then the deployment to Github Releases worked. There are no possible simplications that I know of here. Just do it.

rgleason commented 4 years ago

Other than that it seems to be working now, deployed to my Cloudsmith account squiddio repository & to github release

Note thatci directories circleci-upload scripts will work and checkout green, however this is not coming from a master directory. You can change that in the scripts.

See my branch reset35-rg (which is no longer current with mauro's repository) "fix app + trav encrypt keys -rebase -i screwup" Note: I had to correct the encrypt keys due to a rebase problem.

I'll try to get this written up later.

rgleason commented 4 years ago

Change ci upload scripts to upload all branches

It should work.

PS: Well, fix uncommented fi should upload files

PSS Not so simple> My earlier squash reverted several changes. Fix CMakelists.txt & cloudsmith files due to bad squash reset35-rg @rgleason 3b3792f should fix it.

Cloudsmith Squiddio has newly deployed files now.

GitHub Release has a new release v1.0.17.17 with newly deployed files.

rgleason commented 4 years ago

I've added some DRAFT - Preliminary Notes to the Dev Manual - Plugin Installer - Build & Deploy, not the interface

I hope this is Ok and useful. Any comments/corrections/suggestions are welcome. Alec if you want this removed, I can do that too.

I noticed that it still needs some editing down, duplicates etc.