私は次のものを持っていますbitbucket.pipelines.yml
:
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
パスにないためだと思います。か何か。私の Ubuntu/UNIX スキルは最高ではありません。
インストールをパスに追加するにはどうすればよいですか?
アップデート
OK、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 の Docker インスタンスで実行されているため、デバッグが困難です。