Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

ssh-run command hangs

Karen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Nov 09, 2023

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 --

```

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events