Skip to content

Commit

Permalink
Easy onboarding release (#80)
Browse files Browse the repository at this point in the history
* Some stuff, mostly wrong

* Implemented the StencilRepositoryPath() for every type of pack

* Moved the downloading of the files from the main package from the conmmon (this way we can use it in the pack package). also created a bundle-manifest.json.template file that will be downloaded with the others

* new template

* Corrected new manifest template

* more Corrected new manifest template

* hope corrected new manifest template

* Maybe correct manifest.json template file

* Another more correct version of the manifest.json template file

* Now starter create the budle structure with stencils and helm releases

* Refactored the manifest.json structure to be more readable and easy to use

* removed unused template

* Canges suggested in the PR

* Changed the base folder from skycap to bundle

* Moved the policies inside the btr struct

* Added the sequence field to the policy struct

* Added the Transformers placeholder

* Inserted the display name in the helm release

* Remnoved the BundleConfiguration struct since it wasn't necessary

* Added the uid to the helm release struct

* Corrected typo

* Corrected typo

* Added newline for more readability

* Corrected the folder names to be consistent with cx and manifest file

* Removed the  prefix from the display_name of the helm releases

* Removed unnecessary comments

* Moved the version inside the utils.version.go and implemented the new 'update' command

* Removed a wrong dependency

* result of 'dep ensure'

* Removed the btr branch hardcoded in the packs and now we use the branch specified in the '-branch' flag or 'master' if not sopecified. Also minor fix.
  • Loading branch information
lvangool committed Apr 25, 2019
1 parent 2978df9 commit 2c9cb3f
Show file tree
Hide file tree
Showing 36 changed files with 2,018 additions and 178 deletions.
22 changes: 20 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion api.go
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/cloud66-oss/starter/packs/node"
"github.com/cloud66-oss/starter/packs/php"
"github.com/cloud66-oss/starter/packs/ruby"
"github.com/cloud66-oss/starter/utils"
"github.com/heroku/docker-registry-client/registry"
"github.com/satori/go.uuid"
"io"
Expand Down Expand Up @@ -132,7 +133,7 @@ func (a *API) ping(w rest.ResponseWriter, r *rest.Request) {
}

func (a *API) version(w rest.ResponseWriter, r *rest.Request) {
w.WriteJson(VERSION)
w.WriteJson(utils.Version)
}

func (a *API) dockerfiles(w rest.ResponseWriter, r *rest.Request) {
Expand Down
29 changes: 29 additions & 0 deletions build.sh
@@ -0,0 +1,29 @@
#!/bin/bash

version=$(git describe --tags --always)

if [ -z "$1" ]
then
echo "No channel supplied"
exit 1
fi

channel=$1
force="false"

if [[ $2 == "--force" ]]
then
force="true"
fi

echo "Building $channel/$version"
echo

rm build/*

curl -s http://downloads.cloud66.com.s3.amazonaws.com/starter/versions.json | jq '.versions |= map(if (.channel == "'$channel'") then .version = "'$version'" else . end) | .versions |= map(if (.channel == "'$channel'") then .force = '$force' else . end)' > build/versions.json
echo "Current Versions"
cat build/versions.json | jq -r '.versions | map([.channel, .version] | join(": ")) | .[]'
echo

gox -ldflags "-X github.com/cloud66-oss/starter/utils.Version=$version -X github.com/cloud66-oss/starter/utils.Channel=$channel" -os="darwin linux windows" -arch="amd64" -output "build/{{.OS}}_{{.Arch}}_$version"

0 comments on commit 2c9cb3f

Please sign in to comment.