나는 bitbucket.pipelines.yml
다음과 같습니다 'apt-get install nodejs -y'가 npm을 설치하지 않는 이유는 무엇입니까?
image: python:3.5.1
pipelines:
branches:
master:
- step:
script:
- apt-get update
- apt-get install nodejs -y
- npm install
- npm run build
- python get-pip.py
- pip install boto3==1.3.0
- python s3_upload.py io-master.fromthiscomesthat.co.uk dist io-master
노드를 설치하는 데, 빌드는
npm
를 실행하려고 실패 :
+ npm install
bash: npm: command not found
내가 npm
경로에 있지 않기 때문에이 상상. 또는 뭔가. 내 우분투/유닉스 기술이 최선이 아닙니다.
어떻게 경로에 설치를 추가 할 수 있습니까?
업데이트
좋아, 내 YAML을 조롱의 많은 지금과 같은 후 :
image: python:3.5.1
pipelines:
branches:
master:
- step:
script:
- apt-get update
- apt-get install lsb-release -y
- curl --silent https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
- VERSION=node_5.x
- DISTRO="$(lsb-release -s -c)" # <--- error here
- echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list
- echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | tee -a /etc/apt/sources.list.d/nodesource.list
- apt-get update
- apt-get install nodejs -y
- npm install
- npm run build
- python get-pip.py
- pip install boto3==1.3.0
- python s3_upload.py io-master.fromthiscomesthat.co.uk dist io-master
은 지금은 작은 문제가 있습니다.
lsb-release
은 설치 프로그램이 올바르게 설치 했음에도 불구하고 찾을 수 없습니다. 이것은 경로 문제입니까?; 설치 위치를 모를 때 어떻게 실행할 수 있습니까? Bitbucket의 도커 인스턴스에서 실행 중이므로 디버깅하기가 어렵습니다.
정말 고마워. 그러나 나는 위에서 설명한 다른 문제가있다. 어떤 아이디어? – serlingpa