File tree Expand file tree Collapse file tree 5 files changed +111
-17
lines changed
Expand file tree Collapse file tree 5 files changed +111
-17
lines changed Original file line number Diff line number Diff line change 1+ name : Build and push :master image
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ check :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ - name : check format
14+ run : make check_format
15+ build :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - uses : actions/checkout@v2
19+
20+ - name : deps
21+ run : sudo apt-get update -y && sudo apt-get install stunnel4 redis -y
22+
23+ - name : build and push docker image
24+ run : |
25+ redis-server --port 6380 &
26+ redis-server --port 6381 --requirepass password123 &
27+ redis-server --port 6382 --requirepass password123 &
28+ redis-server --port 6384 --requirepass password123 &
29+ redis-server --port 6385 --requirepass password123 &
30+ echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
31+ make bootstrap bootstrap_redis_tls docker_push
32+ env :
33+ DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
34+ DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
35+ VERSION : master
Original file line number Diff line number Diff line change 1+ name : CI Build and Test for PR
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ check :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v2
11+ - name : check format
12+ run : make check_format
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v2
18+
19+ - name : deps
20+ run : sudo apt-get update -y && sudo apt-get install stunnel4 redis -y
21+
22+ - name : build and test
23+ run : |
24+ redis-server --port 6380 &
25+ redis-server --port 6381 --requirepass password123 &
26+ redis-server --port 6382 --requirepass password123 &
27+ redis-server --port 6384 --requirepass password123 &
28+ redis-server --port 6385 --requirepass password123 &
29+ make bootstrap bootstrap_redis_tls tests_unit tests
Original file line number Diff line number Diff line change 1+ name : Build and push :release image
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ check :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ - name : check format
14+ run : make check_format
15+ build :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - uses : actions/checkout@v2
19+
20+ - name : deps
21+ run : sudo apt-get update -y && sudo apt-get install stunnel4 redis -y
22+
23+ - name : build and push docker image
24+ run : |
25+ redis-server --port 6380 &
26+ redis-server --port 6381 --requirepass password123 &
27+ redis-server --port 6382 --requirepass password123 &
28+ redis-server --port 6384 --requirepass password123 &
29+ redis-server --port 6385 --requirepass password123 &
30+ echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
31+ make bootstrap bootstrap_redis_tls docker_push
32+ env :
33+ DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
34+ DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11export GO111MODULE =on
2+ PROJECT = ratelimit
3+ REGISTRY ?= envoyproxy
4+ IMAGE := $(REGISTRY ) /$(PROJECT )
25MODULE = github.com/envoyproxy/ratelimit
3-
6+ GIT_REF = $(shell git describe --tags || git rev-parse --short=8 --verify HEAD)
7+ VERSION ?= $(GIT_REF )
48SHELL := /bin/bash
59
610.PHONY : bootstrap
@@ -67,6 +71,11 @@ tests_unit: compile
6771tests : compile
6872 go test -race -tags=integration $(MODULE ) /...
6973
70- .PHONY : docker
71- docker : tests
72- docker build . -t envoyproxy/ratelimit:` git rev-parse HEAD`
74+ .PHONY : docker_image
75+ docker_image : tests
76+ docker build . -t $(IMAGE ) :$(VERSION )
77+
78+ .PHONY : docker_push
79+ docker_push : docker_image
80+ docker push $(IMAGE ) :$(VERSION )
81+
You can’t perform that action at this time.
0 commit comments