mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-24 21:15:51 +01:00
add e2e for docker images
increse
This commit is contained in:
parent
7fe57531ea
commit
d92cffadad
39
.github/workflows/docker-plugins-e2e.yml
vendored
Normal file
39
.github/workflows/docker-plugins-e2e.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
name: E2E Docker Proxy Plugins Test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
schedule:
|
||||
# run every sunday
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
docker:
|
||||
timeout-minutes: 10
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
|
||||
- name: Start containers
|
||||
run: docker-compose -f "./e2e/docker/docker-build-install-plugin/docker-compose.yaml" up -d --build
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: verdaccio cli
|
||||
run: npm install -g verdaccio --registry=http://localhost:4873
|
||||
- name: gastby cli
|
||||
run: npm install -g gatsby-cli --registry http://localhost:4873
|
||||
- name: netlify cli
|
||||
run: npm install -g netlify-cli --registry http://localhost:4873
|
||||
- name: angular cli
|
||||
run: npm install -g @angular/cli --registry http://localhost:4873
|
||||
|
||||
- name: Stop containers
|
||||
if: always()
|
||||
run: docker-compose -f "./e2e/docker/docker-build-install-plugin/docker-compose.yaml" down
|
38
.github/workflows/docker-proxy-apache-e2e.yml
vendored
Normal file
38
.github/workflows/docker-proxy-apache-e2e.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: E2E Docker Proxy Apache Test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
schedule:
|
||||
# run every sunday
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
docker:
|
||||
timeout-minutes: 10
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
|
||||
- name: Start containers
|
||||
run: docker-compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" up -d --build
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
with:
|
||||
node-version: 18
|
||||
- name: verdaccio cli
|
||||
run: npm install -g verdaccio --registry http://localhost
|
||||
- name: gastby cli
|
||||
run: npm install -g gatsby-cli --registry http://localhost
|
||||
- name: netlify cli
|
||||
run: npm install -g netlify-cli --registry http://localhost
|
||||
- name: angular cli
|
||||
run: npm install -g @angular/cli --registry http://localhost
|
||||
|
||||
- name: Stop containers
|
||||
if: always()
|
||||
run: docker-compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" down
|
41
.github/workflows/docker-proxy-nginx-e2e.yml
vendored
Normal file
41
.github/workflows/docker-proxy-nginx-e2e.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
name: E2E Docker Proxy Nginx Test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
jobs:
|
||||
docker:
|
||||
timeout-minutes: 10
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
|
||||
|
||||
- name: Start containers
|
||||
run: docker-compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" up -d --build
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
with:
|
||||
node-version: 18
|
||||
- name: npm setup
|
||||
run: |
|
||||
npm config set fetch-retries="5"
|
||||
npm config set fetch-retry-factor="50"
|
||||
npm config set fetch-retry-mintimeout="20000"
|
||||
npm config set fetch-retry-maxtimeout="80000"
|
||||
- name: verdaccio cli
|
||||
run: npm install -g verdaccio --registry http://localhost
|
||||
- name: gastby cli
|
||||
run: npm install -g gatsby-cli --registry http://localhost
|
||||
- name: netlify cli
|
||||
run: npm install -g netlify-cli --registry http://localhost
|
||||
- name: angular cli
|
||||
run: npm install -g @angular/cli --registry http://localhost
|
||||
|
||||
- name: Stop containers
|
||||
if: always()
|
||||
run: docker-compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" down
|
6
e2e/docker/apache-verdaccio/apache_proxy/Dockerfile
Normal file
6
e2e/docker/apache-verdaccio/apache_proxy/Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM eboraas/apache
|
||||
LABEL Juan Picado <jotadeveloper@gmail.com>
|
||||
# http://pierrecaserta.com/apache-proxy-one-docker-server-many-domains/
|
||||
RUN a2enmod proxy
|
||||
COPY ./conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||
COPY ./conf/env.load /etc/apache2/mods-enabled/env.load
|
@ -0,0 +1,17 @@
|
||||
ServerName localhost:80
|
||||
ServerAdmin admin@localhost
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName localhost
|
||||
<Proxy *>
|
||||
Allow from localhost
|
||||
</Proxy>
|
||||
SSLProxyEngine On
|
||||
ProxyRequests Off
|
||||
ProxyPreserveHost On
|
||||
AllowEncodedSlashes NoDecode
|
||||
ProxyPass / http://verdaccio:4873/ nocanon
|
||||
ProxyPassReverse / http://verdaccio:4873/
|
||||
CustomLog /var/log/apache2/verdaccio-access.log combined
|
||||
ErrorLog /var/log/apache2/verdaccio-error.log
|
||||
</VirtualHost>
|
4
e2e/docker/apache-verdaccio/apache_proxy/conf/env.load
Normal file
4
e2e/docker/apache-verdaccio/apache_proxy/conf/env.load
Normal file
@ -0,0 +1,4 @@
|
||||
LoadModule env_module /usr/lib/apache2/modules/mod_env.so
|
||||
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
|
||||
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
|
||||
LoadModule socache_shmcb_module /usr/lib/apache2/modules/mod_socache_shmcb.so
|
23
e2e/docker/apache-verdaccio/docker-compose.yaml
Normal file
23
e2e/docker/apache-verdaccio/docker-compose.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio:nightly-master
|
||||
container_name: verdaccio
|
||||
ports:
|
||||
- '4873:4873'
|
||||
volumes:
|
||||
- verdaccio:/verdaccio
|
||||
|
||||
apacheproxy:
|
||||
build: apache_proxy/
|
||||
links:
|
||||
- verdaccio
|
||||
ports:
|
||||
- '80:80'
|
||||
volumes_from:
|
||||
- verdaccio
|
||||
|
||||
volumes:
|
||||
verdaccio:
|
||||
driver: local
|
8
e2e/docker/docker-build-install-plugin/Dockerfile
Normal file
8
e2e/docker/docker-build-install-plugin/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM verdaccio/verdaccio:nightly-master
|
||||
LABEL Juan Picado <jotadeveloper@gmail.com>
|
||||
ADD docker.yaml /verdaccio/conf/config.yaml
|
||||
USER root
|
||||
RUN npm install --global verdaccio-static-token \
|
||||
&& npm install --global verdaccio-memory \
|
||||
&& npm install --global verdaccio-auth-memory
|
||||
USER $VERDACCIO_USER_UID
|
12
e2e/docker/docker-build-install-plugin/docker-compose.yaml
Normal file
12
e2e/docker/docker-build-install-plugin/docker-compose.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
verdaccio:
|
||||
build: .
|
||||
ports:
|
||||
- '4873:4873'
|
||||
volumes:
|
||||
- verdaccio:/verdaccio
|
||||
volumes:
|
||||
verdaccio:
|
||||
driver: local
|
44
e2e/docker/docker-build-install-plugin/docker.yaml
Normal file
44
e2e/docker/docker-build-install-plugin/docker.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
store:
|
||||
memory:
|
||||
limit: 1000
|
||||
|
||||
plugins: /verdaccio/plugins
|
||||
|
||||
web:
|
||||
title: Verdaccio Publish Config Test
|
||||
auth:
|
||||
auth-memory:
|
||||
users:
|
||||
foo:
|
||||
name: foo
|
||||
password: s3cret
|
||||
bar:
|
||||
name: bar
|
||||
password: s3cret
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
packages:
|
||||
'@*/*':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
unpublish: $authenticated
|
||||
proxy: npmjs
|
||||
'**':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
unpublish: $authenticated
|
||||
proxy: npmjs
|
||||
server:
|
||||
keepAliveTimeout: 60
|
||||
middlewares:
|
||||
audit:
|
||||
enabled: true
|
||||
static-token:
|
||||
- token: mySecureToken
|
||||
user: systemUser
|
||||
password: systemPassword
|
||||
- token: ABCD1234
|
||||
user: uncle
|
||||
password: tom
|
||||
logs: { type: stdout, format: pretty, level: http }
|
3
e2e/docker/docker-e2e-ui/Dockerfile
Normal file
3
e2e/docker/docker-e2e-ui/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM verdaccio/verdaccio:nightly-master
|
||||
LABEL Juan Picado <jotadeveloper@gmail.com>
|
||||
ADD docker.yaml /verdaccio/conf/config.yaml
|
12
e2e/docker/docker-e2e-ui/docker-compose.yaml
Normal file
12
e2e/docker/docker-e2e-ui/docker-compose.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
verdaccio:
|
||||
build: .
|
||||
ports:
|
||||
- '4873:4873'
|
||||
volumes:
|
||||
- verdaccio:/verdaccio
|
||||
volumes:
|
||||
verdaccio:
|
||||
driver: local
|
37
e2e/docker/docker-e2e-ui/docker.yaml
Normal file
37
e2e/docker/docker-e2e-ui/docker.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
storage: /verdaccio/storage/data
|
||||
|
||||
plugins: /verdaccio/plugins
|
||||
|
||||
web:
|
||||
enable: true
|
||||
title: verdaccio-server-e2e
|
||||
login: true
|
||||
|
||||
auth:
|
||||
htpasswd:
|
||||
file: /verdaccio/storage/htpasswd
|
||||
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
|
||||
packages:
|
||||
'@verdaccio/*':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
'@*/*':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
unpublish: $authenticated
|
||||
proxy: npmjs
|
||||
'**':
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
unpublish: $authenticated
|
||||
proxy: npmjs
|
||||
|
||||
middlewares:
|
||||
audit:
|
||||
enabled: true
|
||||
|
||||
log: { type: stdout, format: json, level: info }
|
3
e2e/docker/proxy-nginx/conf/nginx/Dockerfile
Executable file
3
e2e/docker/proxy-nginx/conf/nginx/Dockerfile
Executable file
@ -0,0 +1,3 @@
|
||||
FROM tutum/nginx
|
||||
RUN rm /etc/nginx/sites-enabled/default
|
||||
ADD sites-enabled /etc/nginx/sites-enabled
|
14
e2e/docker/proxy-nginx/conf/nginx/sites-enabled/verdaccio-conf
Executable file
14
e2e/docker/proxy-nginx/conf/nginx/sites-enabled/verdaccio-conf
Executable file
@ -0,0 +1,14 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
access_log /var/log/nginx/verdaccio.log;
|
||||
charset utf-8;
|
||||
location / {
|
||||
proxy_pass http://verdaccio:4873/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
proxy_ssl_session_reuse off;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
26
e2e/docker/proxy-nginx/docker-compose.yaml
Normal file
26
e2e/docker/proxy-nginx/docker-compose.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio:nightly-master
|
||||
container_name: verdaccio_root_path
|
||||
ports:
|
||||
- '4873:4873'
|
||||
volumes:
|
||||
- verdaccio:/verdaccio
|
||||
|
||||
nginx:
|
||||
restart: always
|
||||
build: conf/nginx
|
||||
ports:
|
||||
- '80:80'
|
||||
volumes:
|
||||
- /www/public
|
||||
volumes_from:
|
||||
- verdaccio
|
||||
links:
|
||||
- verdaccio:verdaccio
|
||||
|
||||
volumes:
|
||||
verdaccio:
|
||||
driver: local
|
Loading…
Reference in New Issue
Block a user