Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions apps/.123trigger
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2
1 change: 1 addition & 0 deletions apps/.babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./babel.config.js');
3 changes: 3 additions & 0 deletions apps/.codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exclude_patterns:
- "**/*.spec.js"
- "**/*.spec.ts"
1 change: 1 addition & 0 deletions apps/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
10 changes: 10 additions & 0 deletions apps/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true
[*]
indent_style=space
indent_size=2
tab_width=2
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
max_line_length=120
insert_final_newline=true
4 changes: 4 additions & 0 deletions apps/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/build/*
**/coverage/*
**/node_modules/*
i18next-scanner.config.js
16 changes: 16 additions & 0 deletions apps/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const base = require('@polkadot/dev-react/config/eslint');

// add override for any (a metric ton of them, initial conversion)
module.exports = {
...base,
parserOptions: {
...base.parserOptions,
project: [
'./tsconfig.json'
]
},
rules: {
...base.rules,
'@typescript-eslint/no-explicit-any': 'off'
}
};
71 changes: 71 additions & 0 deletions apps/.github/workflows/pr-any.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: PR
on: [pull_request]

jobs:
lint:
name: Linting
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: lint
run: |
yarn install --frozen-lockfile
yarn lint

test:
name: Testing
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: test
run: |
yarn install --frozen-lockfile
yarn test

build_code:
name: Build Code
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: build
run: |
yarn install --frozen-lockfile
yarn build:code

build_i18n:
name: Build i18n
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: build
run: |
yarn install --frozen-lockfile
yarn build:i18n
31 changes: 31 additions & 0 deletions apps/.github/workflows/push-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Master
on:
push:
branches:
- master

jobs:
build_code:
name: Build Code
if: "! contains(github.event.head_commit.message, '[CI Skip]')"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: build
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAGES_SRC: packages/apps/build
GH_PAT: ${{ secrets.GH_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install --frozen-lockfile
yarn polkadot-dev-ghact-build
yarn polkadot-dev-ghact-docs
16 changes: 16 additions & 0 deletions apps/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
build/
coverage/
node_modules/
tmp/
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.npmrc
cc-test-reporter
package-lock.json
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea/
159 changes: 159 additions & 0 deletions apps/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
image: roffe/kubectl:latest
variables:
CI_REGISTRY: parity.azurecr.io
CI_REGISTRY_USER: parity
AUTO_DEVOPS_DOMAIN: poc-3.polkadot.io

.kubernetes: &kubernetes
tags:
- kubernetes

stages:
- dockerize
- test
- review
- staging
- production
- cleanup

before_script:
- export DOCKER_IMAGE=$CI_REGISTRY/$CI_PROJECT_PATH_SLUG
- export DOCKER_TAG=$CI_COMMIT_REF_SLUG-$VERSION
- export DOCKER_IMAGE_FULL_NAME=$DOCKER_IMAGE:$DOCKER_TAG

dockerize:
stage: dockerize
environment:
name: infrastructure_build
tags:
- kubernetes-parity-build
image: docker:git
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375
script:
- echo $DOCKER_IMAGE
- echo $DOCKER_TAG
- echo $DOCKER_IMAGE_FULL_NAME
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"
- docker build -t "$DOCKER_IMAGE_FULL_NAME" .
- docker push "$DOCKER_IMAGE_FULL_NAME"
only:
- master

review:
stage: review
<<: *kubernetes
script:
- setup_kubernetes
- deploy
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://$CI_ENVIRONMENT_SLUG.$AUTO_DEVOPS_DOMAIN
on_stop: stop_review
only:
refs:
- branches
kubernetes: active
except:
- master

stop_review:
stage: cleanup
<<: *kubernetes
variables:
GIT_STRATEGY: none
script:
- setup_kubernetes
- delete
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
when: manual
allow_failure: true
only:
refs:
- branches
kubernetes: active
except:
- master

staging:
stage: staging
<<: *kubernetes
script:
- setup_kubernetes
- deploy
environment:
name: staging
url: https://staging.$AUTO_DEVOPS_DOMAIN
only:
refs:
- master
kubernetes: active

production:
stage: production
<<: *kubernetes
script:
- setup_kubernetes
- deploy
environment:
name: production
url: https://$AUTO_DEVOPS_DOMAIN
when: manual
only:
refs:
- master
kubernetes: active

# ---------------------------------------------------------------------------
.auto_devops: &auto_devops |
# Auto DevOps variables and functions
[[ "$TRACE" ]] && set -x
export DOCKER_IMAGE=$CI_REGISTRY/$CI_PROJECT_PATH_SLUG
export DOCKER_TAG=$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHA
export DOCKER_IMAGE_FULL_NAME=$DOCKER_IMAGE:$DOCKER_TAG

export AUTODEVOPS_HOST=$(echo $CI_ENVIRONMENT_URL | awk -F/ '{print $3}')

function build() {
if [[ -n "$CI_REGISTRY_USER" ]]; then
echo "Logging to GitLab Container Registry with CI credentials..."
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
echo ""
fi

echo "Building Dockerfile-based application..."
docker build -t "$DOCKER_IMAGE_FULL_NAME" .

echo "Pushing to GitLab Container Registry..."
docker push "$DOCKER_IMAGE_FULL_NAME"
echo ""
}

function setup_kubernetes() {
kubectl describe namespace "$KUBE_NAMESPACE" || kubectl create namespace "$KUBE_NAMESPACE"
kubectl create secret -n "$KUBE_NAMESPACE" \
docker-registry gitlab-registry \
--docker-server="$CI_REGISTRY" \
--docker-username="$CI_REGISTRY_USER" \
--docker-password="$CI_REGISTRY_PASSWORD" \
--docker-email="$GITLAB_USER_EMAIL" \
-o yaml --dry-run | kubectl replace -n "$KUBE_NAMESPACE" --force -f -
}

function deploy() {
cat ./deployment.template.yml | envsubst | kubectl apply -n "$KUBE_NAMESPACE" -f -
}

function delete() {
kubectl -n "$KUBE_NAMESPACE" delete "deploy/$CI_ENVIRONMENT_SLUG-backend"
kubectl -n "$KUBE_NAMESPACE" delete "svc/$CI_ENVIRONMENT_SLUG-service"
kubectl -n "$KUBE_NAMESPACE" delete "ing/$CI_ENVIRONMENT_SLUG-ingress"
}

before_script:
- *auto_devops
Empty file added apps/.npmignore
Empty file.
1 change: 1 addition & 0 deletions apps/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10.13.0
19 changes: 19 additions & 0 deletions apps/BOUNTIES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Bounties

From time-to-time we will add bounties for features.

These are generously provided by the [Web3 Foundation](https://web3.foundation/) and as such employees of Parity or those of the W3F are ineligible for them. (This includes people being by either Party for development or community work, related or un-related to polkadot-js).

The idea is that these bounties should be left open to community participation, so only if there is no outside interest for a specific issue, should those directly or indirectly paid by the W3F for work, attempt to close an issue. (in which case it will be "un-bountied")

Current bounties are tracked by the [!bounty](https://github.com/polkadot-js/apps/labels/%21bounty) label.

## Process

Once listed, the normal [Gitcoin](https://gitcoin.co/) process kicks in. This means application, work and payment is managed by this tool. The values for bounties are determined by the size estimation done by the team.

## Some small requests

Please don't start work on an issue until you have been approved via the gitcoin interface. We generally love enthusiasm and code in the repo, however short-cutting the process does create some issues for the management of the bounties. We certainly don't want to be playing favorites if 2 PRs for the same issue are created at the same time. And in cases where somebody else has been approved and an unapproved PR comes in... well, it gets really murky.

When making changes, please do not force push in your PRs, especially not after a review has been started. We will clone your repo and work from that, doing a simple `pull` on a force-pushed branch ends up being, well, less than simple. We squash merge all PRs, so you do not clutter up the history by using stock-standard pushes to your branch.
Loading