From fafac1c1eefd605dff7c897914f73385dfca1a23 Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Wed, 28 Jan 2015 10:43:18 +0100 Subject: [PATCH] Fixed typo in save-artifacts description, added test/run description, release link and godoc reference to README.md --- README.md | 9 +++++++-- docs/builder_image.md | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d68d82134..e5952e4e4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# source-to-image (sti) [![Build Status](https://travis-ci.org/openshift/source-to-image.svg?branch=master)](https://travis-ci.org/openshift/source-to-image) +# source-to-image (sti) + +[![GoDoc](https://godoc.org/github.com/openshift/source-to-image?status.png)](https://godoc.org/github.com/openshift/source-to-image) +[![Travis](https://travis-ci.org/openshift/source-to-image.svg?branch=master)](https://travis-ci.org/openshift/source-to-image) + Source-to-image (`sti`) is a tool for building reproducible docker images. `sti` produces ready-to-run images by injecting source code into a docker image and *assembling* @@ -93,7 +97,8 @@ $ hack/build-go.sh # Getting Started -You can start using `sti` right away with the following test sources and publicly available images: +You can start using `sti` right away (see [releases](https://github.com/openshift/source-to-image/releases)) +with the following test sources and publicly available images: ``` $ sti build git://github.com/pmorie/simple-ruby openshift/ruby-20-centos test-ruby-app diff --git a/docs/builder_image.md b/docs/builder_image.md index f21e1eb29..53cc661ca 100644 --- a/docs/builder_image.md +++ b/docs/builder_image.md @@ -43,6 +43,7 @@ sources are already there. * optional: * [save-artifacts](#save-artifacts) * [usage](#usage) + * [test/run](#test/run) All of the scripts can be written in any programming language, as long as it is executable inside the builder image. @@ -99,7 +100,7 @@ The `run` script is responsible for executing your application. ## save-artifacts The `save-artifacts` script is responsible for gathering all the dependencies which -existence can speed up the following build processes (eg. for Ruby - Gemfiles, +existence can speed up the following build processes (eg. for Ruby - gems installed by Bundler, for Java - `.m2` contents, etc.) into a tar file and stream it to the standard output. #### Example `save-artifacts` script: @@ -132,3 +133,20 @@ This is a STI sample builder image, to use it, install https://github.com/openshift/source-to-image EOF ``` + +## test/run + +The `test/run` script is for you, as the builder image author, to create a simple +process to checks if the image is working correctly. The proposed flow of that process +should be following: + +1. Build the image. +1. Run the image to verify `usage` script. +1. Run `sti build` to verify `assemble` script. +1. (optional) Run `sti build` once more to verify `save-artifacts` script and + `assemble`'s restore artifacts functionality. +1. Run the image to verify the test application is working. + +**NOTE** The suggested place to put your test application which should be built by your +`test/run` script is `test/test-app` in your image repository, see +[sti create](https://github.com/openshift/source-to-image/blob/master/docs/cli.md#sti-create).