Skip to content

Commit c155d4e

Browse files
committed
Merge branch 'release/1.11.1'
2 parents f5b39de + ec25ce5 commit c155d4e

File tree

9 files changed

+3347
-111
lines changed

9 files changed

+3347
-111
lines changed

.circleci/config.yml

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -18,81 +18,11 @@ jobs:
1818
docker:
1919
- image: circleci/node:12
2020
<<: *node_steps
21-
2221
node_10:
2322
docker:
2423
- image: circleci/node:10
2524
<<: *node_steps
2625

27-
docker_test:
28-
machine: true
29-
steps:
30-
- checkout
31-
# Check whether "docker build" is successful or not
32-
- run: docker build -t piping-server .
33-
- run:
34-
name: Working test with Docker image
35-
command: |
36-
set -eux
37-
# Run a server
38-
docker run -d -p 8080:80 --name=piping piping-server --http-port=80
39-
# Wait for server running
40-
sleep 1
41-
# Create a file to send
42-
echo 'hello, world' > /tmp/hello.txt
43-
# Send and wait for a receiver
44-
curl -T /tmp/hello.txt localhost:8080/mypath &
45-
# Get data as a file
46-
curl localhost:8080/mypath > /tmp/download.txt
47-
# Print downloaded file
48-
cat /tmp/download.txt
49-
# Test the equality
50-
diff /tmp/hello.txt /tmp/download.txt
51-
# Print server log
52-
docker logs piping
53-
# Delete container
54-
docker rm -f piping
55-
- run:
56-
name: Working test with Docker image for HTTPS
57-
command: |
58-
set -eux
59-
mkdir ssl_certs
60-
cd ssl_certs
61-
openssl genrsa 2024 > server.key
62-
openssl req -new -key server.key -subj "/C=US" > server.csr
63-
openssl x509 -req -days 3650 -signkey server.key < server.csr > server.crt
64-
cd ..
65-
# Run a server
66-
docker run -d -p 8080:80 -p 8443:443 -v $PWD/ssl_certs:/ssl_certs --name=piping piping-server --http-port=80 --enable-https=true --https-port=443 --key-path=/ssl_certs/server.key --crt-path=/ssl_certs/server.crt
67-
# Wait for server running
68-
sleep 1
69-
# Create a file to send
70-
echo 'hello, world' > /tmp/hello.txt
71-
# Send and wait for a receiver
72-
curl -kT /tmp/hello.txt https://localhost:8443/mypath &
73-
# Get data as a file
74-
curl -k https://localhost:8443/mypath > /tmp/download.txt
75-
# Print downloaded file
76-
cat /tmp/download.txt
77-
# Test the equality
78-
diff /tmp/hello.txt /tmp/download.txt
79-
# Print server log
80-
docker logs piping
81-
# Delete container
82-
docker rm -f piping
83-
84-
# (from: https://circleci.com/blog/publishing-npm-packages-using-circleci-2-0/)
85-
npm_publish:
86-
docker:
87-
- image: circleci/node:12
88-
steps:
89-
- checkout
90-
- run: npm ci
91-
- run:
92-
name: Authenticate with registry
93-
command: echo -e "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
94-
- run: npm publish
95-
9626
workflows:
9727
version: 2
9828
node_tests:
@@ -109,14 +39,3 @@ workflows:
10939
filters:
11040
tags:
11141
only: /.*/
112-
- docker_test
113-
- npm_publish:
114-
requires:
115-
- node_14
116-
- node_12
117-
- node_10
118-
filters:
119-
tags:
120-
only: /.*/
121-
branches:
122-
ignore: /.*/

.github/dependabot.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ updates:
88
open-pull-requests-limit: 99
99
reviewers: [ nwtgck ]
1010
assignees: [ nwtgck ]
11-
ignore:
12-
- dependency-name: "@types/node"
13-
versions:
14-
- ">= 11.a, < 12"
15-
- dependency-name: "@types/node"
16-
versions:
17-
- ">= 13.a, < 14"
1811
- package-ecosystem: docker
1912
directory: "/"
2013
schedule:

.github/workflows/ci.yml

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ on: [push, pull_request]
55

