I'm really at a loss here, for some reason I keep getting the following error when I try to use atlassian/scp-deploy:1.4.1 for deploying a tar file.
My YML:
image: node:18.16.0options:max-time: 15docker: truedefinitions:caches:npm: $HOME/.npmservices:docker:memory: 3072steps:- step: &NodeProdname: Build Production# image: node:18.16.0script: - cd ./app - npm ci - npm run build - cd .. - tar -zcf build.tar.gz ./appartifacts: - ./build.tar.gzcaches: - npm - step: &DeployProdimage: atlassian/default-imageservices: - dockerscript: - docker version - pipe: atlassian/scp-deploy:1.4.1variables:USER: $USERSERVER: $IPREMOTE_PATH: $PATHLOCAL_PATH: './theme.tar.gz'DEBUG: 'true'branches:main: - step: *NodeProd - step:<<: *DeployProdname: "Deployment to Production"trigger: automaticdeployment: production
As soon as it hits the deploy step it errors out on `docker version` with the following error output:
+ docker versionbash: docker: command not foundbash: lesspipe: command not foundbash: dircolors: command not found
As far as I know I'm doing everything according to the book and I have other pipelines where I dont explicitly have declared the docker service and it seems to work.I initially opted to just use scp, but apparently I'm also getting a "scp: command not found", hence the reason i opted for scp-deploy but that also doesn't seem to work.
So what am I doing wrong here?
Hello @adam_dwvd and welcome to the Community!
From the symptoms of the issue, I think you might have an user-defined environment variable configured either at the workspace, repository, or deployment level that is replacing the PATH variable, causing the shell to not find the docker binary inside the image.
So I would suggest checking if a variable named PATH does exist and if yes, either delete it or rename it. The default PATH environment variable where the binaries exist can get overridden with this user-supplied PATH variable, and therefore result in these binaries not being able to be located.
Thank you, @adam_dwvd !Patrik S
It looks like you're new here. Sign in or register to get started.