diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4acca52..a6432be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ stages: # List of stages for jobs, and their order of execution - notify variables: GIT_SSH_COMMAND: "ssh -i /home/gitlab-runner/.ssh/id_rsa -o IdentitiesOnly=yes" + SSH_CONNECTION_TIMEOUT: 2 notify_start: stage: notify_start # Should be in a later stage than the job that might fail script: @@ -36,10 +37,10 @@ build-job: # This job runs in the build stage, which runs first. - mkdir -p ~/.ssh - echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - - pyinstaller --onefile portainer.py - #- scp -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer jd@192.168.80.222:/myapps/bin/ || true - - scp -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer jd@192.168.77.12:/myapps/bin/ || true - - scp -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer jd@192.168.77.101:/myapps/bin/ || true + - pyinstaller --onefile portainer.py --hidden-import=port + - scp -o ConnectTimeout=$SSH_CONNECTION_TIMEOUT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer jd@192.168.80.222:/myapps/bin/ || true + - scp -o ConnectTimeout=$SSH_CONNECTION_TIMEOUT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer jd@192.168.77.12:/myapps/bin/ || true + - scp -o ConnectTimeout=$SSH_CONNECTION_TIMEOUT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/portainer jd@192.168.77.101:/myapps/bin/ || true - rm -rf /home/gitlab-runner/builds/1fLwHSKm2/0/jaydee/portainer.tmp artifacts: paths: