Skip to content

Commit 12ae223

Browse files
authored
Merge pull request #165 from dappnode/v0.2.7
v0.2.7 Release
2 parents 5b01da9 + de04bb5 commit 12ae223

10 files changed

Lines changed: 1721 additions & 1877 deletions

File tree

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ build_*
1313
build/src/dist
1414
build/ui_openvpn/build
1515

16+
# Ignore tests
17+
build/src/test
18+
1619
# Version data file
1720
.version.json
1821
.git-data.json

.github/workflows/main.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,30 @@
11
name: "Main"
22
on:
33
pull_request:
4-
paths:
5-
- "build/**"
6-
- ".github/workflows/main.yml"
74
push:
85
branches:
96
- "master"
107
- "v[0-9]+.[0-9]+.[0-9]+"
11-
paths:
12-
- "build/**"
8+
paths-ignore:
9+
- "README.md"
1310

1411
jobs:
1512
unit-test:
1613
runs-on: ubuntu-16.04
1714
name: Tests
18-
env:
19-
working-directory: ./build/src
15+
defaults:
16+
run:
17+
working-directory: ./build/src
2018
steps:
2119
- uses: actions/checkout@v2
2220
- name: Setup node
2321
uses: actions/setup-node@v1
2422
with:
2523
node-version: "10.x"
2624
- run: yarn install
27-
working-directory: ${{ env.working-directory }}
2825
- run: yarn lint
29-
working-directory: ${{ env.working-directory }}
3026
- run: yarn test
31-
working-directory: ${{ env.working-directory }}
3227
- run: yarn test:int
33-
working-directory: ${{ env.working-directory }}
3428

3529
build-test:
3630
runs-on: ubuntu-16.04

build/Dockerfile renamed to Dockerfile

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
##########################
22
# Build dependencies
33
##########################
4-
FROM alpine:3.9 as build
4+
# --platform=$BUILDPLATFORM is used build javascript source with host arch
5+
# Otherwise webpack builds on emulated archs can be extremely slow (+1h)
6+
FROM --platform=${BUILDPLATFORM:-amd64} node:10.19.0-alpine as build
57

68
WORKDIR /usr/src/app
79

810
RUN apk add --update --no-cache \
9-
build-base python libpcap-dev linux-headers bash nodejs yarn npm
11+
build-base python libpcap-dev linux-headers bash
1012

1113
COPY build/src/package.json ./
1214
COPY build/src/yarn.lock ./
@@ -31,7 +33,7 @@ RUN yarn build
3133
##########################
3234
# Compute git data
3335
##########################
34-
FROM alpine:3.9 as git-data
36+
FROM --platform=${BUILDPLATFORM:-amd64} node:10.19.0-alpine as git-data
3537

3638
WORKDIR /usr/src/app
3739

@@ -45,15 +47,14 @@ RUN node getGitData /usr/src/app/.git-data.json
4547
##########################
4648
# Build UI
4749
##########################
48-
FROM alpine:3.9 as build-ui
50+
FROM --platform=${BUILDPLATFORM:-amd64} node:10.19.0-alpine as build-ui
4951

5052
WORKDIR /usr/src/app
5153

5254
# ensuring both package.json AND package-lock.json are copied
5355
COPY build/ui_openvpn/package*.json ./
5456
COPY build/ui_openvpn/*lock* ./
5557
# install dependencies
56-
RUN apk add --no-cache nodejs yarn
5758
RUN yarn install --production
5859
# copy the contents of the app
5960
COPY build/ui_openvpn .
@@ -72,14 +73,7 @@ FROM alpine:3.9
7273
WORKDIR /usr/src/app
7374

7475
RUN apk add --update \
75-
openvpn \
76-
iptables \
77-
bash \
78-
easy-rsa \
79-
openssl \
80-
jq \
81-
sed \
82-
nodejs
76+
openvpn iptables bash easy-rsa openssl nodejs
8377
RUN ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
8478
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*
8579

build/.dockerignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

build/src/package.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"chai": "^4.1.2",
5353
"coveralls": "^3.0.6",
5454
"eslint": "^6.4.0",
55-
"husky": "^1.3.1",
5655
"mocha": "^6.2.0",
5756
"nyc": "^14.1.1",
5857
"prettier": "^1.16.4",
@@ -61,11 +60,5 @@
6160
"sinon-chai": "^3.1.0",
6261
"ts-node": "^8.10.2",
6362
"typescript": "^3.9.6"
64-
},
65-
"husky": {
66-
"hooks": {
67-
"pre-commit": "npm run pre-commit",
68-
"pre-push": "npm run pre-commit"
69-
}
7063
}
7164
}

0 commit comments

Comments
 (0)