Skip to content

Commit 528def5

Browse files
authored
Support node 12 (#8)
1 parent 0af4c65 commit 528def5

5 files changed

Lines changed: 25 additions & 4 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ branches:
55
language: minimal
66
services:
77
- docker
8-
script: chmod +x runTests.sh && ./runTests.sh
8+
script: chmod +x runTests.sh && ./runTests.sh . && ./runTests.sh node12

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# node-10 is LTS and required for sap approuter. EOL: 2021-04-01
2-
FROM node:10-stretch
2+
FROM node:10-stretch
33

44
RUN apt-get update && \
55
apt-get install -y chromium=70.0.3538.110-1~deb9u1 firefox-esr xvfb libxi6 libgconf-2-4 default-jre && \

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Node Browsers Image
22

3-
This [_Dockerfile_](https://docs.docker.com/engine/reference/builder/) can be used in _Continuous Delivery_ (CD) pipelines for SAP development projects.
3+
This [_Dockerfile_](https://docs.docker.com/engine/reference/builder/) can be used in _Continuous Delivery_ (CD) pipelines for SAP development projects.
44
The image is optimized for use with project ["Piper"](https://github.com/SAP/jenkins-library) on [Jenkins](https://jenkins.io/).
55
Docker containers simplify your CD tool setup, encapsulating tools and environments that are required to execute pipeline steps.
66

@@ -20,6 +20,14 @@ This image is published to Docker Hub and can be pulled via the command
2020
docker pull ppiper/node-browsers
2121
```
2222

23+
The default tag contains node 10 due to compatibility reasons with approuter.
24+
25+
For node 12, use the tag `node12`:
26+
27+
```
28+
docker pull ppiper/node-browsers:node12
29+
```
30+
2331
## Build
2432

2533
To build this image locally, open a terminal in the directory of the Dockerfile and run

node12/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:12-stretch
2+
3+
RUN apt-get update && \
4+
apt-get install -y chromium firefox-esr xvfb libxi6 libgconf-2-4 default-jre && \
5+
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
6+
7+
RUN ln -s /usr/bin/chromium /usr/bin/google-chrome
8+
9+
RUN npm config set @sap:registry https://npm.sap.com --global
10+
11+
USER node

runTests.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/bash -ex
22

3+
DOCKERFILE_PATH=${1:-.}
4+
35
# Start a local registry, to which we push the images built in this test, and from which they will be consumed in the test
46
docker run -d -p 5000:5000 --restart always --name registry registry:2 || true
57

6-
docker build -t localhost:5000/ppiper/node-browsers:latest .
8+
docker build -t localhost:5000/ppiper/node-browsers:latest ${DOCKERFILE_PATH}
79
docker tag localhost:5000/ppiper/node-browsers:latest ppiper/node-browsers:latest
810
docker push localhost:5000/ppiper/node-browsers:latest
911

0 commit comments

Comments
 (0)