# Upload a version only once

**URL:** <https://discourse.chef.io/t/upload-a-version-only-once/4340>\
**Category:** Chef Infra (archive)\
**Created:** [August 21, 2013, 2:49pm UTC](https://discourse.chef.io/t/upload-a-version-only-once/4340 "2013-08-21T14:49:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Florian\_Hehlen1](https://avatars.discourse-cdn.com/v4/letter/f/da6949/32.png) [@Florian\_Hehlen1](https://discourse.chef.io/u/Florian_Hehlen1)\
**Post date:** [August 21, 2013, 2:49pm UTC](https://discourse.chef.io/t/upload-a-version-only-once/4340/1 "2013-08-21T14:49:56Z")

</div>

Hi,

Is there a way to only ever allow a version of a cookbook to be uploaded  
once. This would then force versions to be managed and help guarantee  
reproducibility. I am thinking of what maven/nexus provides as an example  
for this. It also seems to me that the notion of snapshot vs. releases would  
be useful as well.

Cheers,

Florian

---

<div class="post-metadata">

**Author:** ![Brian\_Anderson](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@Brian\_Anderson](https://discourse.chef.io/u/Brian_Anderson)\
**Post date:** [August 21, 2013, 2:53pm UTC](https://discourse.chef.io/t/upload-a-version-only-once/4340/2 "2013-08-21T14:53:22Z")

</div>

You can freeze a cookbook. That will prevent new uploads without a version  
bump. I like the knife-spork plugin for managing the freezing/bumping  
process.

On Wed, Aug 21, 2013 at 10:49 AM, Florian Hehlen  
[florian.hehlen@gmail.com](mailto:florian.hehlen@gmail.com)wrote:

> Hi,\*\*\*\*
> 
> * * *
> 
> Is there a way to only ever allow a version of a cookbook to be uploaded  
> once. This would then force versions to be managed and help guarantee  
> reproducibility. I am thinking of what maven/nexus provides as an example  
> for this. It also seems to me that the notion of snapshot vs. releases  
> would be useful as well.\*\*\*\*
> 
> * * *
> 
> Cheers,\*\*\*\*
> 
> Florian\*\*\*\*

--  
_Brian Anderson_ | Operations Engineer  
Phone 781.696.1304

> **[Affectiva - Humanizing Technology](https://www.affectiva.com/)**
>
> Affectiva's AI analyzes complex human states in context — emotions, cognitive states, activities and objects people use.

[http://www.facebook.com/affectiva](http://www.facebook.com/affectiva)[https://twitter.com/Affectiva](https://twitter.com/Affectiva)  
[http://www.youtube.com/user/affectiva](http://www.youtube.com/user/affectiva)  
[http://www.affectiva.com/blog/](http://www.affectiva.com/blog/) [http://www.linkedin.com/company/affectiva\_2](http://www.linkedin.com/company/affectiva_2)  
[https://plus.google.com/b/115885368219797754125/115885368219797754125/posts](https://plus.google.com/b/115885368219797754125/115885368219797754125/posts)

---

<div class="post-metadata">

**Author:** ![Nathen\_Harvey1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/nathen_harvey1/32/272_2.png) [@Nathen\_Harvey1](https://discourse.chef.io/u/Nathen_Harvey1)\
**Post date:** [August 21, 2013, 2:55pm UTC](https://discourse.chef.io/t/upload-a-version-only-once/4340/3 "2013-08-21T14:55:45Z")

</div>

Take a look at knife cookbook upload --freeze [1] and knife-spork [2]

-Nathen

[1] [http://docs.opscode.com/chef/knife.html#upload](http://docs.opscode.com/chef/knife.html#upload)  
[2] [https://github.com/jonlives/knife-spork](https://github.com/jonlives/knife-spork)

-Nathen

From: Florian Hehlen [florian.hehlen@gmail.com](mailto:florian.hehlen@gmail.com)  
Reply-To: "chef@lists.opscode.com" [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Date: Wednesday, August 21, 2013 10:49 AM  
To: "chef@lists.opscode.com" [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] upload a version only once

Hi,

Is there a way to only ever allow a version of a cookbook to be uploaded  
once. This would then force versions to be managed and help guarantee  
reproducibility. I am thinking of what maven/nexus provides as an example  
for this. It also seems  
to me that the notion of snapshot vs. releases would be useful as well.

Cheers,  
Florian

---

<div class="post-metadata">

**Author:** ![BradKnowles](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bradknowles/32/99_2.png) [@BradKnowles](https://discourse.chef.io/u/BradKnowles)\
**Post date:** [August 21, 2013, 3:08pm UTC](https://discourse.chef.io/t/upload-a-version-only-once/4340/4 "2013-08-21T15:08:12Z")

</div>

On Aug 21, 2013, at 9:53 AM, Brian Anderson [brian.anderson@affectiva.com](mailto:brian.anderson@affectiva.com) wrote:

> You can freeze a cookbook. That will prevent new uploads without a version bump. I like the knife-spork plugin for managing the freezing/bumping process.

My only issue with knife-spork was that it only worked with git repos (at the time I was trying to use it), and our codebase at that customer was in Subversion. So, knife-spork wasn't useful to us.

But that was a while back, and I would hope that the plugin has progressed to support other repo formats since then. Other than that, it seems to me to be a really nice workflow tool.

--  
Brad Knowles [brad@shub-internet.org](mailto:brad@shub-internet.org)  
LinkedIn Profile: [http://tinyurl.com/y8kpxu](http://tinyurl.com/y8kpxu)

---

<div class="post-metadata">

**Author:** ![Torben\_Knerr](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@Torben\_Knerr](https://discourse.chef.io/u/Torben_Knerr)\
**Post date:** [August 21, 2013, 4:40pm UTC](https://discourse.chef.io/t/upload-a-version-only-once/4340/5 "2013-08-21T16:40:25Z")

</div>

> Is there a way to only ever allow a version of a cookbook to be uploaded  
> once. This would then force versions to be managed and help guarantee  
> reproducibility. I am thinking of what maven/nexus provides as an example  
> for this. It also seems to me that the notion of snapshot vs. releases  
> would be useful as well.

+1 for snapshots vs releases!

See also [http://tickets.opscode.com/browse/CHEF-4027](http://tickets.opscode.com/browse/CHEF-4027)

---

<div class="post-metadata">

**Author:** ![Florian\_Hehlen1](https://avatars.discourse-cdn.com/v4/letter/f/da6949/32.png) [@Florian\_Hehlen1](https://discourse.chef.io/u/Florian_Hehlen1)\
**Post date:** [August 21, 2013, 5:27pm UTC](https://discourse.chef.io/t/upload-a-version-only-once/4340/6 "2013-08-21T17:27:00Z")

</div>

Spork seems interesting indeed. But I am in the same situation as you. We  
are using mercurial not git.

I find the tight coupling to git in the chef world a little annoying.  
Version control should be an orthogonal concern. I am sure there are some  
great arguments why the whole world should use git... but still 😉

Cheers,  
florian

-----Original Message-----  
From: Brad Knowles [[mailto:brad@shub-internet.org](mailto:brad@shub-internet.org)]  
Sent: 21 August 2013 17:08  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Cc: Brad Knowles  
Subject: [chef] Re: upload a version only once

On Aug 21, 2013, at 9:53 AM, Brian Anderson [brian.anderson@affectiva.com](mailto:brian.anderson@affectiva.com)  
wrote:

> You can freeze a cookbook. That will prevent new uploads without a version  
> bump. I like the knife-spork plugin for managing the freezing/bumping  
> process.

My only issue with knife-spork was that it only worked with git repos (at  
the time I was trying to use it), and our codebase at that customer was in  
Subversion. So, knife-spork wasn't useful to us.

But that was a while back, and I would hope that the plugin has progressed  
to support other repo formats since then. Other than that, it seems to me  
to be a really nice workflow tool.

--  
Brad Knowles [brad@shub-internet.org](mailto:brad@shub-internet.org)  
LinkedIn Profile: [http://tinyurl.com/y8kpxu](http://tinyurl.com/y8kpxu)

---

<div class="post-metadata">

**Author:** ![John\_E\_Vincent\_lusis](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@John\_E\_Vincent\_lusis](https://discourse.chef.io/u/John_E_Vincent_lusis)\
**Post date:** [August 21, 2013, 5:31pm UTC](https://discourse.chef.io/t/upload-a-version-only-once/4340/7 "2013-08-21T17:31:40Z")

</div>

On Wed, Aug 21, 2013 at 1:27 PM, Florian Hehlen [florian.hehlen@gmail.com](mailto:florian.hehlen@gmail.com)wrote:

> Spork seems interesting indeed. But I am in the same situation as you. We  
> are using mercurial not git.
> 
> I find the tight coupling to git in the chef world a little annoying.  
> Version control should be an orthogonal concern. I am sure there are some  
> great arguments why the whole world should use git... but still 😉
> 
> Cheers,  
> florian

It's like more the side-effect of demand and motivation. Opscode uses  
github and git. Most community cookbook contributors also use github (and  
thus git). There have been several calls to provide, say, an hg provider  
for the SCM resource but I don't think anyone has stepped up to the plate.
