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

adds dev_portal to /website #15

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ name: ci_integration

on:
push:
branches: [master]
branches:
- master
paths:
- "asp/**"

jobs:
test:
name: integration tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./asp
steps:
- uses: actions/setup-go@v3
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ on:
push:
tags:
- "*"
paths:
- "asp/**"

jobs:
goreleaser:
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./asp
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@ name: ci_unit

on:
push:
paths:
- "asp/**"
branches: [master]
pull_request:
branches: [master]
branches:
- master
paths:
- "asp/**"

jobs:
test:
name: unit tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./asp
steps:
- uses: actions/setup-go@v3
with:
Expand All @@ -19,6 +27,7 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
working-directory: ./asp
- name: check code integrity
uses: securego/gosec@master
with:
Expand Down
10 changes: 9 additions & 1 deletion README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# ark
# Ark monorepo

This is the monorepo containing the initial Ark products.

In this repository you can find:

* `asp` - a proof of concept of an Ark Service Provider.
* `dev-portal` - the website where to find documentation about Ark protocol and products.
* `noah` - the initial Ark wallet, served as CLI.
File renamed without changes.
File renamed without changes.
36 changes: 18 additions & 18 deletions .goreleaser.yaml → asp/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
builds:
- id: "coordinatord"
main: ./cmd/coordinatord
- id: "arkd"
main: ./cmd/arkd
ldflags:
- -s -X 'main.version={{.Version}}' -X 'main.commit={{.Commit}}' -X 'main.date={{.Date}}'
goos:
Expand All @@ -9,7 +9,7 @@ builds:
goarch:
- amd64
- arm64
binary: coordinatord
binary: arkd

## flag the semver v**.**.**-<tag>.* as pre-release on Github
release:
Expand All @@ -25,11 +25,11 @@ changelog:
use: github-native

archives:
- id: coordinatord
- id: arkd
format: binary
builds:
- coordinatord
name_template: "coordinatord-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
- arkd
name_template: "arkd-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"

dockers:
###########################
Expand All @@ -38,12 +38,12 @@ dockers:

#amd64
- image_templates:
- "ghcr.io/ark-network/coordinatord:{{ .Tag }}-amd64"
- "ghcr.io/ark-network/arkd:{{ .Tag }}-amd64"
# push always either release or prerelease with a docker tag with the semver only
skip_push: "false"
use: buildx
ids:
- coordinatord
- arkd
dockerfile: goreleaser.Dockerfile
# GOOS of the built binaries/packages that should be used.
goos: linux
Expand All @@ -54,19 +54,19 @@ dockers:
- "--platform=linux/amd64"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=coordinatord"
- "--label=org.opencontainers.image.title=arkd"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--build-arg=VERSION={{.Version}}"
- "--build-arg=COMMIT={{.Commit}}"
- "--build-arg=DATE={{.Date}}"
- image_templates:
- "ghcr.io/ark-network/coordinatord:{{ .Tag }}-arm64v8"
- "ghcr.io/ark-network/arkd:{{ .Tag }}-arm64v8"
# push always either release or prerelease with a docker tag with the semver only
skip_push: "false"
use: buildx
ids:
- coordinatord
- arkd
dockerfile: goreleaser.Dockerfile
# GOOS of the built binaries/packages that should be used.
goos: linux
Expand All @@ -77,23 +77,23 @@ dockers:
- "--platform=linux/arm64/v8"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=coordinatord"
- "--label=org.opencontainers.image.title=arkd"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--build-arg=VERSION={{.Version}}"
- "--build-arg=COMMIT={{.Commit}}"
- "--build-arg=DATE={{.Date}}"

docker_manifests:
- name_template: ghcr.io/ark-network/coordinatord:{{ .Tag }}
- name_template: ghcr.io/ark-network/arkd:{{ .Tag }}
image_templates:
- ghcr.io/ark-network/coordinatord:{{ .Tag }}-amd64
- ghcr.io/ark-network/coordinatord:{{ .Tag }}-arm64v8
- ghcr.io/ark-network/arkd:{{ .Tag }}-amd64
- ghcr.io/ark-network/arkd:{{ .Tag }}-arm64v8
skip_push: "false"

- name_template: ghcr.io/ark-network/coordinatord:latest
- name_template: ghcr.io/ark-network/arkd:latest
image_templates:
- ghcr.io/ark-network/coordinatord:{{ .Tag }}-amd64
- ghcr.io/ark-network/coordinatord:{{ .Tag }}-arm64v8
- ghcr.io/ark-network/arkd:{{ .Tag }}-amd64
- ghcr.io/ark-network/arkd:{{ .Tag }}-arm64v8
skip_push: auto

