Skip to content

Commit c3a43b5

Browse files
author
David Liu
authoredAug 16, 2021
migrate to TWGC (Hyperledger-TWGC#198)
Signed-off-by: DavidLiu <david.yx.liu@oracle.com>
1 parent 877a535 commit c3a43b5

8 files changed

+91
-47
lines changed
 

‎.dockerignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ node_modules
77
fabric-samples
88
.vscode
99
.gitignore
10-
fabrictape
11-
todo
10+
1211
config.yaml
1312
organizations
1413
mocktmp

‎.github/release.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: release latest
2+
3+
on:
4+
push:
5+
branches: ["master", "alpha"]
6+
tags: "v*"
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
10+
11+
jobs:
12+
build-and-push-image:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v2
21+
22+
- name: Log in to the Container registry
23+
uses: docker/login-action@master
24+
with:
25+
registry: ${{ env.REGISTRY }}
26+
username: davidkhala
27+
password: ${{ secrets.TWGC_DAVIDKHALA }}
28+
29+
- name: Extract metadata (tags, labels) for Docker
30+
id: meta
31+
uses: docker/metadata-action@master
32+
with:
33+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
34+
tags: |
35+
type=edge,branch=alpha
36+
type=ref,event=tag
37+
- if: github.ref != 'refs/heads/master'
38+
name: Build and push Docker image
39+
uses: docker/build-push-action@master
40+
with:
41+
context: .
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}
45+
- if: github.ref == 'refs/heads/master'
46+
name: Build and push Docker image
47+
uses: docker/build-push-action@master
48+
with:
49+
context: .
50+
push: true
51+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
52+
labels: ${{ steps.meta.outputs.labels }}

‎Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ BASE_VERSION = 0.0.2
1313
PREV_VERSION = 0.0.1
1414

1515
PROJECT_NAME = tape
16-
DOCKERIMAGE = guoger/tape
16+
DOCKERIMAGE = ghcr.io/hyperledger-twgc/tape
1717
export DOCKERIMAGE
1818
EXTRA_VERSION ?= $(shell git rev-parse --short HEAD)
1919
BuiltTime ?= $(shell date)
2020
PROJECT_VERSION=$(BASE_APISERVER_VERSION)-snapshot-$(EXTRA_VERSION)
2121

22-
PKGNAME = github.com/guoger/$(PROJECT_NAME)
22+
PKGNAME = github.com/hyperledger-twgc/$(PROJECT_NAME)
2323
CGO_FLAGS = CGO_CFLAGS=" "
2424
ARCH=$(shell go env GOARCH)
2525
MARCH=$(shell go env GOOS)-$(shell go env GOARCH)
@@ -42,7 +42,7 @@ tape:
4242
.PHONY: docker
4343
docker:
4444
@echo "Building tape docker......"
45-
docker build .
45+
docker build . --tag=ghcr.io/hyperledger-twgc/tape
4646

4747
.PHONY: unit-test
4848
unit-test:

‎README-zh.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Tape由负载生成器客户端和观察者客户端组成。因此Tape仅可以
2525

2626
如果你想详细了解 Tape 工作流程,请参考[工作流程](docs/workflow.md)
2727