66
jobs:
77
build:
8-
98
runs-on: ubuntu-18.04
10-
119
strategy:
1210
matrix:
1311
node-version: [10.x, 12.x, 14.x, 16.x]
14-
1512
steps:
1613
- uses: actions/checkout@v2
1714
- name: Use Node.js ${{ matrix.node-version }}
@@ -22,3 +19,53 @@ jobs:
2219
- run: npm run lint
2320
- run: npm run build
2421
- run: npm test
22+
23+
docker_test:
24+
runs-on: ubuntu-18.04
25+
steps:
26+
- uses: actions/checkout@v2
27+
- run: docker build -t piping-server .
28+
- name: Working test with Docker image
29+
run: |
30+
set -eux
31+
# Run a server
32+
docker run -d -p 8080:80 --name=piping piping-server --http-port=80
33+
# Wait for server running
34+
sleep 1
35+
# Create a file to send
36+
echo 'hello, world' > /tmp/hello.txt
37+
# Send and wait for a receiver
38+
curl -T /tmp/hello.txt localhost:8080/mypath &
39+
# Get data as a file
40+
curl localhost:8080/mypath > /tmp/download.txt
41+
# Print downloaded file
42+
cat /tmp/download.txt
43+
# Test the equality
44+
diff /tmp/hello.txt /tmp/download.txt
45+
# Print server log
46+
docker logs piping
47+
# Delete container
48+
docker rm -f piping
49+
- name: Working test with Docker image for HTTPS
50+
run: |
51+
set -eux
52+
# Create certificates
53+
(mkdir ssl_certs && cd ssl_certs && openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -sha256 -nodes --subj '/CN=localhost/')
54+
# Run a server
55+
docker run -d -p 8080:80 -p 8443:443 -v $PWD/ssl_certs:/ssl_certs --name=piping piping-server --http-port=80 --enable-https=true --https-port=443 --key-path=/ssl_certs/server.key --crt-path=/ssl_certs/server.crt
56+
# Wait for server running
57+
sleep 1
58+
# Create a file to send
59+
echo 'hello, world' > /tmp/hello.txt
60+
# Send and wait for a receiver
61+
curl -kT /tmp/hello.txt https://localhost:8443/mypath &
62+
# Get data as a file
63+
curl -k https://localhost:8443/mypath > /tmp/download.txt
64+
# Print downloaded file
65+
cat /tmp/download.txt
66+
# Test the equality
67+
diff /tmp/hello.txt /tmp/download.txt
68+
# Print server log
69+
docker logs piping
70+
# Delete container
71+
docker rm -f piping

.github/workflows/npm-publish.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: npm publish
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
jobs:
7+
npm_publish:
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: 16
14+
- run: npm ci
15+
- name: Authenticate with registry
16+
run: echo -e "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
17+
- run: npm publish

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55

66
## [Unreleased]
77

8+
## [1.11.1] - 2022-02-05
9+
### Changed
10+
* Update dependencies
11+
* (Docker) Use node 16 as base docker image
12+
* (internal) Update package-lock.json version to 2
13+
814
## [1.11.0] - 2022-01-24
915
### Changed
1016
* Update dependencies
@@ -405,7 +411,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
405411
* Docker automated build on Docker Hub
406412
* Support HTTPS
407413

408-
[Unreleased]: https://github.com/nwtgck/piping-server/compare/v1.11.0...HEAD
414+
[Unreleased]: https://github.com/nwtgck/piping-server/compare/v1.11.1...HEAD
415+
[1.11.1]: https://github.com/nwtgck/piping-server/compare/v1.11.0...v1.11.1
409416
[1.11.0]: https://github.com/nwtgck/piping-server/compare/v1.10.2...v1.11.0
410417
[1.10.2]: https://github.com/nwtgck/piping-server/compare/v1.10.1...v1.10.2
411418
[1.10.1]: https://github.com/nwtgck/piping-server/compare/v1.10.0...v1.10.1

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14.18.3-alpine
1+
FROM node:16.13.2-alpine
22

33
LABEL maintainer="Ryo Ota <nwtgck@nwtgck.org>"
44

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# (based on: https://www.appveyor.com/docs/lang/nodejs-iojs/)
22

33
environment:
4-
# NOTE: Only test in Node.js 10 to shorten time
5-
nodejs_version: "10"
4+
# NOTE: Only test in Node.js 16 to shorten time
5+
nodejs_version: "16"
66

77
# Install scripts. (runs after repo cloning)
88
install:

0 commit comments

Comments
 (0)