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

Integrate travis-ci to push to supermarket on git tag #51

Open
majormoses opened this issue Sep 12, 2017 · 18 comments
Open

Integrate travis-ci to push to supermarket on git tag #51

majormoses opened this issue Sep 12, 2017 · 18 comments
Assignees

Comments

@majormoses
Copy link
Collaborator

Wondering if users would like us to push to the supermarket rather than just tagging it in git.

Please vote with a 👍 / 👎 accordingly, it should be pretty trivial but if the community finds little to no value then I don't want to expend the effort and introduce a new step to release process.

/cc @bspindler @TheConnMan @createor

@majormoses majormoses self-assigned this Sep 12, 2017
@TheConnMan
Copy link
Contributor

Can you push to the supermarket during the Travis deploy step on tags only? An example of this is pushing to https://rubygems.org in the Ruby API project. That way there isn't another manual deploy step, just the normal tagging.

As far as requests for this feature I haven't heard any, @createor would know better than anyone.

@majormoses
Copy link
Collaborator Author

the problem there is credentials which I suppose we could create a bot for that and store it encrypted in travis. The thing is that we will still want to manually evaluate changelog + versioning to continue to align to semver. But it could certainly be as simple as a single cli call so it is not much more effort once it is setup.

@majormoses
Copy link
Collaborator Author

Also we are already doing at least 2 things manually:

  • updating changelog
  • tagging git

I suppose we might be figure out some way to have it run only on tags (I have only done that with the rubygems provider) that would be a very nice touch so its just prep work before release and then it releases everything but tbh we could just add that as a target in our Makefile as make release which would tag and push to supermarket.

@Grumblesmith
Copy link
Contributor

I haven't seen any requests to be able to get this from supermarket. Would it being in supermarket make it easier to include in a wrapper cookbook?

@majormoses
Copy link
Collaborator Author

If it's not in the supermarket you must tell it where it is like this: https://github.com/CloudCruiser/ops_chef-cc_netuitive/blob/master/Berksfile#L3 as opposed to just cookbook 'netuitive'. I have honestly not really cared or messed around with the supermarket but someone required me to publish some cookbooks to the supermarket so I figured out how to do it and was curious if people were interested in doing it since it is honestly really not much more work.

@Grumblesmith
Copy link
Contributor

If it's not much extra work (and especially if we can automate it as part of the travis build) I'd vote 👍

@TheConnMan
Copy link
Contributor

@majormoses That Travis CI file has creds encrypted in it, take a look at https://docs.travis-ci.com/user/encryption-keys/.

I do believe that git tagging should always be a manual operation. As far as a changelog update I've been using GitHub Releases to convey changelog information instead of a history file. Either is a manual, human interpretation of changes, so I don't see too much difference between them. Both manual though.

@majormoses
Copy link
Collaborator Author

Ya I am familiar with using encrypted vars in for rubygems api keys what we need here would be an encrypted file like this: https://docs.travis-ci.com/user/encrypting-files/ as stove needs an actual pem file rather than it's contents.

Regarding Changelog + tag I agree it should be manual and maybe in that case we just add it to the Makefile so that when we tag stove can just publish to supermarket in one fell swoop. I would imagine it look something like this:

release: gittag ## tag and push cookbook to supermarket
    bundle exec stove stove --no-git

If you are wondering why we are not just using the git module built into stove I personally find the extra "v" in front of the version useless and make gittag allows you to re-tag (stove does not) which I discovered after dealing with an auth issue caused by: chef-boneyard/stove#120 for a different project.

@TheConnMan
Copy link
Contributor

Whether you tag and publish locally with one command or publish based on a tag push you still get both done with one manual step. I personally prefer publishing in the Travis build because git tagging doesn't require a working Ruby environment (which I rarely have) whereas bundle does. Also using the Travis file allows any maintainer to publish because the creds are embedded in the project. Otherwise we'd need a way to share credentials.

@majormoses
Copy link
Collaborator Author

majormoses commented Sep 13, 2017

I looked into it and there is a chef supermarket travis deploy provider so we should just run that on tags and then the manual steps are just update changelog, commit, push, and tag

@majormoses
Copy link
Collaborator Author

I pushed an initial version to the supermarket, can you guys setup the bot and travis that way Netuitive owns it going forward (in case I ever want to no longer maintain this cookbook at some point in the future).

@TheConnMan
Copy link
Contributor

Yes, I'll take care of it and I'll email you the service account when I make it so you can add it as a collaborator.

@majormoses majormoses changed the title [VOTE] Push cookbooks to supermarket? Integrate travis-ci to push to supermarket on git tag Sep 13, 2017
@majormoses
Copy link
Collaborator Author

@TheConnMan pinging to see where you are at

@TheConnMan
Copy link
Contributor

Still on my todo list, I've been punting it week to week. I should be coming out of the woods in the next week to tackle it.

TheConnMan added a commit that referenced this issue Oct 4, 2017
@TheConnMan
Copy link
Contributor

@majormoses Our service account username is metricly

TheConnMan added a commit that referenced this issue Oct 4, 2017
TheConnMan added a commit that referenced this issue Oct 4, 2017
TheConnMan added a commit that referenced this issue Oct 4, 2017
majormoses pushed a commit that referenced this issue Oct 13, 2017
@majormoses
Copy link
Collaborator Author

@TheConnMan I am not finding this metricly user:
image

@majormoses
Copy link
Collaborator Author

image

@majormoses majormoses reopened this Oct 13, 2017
@majormoses
Copy link
Collaborator Author

@TheConnMan ping still need the username in order to add it as a collaborator and make this all more automatic. In the mean time I can keep pushing to the supermarket manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants