-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update dependency and add demo for consul2istio
Signed-off-by: chentanjun <[email protected]>
- Loading branch information
1 parent
f6ba6a6
commit f8d7bff
Showing
21 changed files
with
710 additions
and
1,228 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -11,23 +11,30 @@ jobs: | |
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14.4 | ||
go-version: 1.19 | ||
- name: Build | ||
run: go build -race ./... | ||
- name: Test | ||
run: go test -race ./... | ||
golangci-lint: | ||
name: golangci-lint | ||
run: go test -race `go list ./... | grep -v e2e` | ||
go-lint: | ||
name: go-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
- name: golint | ||
uses: Jerome1337/[email protected] | ||
with: | ||
golint-path: './...' | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.19 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
- uses: actions/checkout@v2 | ||
uses: golangci/[email protected] | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.31 | ||
args: --timeout=10m --tests="false" | ||
version: v1.47.0 | ||
style-check: | ||
name: gofmt and goimports | ||
runs-on: ubuntu-latest | ||
|
@@ -37,23 +44,21 @@ jobs: | |
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14.4 | ||
go-version: 1.19 | ||
- name: Install dependencies | ||
run: | | ||
go version | ||
go get golang.org/x/tools/cmd/goimports | ||
go install golang.org/x/tools/cmd/goimports@latest | ||
- name: gofmt and goimports | ||
run: | | ||
gofmt -l -d ./ | ||
goimports -l -d ./ | ||
run: make style-check | ||
checkgomod: | ||
name: check go.mod and go.sum | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14.4 | ||
go-version: 1.19 | ||
- run: go mod tidy | ||
- name: Check for changes in go.mod or go.sum | ||
run: | | ||
|
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,44 @@ | ||
name: Auto Build and Push image | ||
|
||
on: | ||
create | ||
|
||
jobs: | ||
publish_image: | ||
name: Build and Push consul2istio image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
with: | ||
submodules: recursive | ||
|
||
- name: Extract Tags name | ||
if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
id: tag_env | ||
shell: bash | ||
run: | | ||
echo "##[set-output name=version;]$(echo ${GITHUB_REF##*/})" | ||
- name: Extract Tags Type | ||
if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
id: tag_type | ||
shell: bash | ||
run: | | ||
echo "##[set-output name=version;]$(echo ${GITHUB_REF#refs/tags/})" | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build consul2istio Docker Image | ||
if: ${{ startsWith(steps.tag_type.outputs.version, 'consul2istio/') }} | ||
run: | | ||
make docker-build tag=${{ steps.tag_env.outputs.version }} | ||
- name: Push Aeraki Docker image | ||
if: ${{ startsWith(steps.tag_type.outputs.version, 'aeraki/') }} | ||
run: | | ||
docker push ghcr.io/aeraki-mesh/consul2istio:${{ steps.tag_env.outputs.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 |
---|---|---|
@@ -1,2 +1,6 @@ | ||
.idea/ | ||
out/ | ||
**/.DS_Store | ||
debug | ||
out | ||
.idea | ||
tmp | ||
.vscode |
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
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
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
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 |
---|---|---|
@@ -1,35 +1,25 @@ | ||
FROM ubuntu:bionic | ||
# Base image for debug builds. | ||
# Built manually uploaded as "istionightly/base_debug" | ||
# Copyright Aeraki Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Do not add more stuff to this list that isn't small or critically useful. | ||
# If you occasionally need something on the container do | ||
# sudo apt-get update && apt-get whichever | ||
FROM alpine:3.17 | ||
|
||
# hadolint ignore=DL3005,DL3008 | ||
ARG CONSUL2ISTIO_BIN_DIR | ||
ARG ARCH | ||
ARG OS | ||
|
||
ENV consulAddress="127.0.0.1:8500" | ||
RUN apk update && \ | ||
apk add curl | ||
|
||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
ca-certificates \ | ||
curl \ | ||
iptables \ | ||
iproute2 \ | ||
iputils-ping \ | ||
knot-dnsutils \ | ||
netcat \ | ||
tcpdump \ | ||
conntrack \ | ||
bsdmainutils \ | ||
net-tools \ | ||
lsof \ | ||
linux-tools-generic \ | ||
sudo \ | ||
&& update-ca-certificates \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/log/*log /var/lib/apt/lists/* /var/log/apt/* /var/lib/dpkg/*-old /var/cache/debconf/*-old | ||
|
||
COPY consul2istio /usr/local/bin/ | ||
ENTRYPOINT /usr/local/bin/consul2istio -consulAddress=$consulAddress | ||
COPY ${CONSUL2ISTIO_BIN_DIR}/${ARCH}/${OS}/consul2istio /usr/local/bin/ | ||
ENTRYPOINT /usr/local/bin/consul2istio |
Oops, something went wrong.