Skip to content

Commit

Permalink
Merge pull request #103 from alphagov/autopilot-plugin-153091168
Browse files Browse the repository at this point in the history
[#153091168] Add autopilot plugin to cf-cli docker image
  • Loading branch information
bandesz authored Dec 14, 2017
2 parents f804160 + e3b8230 commit b70af53
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
10 changes: 10 additions & 0 deletions cf-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ ENV CF_CLI_VERSION "6.26.0"
ENV CF_BGD_VERSION "1.1.0"
ENV CF_BGD_CHECKSUM "fe6ebd3c2dc3a287db0d31eeaed200d1a27117d9a6ddd875de561e4a6e8858d1"
ENV CF_BGD_TEMPFILE "/tmp/blue-green-deploy.linux64"
ENV CF_AUTOPILOT_VERSION "0.0.3"
ENV CF_AUTOPILOT_CHECKSUM "c3b5a38ba7a9817e12d6ab4c98418d707c49c1d3eb68e5a79e701531bd8fa1cd"
ENV CF_AUTOPILOT_TEMPFILE "/tmp/autopilot-linux"

RUN apk add --update $PACKAGES && rm -rf /var/cache/apk/*
RUN ln -s /lib/ /lib64 # FIXME: Remove for Alpine >= 3.6
Expand All @@ -18,3 +21,10 @@ RUN curl -L -o "${CF_BGD_TEMPFILE}" \
&& chmod +x "${CF_BGD_TEMPFILE}" \
&& cf install-plugin -f "${CF_BGD_TEMPFILE}" \
&& rm "${CF_BGD_TEMPFILE}"

RUN curl -L -o "${CF_AUTOPILOT_TEMPFILE}" \
"https://github.com/contraband/autopilot/releases/download/${CF_AUTOPILOT_VERSION}/autopilot-linux" \
&& echo "${CF_AUTOPILOT_CHECKSUM} ${CF_AUTOPILOT_TEMPFILE}" | sha256sum -c - \
&& chmod +x "${CF_AUTOPILOT_TEMPFILE}" \
&& cf install-plugin -f "${CF_AUTOPILOT_TEMPFILE}" \
&& rm "${CF_AUTOPILOT_TEMPFILE}"
9 changes: 7 additions & 2 deletions cf-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
Container for running CloudFoundry client.

It includes some other packages commonly used when deploying CF apps:
It includes some packages commonly used when deploying CF apps:

* `cf` CLI
* `curl`
* `unzip`
* `git`

It also includes some commonly-used `cf` plugins:

* [blue-green-deploy](https://github.com/bluemixgaragelondon/cf-blue-green-deploy)
* [autopilot](https://github.com/contraband/autopilot)

## Build locally

```
$ cd cf-cli
$ docker build -t cf-cly .
$ docker build -t cf-cli .
```

## Run
Expand Down
5 changes: 5 additions & 0 deletions cf-cli/cf-acceptance-tests_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
expect(cmd.exit_status).to eq(0)
end

it "has autopilot plugin available" do
cmd = command("cf zero-downtime-push --help")
expect(cmd.exit_status).to eq(0)
end

it "has curl available" do
expect(
command("curl --version").exit_status
Expand Down

0 comments on commit b70af53

Please sign in to comment.