28-
如果你在使用过程中遇到了问题请参考[FAQ](docs/FAQ.md),如果 FAQ 还不能解决你的问题,请在 github 中提 issue,或者发邮件咨询项目维护者。
28+
如果你在使用过程中遇到了问题请参考[FAQ](https://github.com/Hyperledger-TWGC/tape/wiki/FAQ),如果 FAQ 还不能解决你的问题,请在 github 中提 issue,或者发邮件咨询项目维护者。
2929

3030

3131
## [如何贡献](CONTRIBUTING.md)

‎README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ Our main focus is to make sure that *tape will not be the bottleneck of performa
3434
### Install
3535

3636
You could get `tape` in three ways:
37-
1. Download binary: get release tar from [release page](https://github.com/guoger/tape/releases), and extract `tape` binary from it
37+
1. Download binary: get release tar from [release page](https://github.com/hyperledger-twgc/tape/releases), and extract `tape` binary from it
3838
2. Build from source: clone this repo and run `make tape` at root dir. Go1.14 or higher is required. `tape` binary will be available at project root directory.
39-
3. Pull docker image: `docker pull guoger/tape`
39+
3. Pull docker image: `docker pull ghcr.io/hyperledger-twgc/tape`
4040

4141
### [Configure](docs/configfile.md)
4242

@@ -49,7 +49,8 @@ Execute `./tape -c config.yaml -n 40000` to generate 40000 transactions to Fabri
4949
#### Docker
5050

5151
```
52-
docker run -v $PWD:/tmp guoger/tape tape -c $CONFIG_FILE -n 40000
52+
53+
docker run -v $PWD:/tmp ghcr.io/hyperledger-twgc/tape tape -c $CONFIG_FILE -n 40000
5354
```
5455

5556
*Set this to integer times of batchsize, so that last block is not cut due to timeout*. For example, if you have batch size of 500, set this to 500, 1000, 40000, 100000, etc.

‎azure-pipelines.yml

+26-26
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525
strategy:
2626
matrix:
2727
linux:
28-
imageName: 'ubuntu-latest'
28+
imageName: "ubuntu-latest"
2929
mac:
30-
imageName: 'macOS-latest'
31-
# windows:
32-
# imageName: 'windows-latest'
30+
imageName: "macOS-latest"
31+
# windows:
32+
# imageName: 'windows-latest'
3333
displayName: ut
3434
pool:
3535
vmImage: $(imageName)
@@ -38,7 +38,7 @@ jobs:
3838
displayName: install make tool
3939
- task: GoTool@0
4040
inputs:
41-
version: '1.14'
41+
version: "1.14"
4242
displayName: install go
4343
- script: make basic-checks
4444
displayName: run basic checks like linter
@@ -52,34 +52,34 @@ jobs:
5252
- job: dockerbuild
5353
displayName: dockerbuild
5454
steps:
55-
- script: make docker
56-
displayName: build tape docker
55+
- script: make docker
56+
displayName: build tape docker
5757

5858
- job: integrationTest
5959
displayName: integrationTest
6060
dependsOn:
61-
- ut
62-
- dockerbuild
61+
- ut
62+
- dockerbuild
6363
strategy:
6464
matrix:
6565
FABRIC_2_2:
66-
FABRIC_VERSION: '2_2'
67-
INTERGATION_CASE: 'ANDLogic'
66+
FABRIC_VERSION: "2_2"
67+
INTERGATION_CASE: "ANDLogic"
6868
FABRIC_2_2_ORLogic:
69-
FABRIC_VERSION: '2_2'
70-
INTERGATION_CASE: 'ORLogic'
69+
FABRIC_VERSION: "2_2"
70+
INTERGATION_CASE: "ORLogic"
7171
FABRIC_2_3:
72-
FABRIC_VERSION: '2_3'
73-
INTERGATION_CASE: 'ANDLogic'
72+
FABRIC_VERSION: "2_3"
73+
INTERGATION_CASE: "ANDLogic"
7474
FABRIC_2_3_ORLogic:
75-
FABRIC_VERSION: '2_3'
76-
INTERGATION_CASE: 'ORLogic'
75+
FABRIC_VERSION: "2_3"
76+
INTERGATION_CASE: "ORLogic"
7777
FABRIC_1_4:
78-
FABRIC_VERSION: '1_4'
79-
INTERGATION_CASE: 'ANDLogic'
78+
FABRIC_VERSION: "1_4"
79+
INTERGATION_CASE: "ANDLogic"
8080
LATEST:
81-
FABRIC_VERSION: 'latest'
82-
INTERGATION_CASE: 'ANDLogic'
81+
FABRIC_VERSION: "latest"
82+
INTERGATION_CASE: "ANDLogic"
8383
steps:
8484
- script: make integration-test FABRIC_VERSION=$(FABRIC_VERSION) INTERGATION_CASE=$(INTERGATION_CASE)
8585

@@ -91,12 +91,12 @@ jobs:
9191
- script: GOOS=linux GOARCH=amd64 make tape && cp tape linux-amd64 && cp config.yaml linux-amd64 && tar -czvf "tape-linux-amd64.tar.gz" linux-amd64 && GOOS=darwin GOARCH=amd64 make tape && cp tape darwin-amd64 && cp config.yaml darwin-amd64 && tar -czvf "tape-darwin-amd64.tar.gz" darwin-amd64 && GOOS=windows GOARCH=amd64 make tape && cp tape windows-amd64 && cp config.yaml windows-amd64 && tar -czvf "tape-windows-amd64.tar.gz" windows-amd64
9292
displayName: Compile Binary and Create Tarball
9393
- task: GithubRelease@0
94-
displayName: 'Create GitHub Release'
94+
displayName: "Create GitHub Release"
9595
inputs:
96-
repositoryName: '$(Build.Repository.Name)'
96+
repositoryName: "$(Build.Repository.Name)"
9797
gitHubConnection: github.com_stone-ch
98-
action: 'create'
99-
tagSource: 'auto'
100-
tagPattern: 'v.*'
98+
action: "create"
99+
tagSource: "auto"
100+
tagPattern: "v.*"
101101
assets: |
102102
./*.tar.gz

‎docs/FAQ.md

-4
This file was deleted.

‎docs/gettingstarted.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
你可以通过以下三种方式安装 `tape`
1010

11-
1. **下载二进制文件**:从[这里](https://github.com/guoger/tape/releases)下载 tar 包,并解压。
11+
1. **下载二进制文件**:从[这里](https://github.com/hyperledger-twgc/tape/releases)下载 tar 包,并解压。
1212

1313
2. **本地编译**:克隆本仓库并在根目录运行如下命令进行编译:
1414

@@ -27,22 +27,18 @@
2727
3. **拉取 Docker 镜像**:
2828
2929
```
30-
docker pull guoger/tape
30+
docker pull ghcr.io/hyperledger-twgc/tape
3131
```
3232
3333
## 编译 Docker(可选)
3434
35-
Tape docker镜像下载
36-
```shell
37-
docker pull guoger/tape
38-
```
3935
Tape 支持本地编译 Docker 镜像,在项目根目录下执行以下命令即可:
4036
4137
```shell
42-
docker build -t guoger/tape:latest .
38+
make docker
4339
```
4440

45-
执行成功之后本地会增加一个 guoger/tape:latest 的 Docker 镜像。
41+
执行成功之后本地会增加一个 ghcr.io/hyperledger-twgc/tape:latest 的 Docker 镜像。
4642

4743
## 修改配置文件
4844

0 commit comments

Comments
 (0)
Please sign in to comment.