Open 0xhitesh-91 opened 2 years ago
create-db.sh
fileset -x
if [ -z "$1" ]
then
echo "Which env do you want to restore for?"
exit 1
fi
echo 'Creating db...'
NODE_ENV=$1 npx env-cmd -f ./env/.env.$1 npx sequelize-cli db:create --env=$1
script non-zero exit status: 243
my shot into the blue as right now I have no time to try it myself: this could be an error by npm via npx of not being able to make the mkdir syscall.
I'd put the shields up and make the call more verbose so it reveals more (if that tooling supports it).
Alternatively you could try if --user
is doing any changes.
Also doing an ls -ld .
would reveal the ownership/mode of the mounted path in the container. Please add it to the script so that we can see what is going on that level.
You then can do variations on the command-line as well with the --user
switch but it might be calling for other problems, just saying. @0xhitesh-91
Thanks for the early reply.
This is what I got while executing with --user
, looks like some permission issue. can you point me in the right direction, it will be very helpful. @ktomk
What are you trying to do? Just want to execute bitbucket-pipelines.yml on my local machine before pushing the code to the repo.
So what problem are you facing? In execution, everything is going well until I trigger the script.
You mean, you are able to successfully complete all operations without triggering the script? Yes, if I don't trigger the script the "pipelines" complete execution successfully.
Okay fine, show me your bitbucket-pipelines.yml file.
rentsher@rentsher-ThinkPad-P14s-Gen-1:~/work/napses/backend-core$ pwd /home/rentsher/work/napses/backend-core rentsher@rentsher-ThinkPad-P14s-Gen-1:~/work/napses/backend-core$ ls bitbucket-pipelines.yml Dockerfile functions package-lock.json pipe.sh README.md start_api.sh rentsher@rentsher-ThinkPad-P14s-Gen-1:~/work/napses/backend-core$ pipelines +++ step #1
+++ copying files into container...
+++ populating caches...
apt-get update Get:1 http://deb.debian.org/debian buster InRelease [122 kB] Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB] Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB] Get:4 http://deb.debian.org/debian buster/main amd64 Packages [7911 kB] Get:5 http://security.debian.org/debian-security buster/updates/main amd64 Packages [336 kB] Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [8788 B] Fetched 8494 kB in 3s (3241 kB/s) Reading package lists...
apt-get install postgresql-client -y Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: distro-info-data lsb-release postgresql-client-11 postgresql-client-common Suggested packages: lsb postgresql-11 postgresql-doc-11 The following NEW packages will be installed: distro-info-data lsb-release postgresql-client postgresql-client-11 postgresql-client-common 0 upgraded, 5 newly installed, 0 to remove and 15 not upgraded. Need to get 1594 kB of archives. After this operation, 6613 kB of additional disk space will be used. Get:1 http://deb.debian.org/debian buster/main amd64 distro-info-data all 0.41+deb10u4 [6880 B] Get:2 http://security.debian.org/debian-security buster/updates/main amd64 postgresql-client-11 amd64 11.16-0+deb10u1 [1413 kB] Get:3 http://deb.debian.org/debian buster/main amd64 lsb-release all 10.2019051400 [27.5 kB] Get:4 http://deb.debian.org/debian buster/main amd64 postgresql-client-common all 200+deb10u4 [85.1 kB] Get:5 http://deb.debian.org/debian buster/main amd64 postgresql-client all 11+200+deb10u4 [61.1 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 1594 kB in 0s (6349 kB/s) Selecting previously unselected package distro-info-data. (Reading database ... 23988 files and directories currently installed.) Preparing to unpack .../distro-info-data_0.41+deb10u4_all.deb ... Unpacking distro-info-data (0.41+deb10u4) ... Selecting previously unselected package lsb-release. Preparing to unpack .../lsb-release_10.2019051400_all.deb ... Unpacking lsb-release (10.2019051400) ... Selecting previously unselected package postgresql-client-common. Preparing to unpack .../postgresql-client-common_200+deb10u4_all.deb ... Unpacking postgresql-client-common (200+deb10u4) ... Selecting previously unselected package postgresql-client-11. Preparing to unpack .../postgresql-client-11_11.16-0+deb10u1_amd64.deb ... Unpacking postgresql-client-11 (11.16-0+deb10u1) ... Selecting previously unselected package postgresql-client. Preparing to unpack .../postgresql-client_11+200+deb10u4_all.deb ... Unpacking postgresql-client (11+200+deb10u4) ... Setting up postgresql-client-common (200+deb10u4) ... Setting up distro-info-data (0.41+deb10u4) ... Setting up postgresql-client-11 (11.16-0+deb10u1) ... update-alternatives: using /usr/share/postgresql/11/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode Setting up lsb-release (10.2019051400) ... Setting up postgresql-client (11+200+deb10u4) ...
cd functions
npm install
up to date, audited 922 packages in 1s
89 packages are looking for funding run
npm fund
for detailsfound 0 vulnerabilities
script non-zero exit status: 243 rentsher@rentsher-ThinkPad-P14s-Gen-1:~/work/napses/backend-core$