From d7e839abefdf615542f6f6979dd3e837cc2cc1fe Mon Sep 17 00:00:00 2001 From: Wen Zhou Date: Mon, 13 Jun 2022 11:57:58 +0200 Subject: [PATCH 1/2] Updates: - uplift rpm version to latest 0.14.0 - add instruction of building docker image locally - set entrypoint in dockerfile to only supply argument --- README.md | 11 ++++++++++- dist/docker/Dockerfile | 1 + dist/rpm/cassowary.spec | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8e2a3c2..f24220e 100644 --- a/README.md +++ b/README.md @@ -71,12 +71,21 @@ $ brew update && brew install cassowary ``` ### Docker -You can run **cassowary** directly by using it's Docker image: +You can run **cassowary** directly by using its official Docker image: ```bash $ docker run rogerw/cassowary:v0.14.0 cassowary run -u http://www.example.com -c 1 -n 10 ``` +For local development: + +```bash +$ env GOOS=linux go build -o dist/docker +$ docker build -f dist/docker/Dockerfile -t test_cassowary dist/docker +$ docker run test_cassowary -u http://www.example.com -c 1 -n 10 +``` +Without argument when doing "docker run" it prints help usage + ### Nix/NixOS Cassowary can be installed via the [Nix](https://nixos.org) package manager. diff --git a/dist/docker/Dockerfile b/dist/docker/Dockerfile index dbd4073..0de5d9b 100644 --- a/dist/docker/Dockerfile +++ b/dist/docker/Dockerfile @@ -1,3 +1,4 @@ FROM alpine:3.12.4 RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* COPY cassowary /usr/bin/cassowary +ENTRYPOINT ["cassowary", "run"] diff --git a/dist/rpm/cassowary.spec b/dist/rpm/cassowary.spec index 3920039..5392f77 100644 --- a/dist/rpm/cassowary.spec +++ b/dist/rpm/cassowary.spec @@ -1,7 +1,7 @@ %global bindir /usr/local/sbin Name: cassowary -Version: 0.10.0 +Version: 0.14.0 Release: 1 Summary: Modern cross-platform HTTP load-testing tool written in Go License: MIT @@ -30,3 +30,5 @@ Modern cross-platform HTTP load-testing tool written in Go %changelog * Fri Jan 24 2020 - Cassowary spec file +* Mon Jun 13 2022 +- Uplift release version From 6aa428702a41bac7df8a00dd63e9f7c533fbaee9 Mon Sep 17 00:00:00 2001 From: "Zhou, Wen" Date: Tue, 14 Jun 2022 06:38:15 +0200 Subject: [PATCH 2/2] Update: after code review --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f24220e..b2ed624 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ $ docker run rogerw/cassowary:v0.14.0 cassowary run -u http://www.example.com -c For local development: ```bash -$ env GOOS=linux go build -o dist/docker +$ GOOS=linux go build -o dist/docker/cassowary cmd/cassowary/*.go $ docker build -f dist/docker/Dockerfile -t test_cassowary dist/docker $ docker run test_cassowary -u http://www.example.com -c 1 -n 10 ```