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

Feature/add go releaser #1

Merged
merged 12 commits into from
Jan 18, 2022
35 changes: 35 additions & 0 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: goreleaser

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GORELEASER }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
ripley
.idea/
dist/
65 changes: 65 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
release:
mode: replace

before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
brews:
-
name: ripley
tap:
owner: loveholidays
name: homebrew-tap
commit_author:
name: loveholidays
email: oss@loveholidays.com
folder: Formula
homepage: "https://github.com/loveholidays/ripley"
description: "Replays HTTP traffic at multiples of the original rate"
install: |
bin.install "ripley"
license: "GPL-3.0"
dockers:
- image_templates: ["loveholidays/{{ .ProjectName }}:{{ .Version }}-amd64"]
goarch: amd64
dockerfile: Dockerfile
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.source=https://github.com/loveholidays/ripley
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=GPL-3.0
- image_templates: [ "loveholidays/{{ .ProjectName }}:latest" ]
goarch: amd64
dockerfile: Dockerfile
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.source=https://github.com/loveholidays/ripley
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=GPL-3.0
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Start fresh from a smaller image
FROM alpine:3.15.0
RUN apk add ca-certificates

COPY ripley /usr/bin/ripley
ENTRYPOINT ["/usr/bin/ripley"]
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,32 @@

Ripley replays HTTP traffic at multiples of the original rate. It simulates traffic ramp up or down by specifying rate phases for each run. For example, you can replay HTTP requests at twice the original rate for ten minutes, then three times the original rate for five minutes, then ten times the original rate for an hour and so on. Ripley's original use case is load testing by replaying HTTP access logs from production applications.

## Quickstart
## Install

Clone and build ripley
### Pre-built

MasOS:
```bash
brew install loveholidays/tap/ripley
```
Docker:
```bash
docker pull loveholidays/ripley
```
Linux:

Grab the latest OS/Arch compatible binary from our [Releases](https://github.com/loveholidays/ripley/releases) page.


### From source

```bash
git clone git@github.com:loveholidays/ripley.git
cd ripley
go build -o ripley main.go
```

#### Quickstart from source
Run a web server to replay traffic against

```bash
Expand Down