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

v0.2.7 Release #165

Merged
merged 15 commits into from
Oct 14, 2020
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ build_*
build/src/dist
build/ui_openvpn/build

# Ignore tests
build/src/test

# Version data file
.version.json
.git-data.json
16 changes: 5 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
name: "Main"
on:
pull_request:
paths:
- "build/**"
- ".github/workflows/main.yml"
push:
branches:
- "master"
- "v[0-9]+.[0-9]+.[0-9]+"
paths:
- "build/**"
paths-ignore:
- "README.md"

jobs:
unit-test:
runs-on: ubuntu-16.04
name: Tests
env:
working-directory: ./build/src
defaults:
run:
working-directory: ./build/src
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "10.x"
- run: yarn install
working-directory: ${{ env.working-directory }}
- run: yarn lint
working-directory: ${{ env.working-directory }}
- run: yarn test
working-directory: ${{ env.working-directory }}
- run: yarn test:int
working-directory: ${{ env.working-directory }}

build-test:
runs-on: ubuntu-16.04
Expand Down
20 changes: 7 additions & 13 deletions build/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
##########################
# Build dependencies
##########################
FROM alpine:3.9 as build
# --platform=$BUILDPLATFORM is used build javascript source with host arch
# Otherwise webpack builds on emulated archs can be extremely slow (+1h)
FROM --platform=${BUILDPLATFORM:-amd64} node:10.19.0-alpine as build

WORKDIR /usr/src/app

RUN apk add --update --no-cache \
build-base python libpcap-dev linux-headers bash nodejs yarn npm
build-base python libpcap-dev linux-headers bash

COPY build/src/package.json ./
COPY build/src/yarn.lock ./
Expand All @@ -31,7 +33,7 @@ RUN yarn build
##########################
# Compute git data
##########################
FROM alpine:3.9 as git-data
FROM --platform=${BUILDPLATFORM:-amd64} node:10.19.0-alpine as git-data

WORKDIR /usr/src/app

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

WORKDIR /usr/src/app

# ensuring both package.json AND package-lock.json are copied
COPY build/ui_openvpn/package*.json ./
COPY build/ui_openvpn/*lock* ./
# install dependencies
RUN apk add --no-cache nodejs yarn
RUN yarn install --production
# copy the contents of the app
COPY build/ui_openvpn .
Expand All @@ -72,14 +73,7 @@ FROM alpine:3.9
WORKDIR /usr/src/app

RUN apk add --update \
openvpn \
iptables \
bash \
easy-rsa \
openssl \
jq \
sed \
nodejs
openvpn iptables bash easy-rsa openssl nodejs
RUN ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*

Expand Down
9 changes: 0 additions & 9 deletions build/.dockerignore

This file was deleted.

7 changes: 0 additions & 7 deletions build/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"chai": "^4.1.2",
"coveralls": "^3.0.6",
"eslint": "^6.4.0",
"husky": "^1.3.1",
"mocha": "^6.2.0",
"nyc": "^14.1.1",
"prettier": "^1.16.4",
Expand All @@ -61,11 +60,5 @@
"sinon-chai": "^3.1.0",
"ts-node": "^8.10.2",
"typescript": "^3.9.6"
},
"husky": {
"hooks": {
"pre-commit": "npm run pre-commit",
"pre-push": "npm run pre-commit"
}
}
}
Loading