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

Update release notes and add script to update version #495

Merged
merged 21 commits into from
Jan 29, 2018
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
35 changes: 23 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
sudo: required

language: go

go:
- 1.8

- 1.9
services:
- docker

- docker
before_install:
- sudo apt-get install jq
- sudo apt-get install jq

stage: Build Release

script:
- make unittest
- ./scripts/ci-smoketest.sh
before_deploy:
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
fi

after_script:
- make destroy-smoketest
deploy:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have the team chime in, but I don't think we want/need to release the binaries on Github. We already have an easier pathway for users to download from S3 (because they can get the release for their specific OS), and adding that here just seems redundant and more code to maintain.

Copy link
Contributor

@zpatrick zpatrick Jan 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another note, we don't want to run this in Travis. For one thing, Travis doesn't have the permissions to push to S3 or our Dockerhub account. Also, if we did go the Travis route for releases, we should run system tests first, which is a very large unit of work. Any Travis related stuff should be dropped from this PR imo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For historical perspective, issue #117 has some previous discussion on this. An argument could be made to not have to depend on S3 hosting our releases and instead use built in GitHub functionality for delivering releases.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooh, great point about travis' permissions - I hadn't even thought about that.

As for releasing binaries on GitHub in addition to our docs, I'm sort of on the fence. I think that if we do release on GitHub as well, we should definitely break it up by OS in the same way we do in the docs. But whether or not we should do that... I don't know just yet. I like the idea of having binary releases so strongly coupled to the tagged version notes; I think that it's a good pattern found in a lot of other OSS repositories. It is redundant, though, given that we also link to binaries stored in S3 in our docs. Maybe the release process could be that the version notes on GitHub and the download links in our docs both link to the same source of binaries?

I guess what I like about releasing binaries on GitHub is that we're not tied to AWS resources paid for by IQVIA - if anything goes south and we lose access to those resources, our OSS tool is unaffected and still available on GitHub.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thoughts everyone, just to clarify with the deploy portion.
It'd only be building the binaries the current layer0.ims.io/#download which can be done on in travis.

As far as s3 and DockerHub go we can continue to do that locally or figure out if it can be deployed via travis, which I believe can be done, ie https://docs.travis-ci.com/user/deployment/s3/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess my concern is more about releasing in multiple locations. To tlake's point, releasing on Github makes a lot of sense, and if we went that route, I'd like to see the S3 stuff go away.

provider: releases
script: make release
api_key:
secure: O0g3yP0OWCF2I96p2sY9SsmFrurbVWS1A4DthtWw+xVl8PYhAby7hzgYsy/Ap6C3L5b0PAdP8EtDKoYBy8A7tIImKtoIG7XZPqEH11WhFyUGlpr52DgeROdwZhpKsB3AjELzzSY+XYqW1pKxhcQPIbEBRSHfcREVJ3mL1yuXJkjrXDFCqnLe7oalR6rXaYfv27dJ9PK/Dmtpcu87I21rAX3Jmr94NFPfhXSaIHx9v4WOriMRYKNXvS0hxMH/UNlPNyKBFP6bMzMJFuIusmiJOx9ew/PmxyWen46rRytnJXj9YtaTeaK2Vn+6hEQ11PtwDn7ulou40ZIUiruxM1lmwN/uSIPmq5LVkx6Xsqfppu/jE8JLzitlme2D15xwJybdxNFaXCYG6TjlHjus4DPc72lLtO9OLNQr5bRc0IWrMlHPY49THkMnwMmqNxSLKhz56GcOOPUU/sNwCbReMlT0Ml/CKWwqqF8ul4MD/6quQjiemKsbGEXUTzy4myzO681R7/MQSioI6XF2fPaf+29CBB28uxUva7jbQSb7f1MaRagBBPL2a7P0Pk7ofw9nX49LOHLF8z9SZAbXT0/R4HgIBBt4yXOD1IyIXUitnNHYfbCQLUA4Mq7NFglGKfUPs9HG0afTm+eUJXxjUqEjXpNjrLC6TJOzutYXamBpTVaZe1w=
file:
- build/macOS.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why macOS is the only non-capitalized name