14 changes: 7 additions & 7 deletions Dockerfile → asp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ WORKDIR /app

COPY . .

RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-X 'main.Version=${COMMIT}' -X 'main.Commit=${COMMIT}' -X 'main.Date=${COMMIT}'" -o bin/coordinatord cmd/coordinatord/main.go
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-X 'main.Version=${COMMIT}' -X 'main.Commit=${COMMIT}' -X 'main.Date=${COMMIT}'" -o bin/arkd cmd/arkd/main.go

# Second image, running the coordinatord executable
# Second image, running the arkd executable
FROM debian:buster-slim

# $USER name, and data $DIR to be used in the 'final' image
Expand All @@ -31,11 +31,11 @@ RUN adduser --disabled-password \
"$USER"
USER $USER

# Prevents 'VOLUME $DIR/.coordinatord/' being created as owned by 'root'
RUN mkdir -p "$DIR/.coordinatord/"
# Prevents 'VOLUME $DIR/.arkd/' being created as owned by 'root'
RUN mkdir -p "$DIR/.arkd/"

# Expose volume containing all 'coordinatord' data
VOLUME $DIR/.coordinatord/
# Expose volume containing all 'arkd' data
VOLUME $DIR/.arkd/

ENTRYPOINT [ "coordinatord" ]
ENTRYPOINT [ "arkd" ]

File renamed without changes.
8 changes: 4 additions & 4 deletions Makefile → asp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## build: build for all platforms
build:
@echo "Building coordinatord binary..."
@echo "Building arkd binary..."
@bash ./scripts/build

build-noah:
Expand Down Expand Up @@ -36,9 +36,9 @@ lint:

## run: run in dev mode
run: clean
@echo "Running coordinatord in dev mode..."
@export ARK_COORDINATOR_WALLET_ADDR=localhost:18000; \
go run ./cmd/coordinatord
@echo "Running arkd in dev mode..."
@export ARK_WALLET_ADDR=localhost:18000; \
go run ./cmd/arkd

## test: runs unit and component tests
test:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"swagger": "2.0",
"info": {
"title": "coordinator/v1/service.proto",
"title": "ark/v1/service.proto",
"version": "version not set"
},
"tags": [
{
"name": "CoordinatorService"
"name": "ArkService"
}
],
"consumes": [
Expand All @@ -18,7 +18,7 @@
"paths": {
"/v1/payment/claim": {
"post": {
"operationId": "CoordinatorService_ClaimPayment",
"operationId": "ArkService_ClaimPayment",
"responses": {
"200": {
"description": "A successful response.",
Expand All @@ -44,13 +44,13 @@
}
],
"tags": [
"CoordinatorService"
"ArkService"
]
}
},
"/v1/payment/finalize": {
"post": {
"operationId": "CoordinatorService_FinalizePayment",
"operationId": "ArkService_FinalizePayment",
"responses": {
"200": {
"description": "A successful response.",
Expand All @@ -76,13 +76,13 @@
}
],
"tags": [
"CoordinatorService"
"ArkService"
]
}
},
"/v1/payment/register": {
"post": {
"operationId": "CoordinatorService_RegisterPayment",
"operationId": "ArkService_RegisterPayment",
"responses": {
"200": {
"description": "A successful response.",
Expand All @@ -108,13 +108,13 @@
}
],
"tags": [
"CoordinatorService"
"ArkService"
]
}
},
"/v1/round/{txid}": {
"get": {
"operationId": "CoordinatorService_GetRound",
"operationId": "ArkService_GetRound",
"responses": {
"200": {
"description": "A successful response.",
Expand All @@ -138,13 +138,13 @@
}
],
"tags": [
"CoordinatorService"
"ArkService"
]
}
},
"/v1/rounds": {
"post": {
"operationId": "CoordinatorService_ListRounds",
"operationId": "ArkService_ListRounds",
"responses": {
"200": {
"description": "A successful response.",
Expand All @@ -170,7 +170,7 @@
}
],
"tags": [
"CoordinatorService"
"ArkService"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
syntax = "proto3";

package coordinator.v1;
package ark.v1;

import "google/api/annotations.proto";

service CoordinatorService {
service ArkService {
rpc RegisterPayment(RegisterPaymentRequest) returns (RegisterPaymentResponse) {
option (google.api.http) = {
post: "/v1/payment/register"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: v1
name: buf.build/ark-network/coordinator
name: buf.build/ark-network/ark
deps:
- buf.build/googleapis/googleapis
breaking:
Expand Down
Loading
Loading