mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 22:36:01 +00:00
changed location of mysql-ssh container
This commit is contained in:
10
.github/workflows/build-test-containers.yaml
vendored
10
.github/workflows/build-test-containers.yaml
vendored
@@ -9,16 +9,16 @@ name: Build test containers
|
||||
- develop
|
||||
- feature/**
|
||||
paths:
|
||||
- e2e-tests/mysql-ssh/Dockerfile
|
||||
- e2e-tests/containers
|
||||
jobs:
|
||||
build-docker-ssh:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v3
|
||||
- name: Build mysql-ssh image
|
||||
- name: Build mysql-ssh-login image
|
||||
run: |
|
||||
docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh
|
||||
docker build -t dbgate/mysql-ssh-login:latest e2e-tests/containers/mysql-ssh-login
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
@@ -27,5 +27,5 @@ jobs:
|
||||
password: '${{ secrets.GITHUB_TOKEN }}'
|
||||
- name: Push image to GHCR
|
||||
run: |
|
||||
docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest
|
||||
docker push ghcr.io/dbgate/mysql-ssh:latest
|
||||
docker tag dbgate/mysql-ssh-login:latest ghcr.io/dbgate/mysql-ssh-login:latest
|
||||
docker push ghcr.io/dbgate/mysql-ssh-login:latest
|
||||
|
||||
23
e2e-tests/containers/mysql-ssh-login/Dockerfile
Normal file
23
e2e-tests/containers/mysql-ssh-login/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y openssh-server mysql-server && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir /var/run/sshd
|
||||
|
||||
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||
RUN echo 'root:root' | chpasswd
|
||||
|
||||
RUN service mysql start && \
|
||||
mysql -uroot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; FLUSH PRIVILEGES;" && \
|
||||
service mysql stop
|
||||
|
||||
EXPOSE 22
|
||||
|
||||
COPY start.sh /start.sh
|
||||
|
||||
RUN chmod +x /start.sh
|
||||
|
||||
CMD ["/start.sh"]
|
||||
7
e2e-tests/containers/mysql-ssh-login/start.sh
Normal file
7
e2e-tests/containers/mysql-ssh-login/start.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
service ssh start
|
||||
|
||||
service mysql start
|
||||
|
||||
tail -f /dev/null
|
||||
@@ -45,7 +45,7 @@ describe('Initialization', () => {
|
||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').clear().type('root');
|
||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshPassword]').clear().type('root');
|
||||
if (runOnCI) {
|
||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshHost]').clear().type('mysql-ssh');
|
||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshHost]').clear().type('mysql-ssh-login');
|
||||
} else {
|
||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshPort]').clear().type('16006');
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ services:
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=Pwd2020Db
|
||||
|
||||
mysql-ssh:
|
||||
build: mysql-ssh
|
||||
mysql-ssh-login:
|
||||
build: mysql-ssh-login
|
||||
restart: always
|
||||
ports:
|
||||
- 16005:3306
|
||||
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
- develop
|
||||
- 'feature/**'
|
||||
paths:
|
||||
- "e2e-tests/mysql-ssh/Dockerfile"
|
||||
- e2e-tests/containers
|
||||
|
||||
jobs:
|
||||
build-docker-ssh:
|
||||
@@ -16,9 +16,9 @@ jobs:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build mysql-ssh image
|
||||
- name: Build mysql-ssh-login image
|
||||
run: |
|
||||
docker build -t dbgate/mysql-ssh:latest e2e-tests/mysql-ssh
|
||||
docker build -t dbgate/mysql-ssh-login:latest e2e-tests/containers/mysql-ssh-login
|
||||
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@v2
|
||||
@@ -29,5 +29,5 @@ jobs:
|
||||
|
||||
- name: Push image to GHCR
|
||||
run: |
|
||||
docker tag dbgate/mysql-ssh:latest ghcr.io/dbgate/mysql-ssh:latest
|
||||
docker push ghcr.io/dbgate/mysql-ssh:latest
|
||||
docker tag dbgate/mysql-ssh-login:latest ghcr.io/dbgate/mysql-ssh-login:latest
|
||||
docker push ghcr.io/dbgate/mysql-ssh-login:latest
|
||||
|
||||
Reference in New Issue
Block a user