Skip to content

Commit

Permalink
add ssi test matrix for nodejs
Browse files Browse the repository at this point in the history
  • Loading branch information
rochdev committed Oct 29, 2024
1 parent b3bcae6 commit 7e8ae21
Show file tree
Hide file tree
Showing 15 changed files with 168 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ onboarding_nodejs:
SCENARIO: [ CONTAINER_AUTO_INJECTION_INSTALL_SCRIPT_PROFILING]
- ONBOARDING_FILTER_ENV: [dev, prod]
ONBOARDING_FILTER_WEBLOG: [test-app-nodejs,test-app-nodejs-multicontainer]
SCENARIO: [INSTALLER_AUTO_INJECTION,SIMPLE_AUTO_INJECTION_PROFILING]
SCENARIO: [SIMPLE_AUTO_INJECTION_PROFILING]
- ONBOARDING_FILTER_ENV: [dev, prod]
ONBOARDING_FILTER_WEBLOG: [test-app-nodejs,test-app-nodejs-multicontainer,test-app-nodejs-multialpine]
SCENARIO: [INSTALLER_AUTO_INJECTION]
- ONBOARDING_FILTER_ENV: [dev, prod]
ONBOARDING_FILTER_WEBLOG: [test-app-nodejs-16]
SCENARIO: [INSTALLER_NOT_SUPPORTED_AUTO_INJECTION]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ weblog:
local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/docker-compose.yml
- name: copy-nodejs-app
local_path: lib-injection/build/docker/nodejs/sample-app
- name: copy-node16-app-dockerfile
local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node16
- name: copy-node18-app-dockerfile
local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node18
- name: copy-nodesj-alpine-app-dockerfile
- name: copy-node20-app-dockerfile
local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node20
- name: copy-node22-app-dockerfile
local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node22
- name: copy-node-app-dockerfile
local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node
- name: copy-nodejs-alpine-app-dockerfile
local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.alpine
- name: copy-reverseproxy-dockerfile
local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.reverseproxy
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM public.ecr.aws/docker/library/node

# Create app directory
WORKDIR /usr/src/app

COPY . .

EXPOSE 18080
CMD [ "node", "index.js" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM public.ecr.aws/docker/library/node:alpine

# Create app directory
WORKDIR /usr/src/app

COPY . .

EXPOSE 18080
CMD [ "node", "index.js" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM public.ecr.aws/docker/library/node:16-slim

# Create app directory
WORKDIR /usr/src/app

COPY . .

EXPOSE 18080
CMD [ "node", "index.js" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM public.ecr.aws/docker/library/node:16-alpine

# Create app directory
WORKDIR /usr/src/app

COPY . .

EXPOSE 18080
CMD [ "node", "index.js" ]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM public.ecr.aws/docker/library/node:18
FROM public.ecr.aws/docker/library/node:18-slim

# Create app directory
WORKDIR /usr/src/app
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM public.ecr.aws/docker/library/node:18-alpine

# Create app directory
WORKDIR /usr/src/app

COPY . .

EXPOSE 18080
CMD [ "node", "index.js" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM public.ecr.aws/docker/library/node:20-slim

# Create app directory
WORKDIR /usr/src/app

COPY . .

EXPOSE 18080
CMD [ "node", "index.js" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM public.ecr.aws/docker/library/node:20-alpine

# Create app directory
WORKDIR /usr/src/app

COPY . .

EXPOSE 18080
CMD [ "node", "index.js" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM public.ecr.aws/docker/library/node:22-slim

# Create app directory
WORKDIR /usr/src/app

COPY . .

EXPOSE 18080
CMD [ "node", "index.js" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM public.ecr.aws/docker/library/node:22-alpine

# Create app directory
WORKDIR /usr/src/app

COPY . .

EXPOSE 18080
CMD [ "node", "index.js" ]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM public.ecr.aws/nginx/nginx:stable-perl

COPY nginx.conf /etc/nginx/nginx.conf
COPY nginx.conf /etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ services:
context: .
dockerfile: Dockerfile.reverseproxy
healthcheck:
test: "curl -f http://localhost:8080"
test: "curl -f http://localhost:8080"

node_16:
env_file: "scenario_app.env"
image: system-tests/node_16:latest
restart: always
build:
context: .
dockerfile: Dockerfile.node16
healthcheck:
test: "curl -f http://localhost:18080"

node_18:
env_file: "scenario_app.env"
Expand All @@ -22,6 +32,36 @@ services:
healthcheck:
test: "curl -f http://localhost:18080"

node_20:
env_file: "scenario_app.env"
image: system-tests/node_20:latest
restart: always
build:
context: .
dockerfile: Dockerfile.node20
healthcheck:
test: "curl -f http://localhost:18080"

node_22:
env_file: "scenario_app.env"
image: system-tests/node_22:latest
restart: always
build:
context: .
dockerfile: Dockerfile.node22
healthcheck:
test: "curl -f http://localhost:18080"

node:
env_file: "scenario_app.env"
image: system-tests/node:latest
restart: always
build:
context: .
dockerfile: Dockerfile.node
healthcheck:
test: "curl -f http://localhost:18080"

node_alpine:
env_file: "scenario_app.env"
image: system-tests/node_alpine:latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,22 @@ http {
'"$request" $status $upstream_addr '
'"$http_referer" "$http_user_agent" "$gzip_ratio"';

upstream node_16_app {
server node_16:18080;
}
upstream node_18_app {
server node_18:18080;
}
upstream node_20_app {
server node_20:18080;
}
upstream node_22_app {
server node_22:18080;
}
upstream node_app {
server node:18080;
}

upstream node_alpine_app {
server node_alpine:18080;
}
Expand All @@ -37,14 +50,31 @@ http {
}";
}

location /node_16/ {
proxy_pass http://node_16_app/;
proxy_redirect off;
}
location /node_18/ {
proxy_pass http://node_18_app/;
proxy_redirect off;
}
location /node_20/ {
proxy_pass http://node_20_app/;
proxy_redirect off;
}
location /node_22/ {
proxy_pass http://node_22_app/;
proxy_redirect off;
}
location /node/ {
proxy_pass http://node_app/;
proxy_redirect off;
}

location /node_alpine/ {
proxy_pass http://node_alpine_app/;
proxy_redirect off;
}

}
}
}

0 comments on commit 7e8ae21

Please sign in to comment.