-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: wangyizhi1 <wangyizhi1@cmss.chinamobile.com>
- Loading branch information
wangyizhi1
committed
Oct 9, 2023
1 parent
bf3d70b
commit 97f9b9a
Showing
9 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM alpine:3.17.1 | ||
|
||
ARG BINARY | ||
|
||
RUN apk add --no-cache ca-certificates | ||
RUN apk update && apk upgrade | ||
RUN apk add ip6tables iptables curl tcpdump busybox-extras | ||
|
||
COPY ${BINARY} /bin/${BINARY} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CGO_ENABLED:=0 | ||
GOOS?=linux | ||
GOARCH?=amd64 | ||
VERSION?=1.0.0 | ||
REGISTRY?="ghcr.io/wangyizhi1" | ||
BINARY:=citest | ||
|
||
.PHONY: binary | ||
binary: | ||
CGO_ENABLED=$(CGO_ENABLED) GOOS=${GOOS} GOARCH=${GOARCH} go build -v -o $(BINARY) | ||
|
||
.PHONY: image | ||
image: binary | ||
set -e;\ | ||
docker buildx build --output=type=docker --platform ${GOOS}/${GOARCH} --tag ${REGISTRY}/citest:v${VERSION} . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module wangyizhi.io/ci-test | ||
|
||
go 1.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
func main() { | ||
fmt.Println("ci-test") | ||
} |