You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hello. I want to run postgres migration script with bitbucket using ssh-run pipe. Command hangs after SELECT query
here is my step example:
```
- step:
name: Run miggartion
script:
- pipe: atlassian/ssh-run:0.7.0
variables:
DEBUG: "true"
SSH_USER: $USERNAME
SERVER: $HOST
COMMAND: 'sudo su - postgres -c "psql -d test -f /tmp/test.sql && echo test"'
SSH_KEY: $KEY
```
Here is my migration script example:
```
--
-- PostgreSQL database dump
--
-- Dumped from database version 15.3 (Debian 15.3-0+deb12u1)
-- Dumped by pg_dump version 15.3 (Debian 15.3-0+deb12u1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_table_access_method = heap;
```
Her is log output:
```
Warning: Permanently added '1.1.1.1' (EDxxxxx) to the list of known hosts.
dumb
SET
SET
SET
SET
SET
^[=
set_config
------------
(1 row)
-- INSERT --
```