github.com/siglens/siglens@v0.0.0-20240328180423-f7ce9ae441ed/.github/workflows/release-deploy.yml (about) 1 name: release-deploy.yml 2 3 on: 4 workflow_run: 5 workflows: ["siglens-docker-release"] 6 types: 7 - completed 8 9 jobs: 10 deploy: 11 if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }} 12 name: "Deploy Siglens" 13 runs-on: ubuntu-latest 14 steps: 15 - name: Setup SSH Configuration 16 run: | 17 mkdir -p ~/.ssh/ 18 echo "$SSH_KEY" > ~/.ssh/playground 19 chmod 600 ~/.ssh/playground 20 cat >>~/.ssh/config <<END 21 Host playground 22 HostName $SSH_HOST 23 User $SSH_USER 24 IdentityFile ~/.ssh/playground 25 StrictHostKeyChecking no 26 END 27 env: 28 SSH_USER: ${{ secrets.PG_SSH_USER }} 29 SSH_KEY: ${{ secrets.PG_SSH_PRIVATE_KEY }} 30 SSH_HOST: ${{ secrets.PG_HOST }} 31 - name: Check path 32 run: | 33 ssh playground 'echo $PATH' 34 - name: Export Environment Variables and Execute Install Script 35 run: | 36 ssh -tt playground 'bash -lc "export TERM=xterm; export SERVERNAME=${{ secrets.PG_SERVERNAME }}; cd ${{ secrets.PG_DOCKER_INSTALL_PATH }}; curl -L https://siglens.com/install.sh | sh"' 37 - name: Verify Server Start 38 run: | 39 sleep 5 40 ssh playground 'export TERM=xterm; if ! curl --silent http://localhost:5122 | head -n 30; then echo "Server did not start within 5 seconds"; exit 1; fi' 41 - name: Start Sigclient 42 run: | 43 ssh playground 'export TERM=xterm; sudo nohup ${{ secrets.PG_LOAD_TEST_PATH }} ingest esbulk -b 1 -d http://localhost:8081/elastic -g dynamic-user -n 1 -c > /dev/null 2>${{ secrets.PG_INGEST_LOG_FILE }} &'