Copy link
Contributor Author

@nehayward nehayward Jan 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's just how they name their OS's. like iOS, tvOS, etc.

- build/Linux.zip
- build/Windows.zip
skip_cleanup: true
on:
tags: true
branch: master
repo: quintilesims/layer0
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
SHELL:=/bin/bash
L0_VERSION?=$(shell git describe --tags)

release:
$(MAKE) -C api release
$(MAKE) -C cli release
$(MAKE) -C docs-src release
$(MAKE) -C runner release
$(MAKE) -C setup release
$(MAKE) -C plugins/terraform release

rm -rf build
for os in linux darwin windows; do \
for os in Linux macOS Windows; do \
cp -R cli/build . ; \
cp -R setup/build . ; \
cp -R plugins/terraform/build . ; \
cd build/$$os && zip -r layer0_$(L0_VERSION)_$$os.zip * && cd ../.. ; \
aws s3 cp build/$$os/layer0_$(L0_VERSION)_$$os.zip s3://xfra-layer0/release/$(L0_VERSION)/layer0_$(L0_VERSION)_$$os.zip ; \
cd build/ && zip -r $$os.zip $$os && cd .. ; \
done

unittest:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ![logo](https://quintilesims.github.io/layer0/static/logo_rs.png)

[![Build Status](https://travis-ci.org/quintilesims/layer0.svg?branch=master)](https://travis-ci.org/quintilesims/layer0)
[![Version](https://img.shields.io/badge/version-0.10.4-brightgreen.svg)](https://github.com/quintilesims/layer0/releases/tag/v0.10.4)
[![Version](https://img.shields.io/badge/version-v0.10.4-brightgreen.svg)](https://github.com/quintilesims/layer0/releases/tag/v0.10.4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to run the script now so that references to 0.10.4 like here and elsewhere update the version to 0.10.5?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I could do that now. It'll make the merge easier.

[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://quintilesims.github.io/layer0/)

Layer0 is a PAAS that helps you deploy your Docker containers to the cloud with minimal fuss.
Expand Down
43 changes: 10 additions & 33 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,6 @@ git merge remotes/origin/master
git push -u origin release
```


## Update README badges

Update the `[Version]` badge in [README.MD](https://github.com/quintilesims/layer0/blob/release/README.md). There are two places in the badge's URLs that need to have the version number updated.


## Add Release Notes

Update [RELEASE_NOTES.md](https://github.com/quintilesims/layer0/blob/release/RELEASE_NOTES.md) with information about the current release.
This can either be done locally or through the [Github UI](https://github.com/quintilesims/layer0/edit/release/RELEASE_NOTES.md).
Please follow the existing formatting when adding release notes.
Commit your changes and push them to the `release` branch when you are done.


## Update Documentation

There are a couple of references in the [docs](https://github.com/quintilesims/layer0/tree/release/docs-src/docs) section that will need to be updated with the latest version:

* [mkdocs.yml](https://github.com/quintilesims/layer0/blob/release/docs-src/mkdocs.yml#L40)
* [index.md](https://github.com/quintilesims/layer0/blob/release/docs-src/docs/index.md)
* [releases.md](https://github.com/quintilesims/layer0/blob/release/docs-src/docs/releases.md)

Run `make build` from the `docs-src/` directory to compile the docs, commit your changes, and push them to the release branch when you are done.


## Merge Release into Master

With the release notes and documentation updated, [create a pull request](https://github.com/quintilesims/layer0/compare) from the `release` branch targeting the `master` branch (_base: master, compare: release_).
Expand All @@ -90,16 +65,18 @@ git tag -a vX.X.X -m "<some message about the version>"
git push origin --tag
```

## Add Release Notes

## Build and Push the Layer0 Binaries

To build and release the Layer0 binaries and Docker images, run the following from the `layer0` repo:
Add release notes to the release with this format.
```
git checkout vX.X.X
make release
### Features
* Features here.

###Fixes
* Bug fixes here.
```
This process will take a couple minutes.
Once completed, the zipped release files will be located in the [xfra-layer0](https://console.aws.amazon.com/s3/home?region=us-west-2#&bucket=xfra-layer0&prefix=release) S3 bucket.
This can be done through the [Github UI](https://github.com/quintilesims/layer0/releases) by clicking the edit button on the latest release.
Please follow the existing formatting when adding release notes.


# Announce the release
Expand All @@ -114,4 +91,4 @@ summary of the release contents. For example:

# Merge Master into Develop

To bring the `develop` branch up-to-date with `master`, create a [create a pull request](https://github.com/quintilesims/layer0/compare) from the `master` branch targeting the `develop` branch (_base: develop, compare: master_).
To bring the `develop` branch up-to-date with `master`, create a [create a pull request](https://github.com/quintilesims/layer0/compare) from the `master` branch targeting the `develop` branch (_base: develop, compare: master_). **Please rebase and merge** (squash and merge if not possible.)
104 changes: 0 additions & 104 deletions RELEASE_NOTES.md

This file was deleted.

2 changes: 1 addition & 1 deletion api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ deps:
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a --ldflags "-X main.Version=$(L0_VERSION)" -o l0-api .
docker build -t $(CURRENT_API_DOCKER_IMAGE) .

release: build
docker push $(CURRENT_API_DOCKER_IMAGE)
docker tag $(CURRENT_API_DOCKER_IMAGE) $(LATEST_API_DOCKER_IMAGE)
Expand Down
6 changes: 3 additions & 3 deletions cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ build:
go build -o l0

release:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -X main.Version=$(L0_VERSION)" -a -o build/linux/l0 .
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -X main.Version=$(L0_VERSION)" -a -o build/darwin/l0 .
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -X main.Version=$(L0_VERSION)" -a -o build/windows/l0.exe .
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -X main.Version=$(L0_VERSION)" -a -o build/Linux/l0 .
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -X main.Version=$(L0_VERSION)" -a -o build/macOS/l0 .
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -X main.Version=$(L0_VERSION)" -a -o build/Windows/l0.exe .

test:
go test ./...
Expand Down
9 changes: 9 additions & 0 deletions docs-src/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
L0_VERSION:=$(shell git describe --tags)
export L0_VERSION
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed for expenv


deps:
pip install mkdocs
pip install -Iv mkdocs-material==2.3.0
go get github.com/blang/expenv
go install github.com/blang/expenv

build:
mkdocs build --clean

release:
$(shell sed -E -i '' 's/(v[0-9]+.[0-9]+.[0-9]+)/'$(L0_VERSION)'/g' ../README.md)


serve:
mkdocs serve -a 0.0.0.0:9090

Expand Down
Binary file added docs-src/docs/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion docs-src/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Ready to learn more about Layer0? See our [introduction page](intro.md) to learn
| Download **v0.10.4** | | |
|:-:|:-:|:-:|
| ![Darwin](/static/icon_darwin.png) | ![Linux](/static/icon_linux.png) | ![Windows](/static/icon_windows.png) |
| [macOS](https://s3.amazonaws.com/xfra-layer0/release/v0.10.4/layer0_v0.10.4_darwin.zip) | [Linux](https://s3.amazonaws.com/xfra-layer0/release/v0.10.4/layer0_v0.10.4_linux.zip) | [Windows](https://s3.amazonaws.com/xfra-layer0/release/v0.10.4/layer0_v0.10.4_windows.zip) |
| [macOS](https://github.com/quintilesims/layer0/releases/download/v0.10.4/macOS.zip) | [Linux](https://github.com/quintilesims/layer0/releases/download/v0.10.4/Linux.zip) | [Windows](https://github.com/quintilesims/layer0/releases/download/v0.10.4/Windows.zip) |


## Contact Us
Expand Down
14 changes: 7 additions & 7 deletions docs-src/docs/releases.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
| Version | macOS | Linux | Windows |
| - | - | - | - |
| v0.10.4 | [macOS](https://s3.amazonaws.com/xfra-layer0/release/v0.10.4/layer0_v0.10.4_darwin.zip) | [Linux](https://s3.amazonaws.com/xfra-layer0/release/v0.10.4/layer0_v0.10.4_linux.zip) | [Windows](https://s3.amazonaws.com/xfra-layer0/release/v0.10.4/layer0_v0.10.4_windows.zip)
| v0.10.3 | [macOS](https://s3.amazonaws.com/xfra-layer0/release/v0.10.3/layer0_v0.10.3_darwin.zip) | [Linux](https://s3.amazonaws.com/xfra-layer0/release/v0.10.3/layer0_v0.10.3_linux.zip) | [Windows](https://s3.amazonaws.com/xfra-layer0/release/v0.10.3/layer0_v0.10.3_windows.zip)
| v0.10.2 | [macOS](https://s3.amazonaws.com/xfra-layer0/release/v0.10.2/layer0_v0.10.2_darwin.zip) | [Linux](https://s3.amazonaws.com/xfra-layer0/release/v0.10.2/layer0_v0.10.2_linux.zip) | [Windows](https://s3.amazonaws.com/xfra-layer0/release/v0.10.2/layer0_v0.10.2_windows.zip)
| v0.10.1 | [macOS](https://s3.amazonaws.com/xfra-layer0/release/v0.10.1/layer0_v0.10.1_darwin.zip) | [Linux](https://s3.amazonaws.com/xfra-layer0/release/v0.10.1/layer0_v0.10.1_linux.zip) | [Windows](https://s3.amazonaws.com/xfra-layer0/release/v0.10.1/layer0_v0.10.1_windows.zip)
| v0.10.0 | [macOS](https://s3.amazonaws.com/xfra-layer0/release/v0.10.0/layer0_v0.10.0_darwin.zip) | [Linux](https://s3.amazonaws.com/xfra-layer0/release/v0.10.0/layer0_v0.10.0_linux.zip) | [Windows](https://s3.amazonaws.com/xfra-layer0/release/v0.10.0/layer0_v0.10.0_windows.zip)
| v0.9.0 | [macOS](https://s3.amazonaws.com/xfra-layer0/release/v0.9.0/layer0_v0.9.0_darwin.zip) | [Linux](https://s3.amazonaws.com/xfra-layer0/release/v0.9.0/layer0_v0.9.0_linux.zip) | [Windows](https://s3.amazonaws.com/xfra-layer0/release/v0.9.0/layer0_v0.9.0_windows.zip)
| v0.8.4 | [macOS](https://s3.amazonaws.com/xfra-layer0/release/v0.8.4/layer0_v0.8.4_darwin.zip) | [Linux](https://s3.amazonaws.com/xfra-layer0/release/v0.8.4/layer0_v0.8.4_linux.zip) | [Windows](https://s3.amazonaws.com/xfra-layer0/release/v0.8.4/layer0_v0.8.4_windows.zip)
| v0.8.4 | [macOS](https://github.com/quintilesims/layer0/releases/download/v0.8.4/macOS.zip) | [Linux](https://github.com/quintilesims/layer0/releases/download/v0.8.4/Linux.zip) | [Windows](https://github.com/quintilesims/layer0/releases/download/v0.8.4/Windows.zip)
| v0.9.0 | [macOS](https://github.com/quintilesims/layer0/releases/download/v0.9.0/macOS.zip) | [Linux](https://github.com/quintilesims/layer0/releases/download/v0.9.0/Linux.zip) | [Windows](https://github.com/quintilesims/layer0/releases/download/v0.9.0/Windows.zip)
| v0.10.0 | [macOS](https://github.com/quintilesims/layer0/releases/download/v0.10.0/macOS.zip) | [Linux](https://github.com/quintilesims/layer0/releases/download/v0.10.0/Linux.zip) | [Windows](https://github.com/quintilesims/layer0/releases/download/v0.10.0/Windows.zip)
| v0.10.1 | [macOS](https://github.com/quintilesims/layer0/releases/download/v0.10.1/macOS.zip) | [Linux](https://github.com/quintilesims/layer0/releases/download/v0.10.1/Linux.zip) | [Windows](https://github.com/quintilesims/layer0/releases/download/v0.10.1/Windows.zip)
| v0.10.2 | [macOS](https://github.com/quintilesims/layer0/releases/download/v0.10.2/macOS.zip) | [Linux](https://github.com/quintilesims/layer0/releases/download/v0.10.2/Linux.zip) | [Windows](https://github.com/quintilesims/layer0/releases/download/v0.10.2/Windows.zip)
| v0.10.3 | [macOS](https://github.com/quintilesims/layer0/releases/download/v0.10.3/macOS.zip) | [Linux](https://github.com/quintilesims/layer0/releases/download/v0.10.3/Linux.zip) | [Windows](https://github.com/quintilesims/layer0/releases/download/v0.10.3/Windows.zip)
| v0.10.4 | [macOS](https://github.com/quintilesims/layer0/releases/download/v0.10.4/macOS.zip) | [Linux](https://github.com/quintilesims/layer0/releases/download/v0.10.4/Linux.zip) | [Windows](https://github.com/quintilesims/layer0/releases/download/v0.10.4/Windows.zip)
24 changes: 24 additions & 0 deletions docs-src/index.md.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<p align="center">
<img alt="Layer0 Logo" src="/static/logo_rs.png" >
</p>

<center>
# Build, Manage, and Deploy Your Application
</center>


## Meet Layer0
Layer0 is a framework that helps you deploy web applications to the cloud with minimal fuss. Using a simple command line interface (CLI), you can manage the entire life cycle of your application without having to focus on infrastructure.

Ready to learn more about Layer0? See our [introduction page](intro.md) to learn about some important concepts. When you're ready to get started, take a look at the [installation page](setup/install.md) for information about setting up Layer0.

## Download
| Download **$L0_VERSION** | | |
|:-:|:-:|:-:|
| ![Darwin](/static/icon_darwin.png) | ![Linux](/static/icon_linux.png) | ![Windows](/static/icon_windows.png) |
| [macOS](https://github.com/quintilesims/layer0/releases/download/$L0_VERSION/macOS.zip) | [Linux](https://github.com/quintilesims/layer0/releases/download/$L0_VERSION/Linux.zip) | [Windows](https://github.com/quintilesims/layer0/releases/download/$L0_VERSION/Windows.zip) |


## Contact Us

If you have questions about Layer0, email the development team at [[email protected]](mailto:[email protected]).
1 change: 1 addition & 0 deletions docs-src/release_table.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| $L0_VERSION | [macOS](https://github.com/quintilesims/layer0/releases/download/$L0_VERSION/macOS.zip) | [Linux](https://github.com/quintilesims/layer0/releases/download/$L0_VERSION/Linux.zip) | [Windows](https://github.com/quintilesims/layer0/releases/download/$L0_VERSION/Windows.zip)
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,9 @@ <h2 id="download">Download<a class="headerlink" href="#download" title="Permanen
<td align="center"><img alt="Windows" src="./static/icon_windows.png" /></td>
</tr>
<tr>
<td align="center"><a href="https://s3.amazonaws.com/xfra-layer0/release/v0.10.4/layer0_v0.10.4_darwin.zip">macOS</a></td>
<td align="center"><a href="https://s3.amazonaws.com/xfra-layer0/release/v0.10.4/layer0_v0.10.4_linux.zip">Linux</a></td>
<td align="center"><a href="https://s3.amazonaws.com/xfra-layer0/release/v0.10.4/layer0_v0.10.4_windows.zip">Windows</a></td>
<td align="center"><a href="https://github.com/quintilesims/layer0/releases/download/v0.10.4/macOS.zip">macOS</a></td>
<td align="center"><a href="https://github.com/quintilesims/layer0/releases/download/v0.10.4/Linux.zip">Linux</a></td>
<td align="center"><a href="https://github.com/quintilesims/layer0/releases/download/v0.10.4/Windows.zip">Windows</a></td>
</tr>
</tbody>
</table>
Expand Down
Loading