Ich habe folgendes bitbucket.pipelines.yml
:Warum installiert "apt-get install nodejs -y" npm nicht?
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
Knoten installiert haben, die Build dann reißen versucht npm
auszuführen:
+ npm install
bash: npm: command not found
Ich stelle mir dies, weil npm
nicht im Weg ist. Oder so. Meine Ubuntu/UNIX-Fähigkeiten sind nicht die besten.
Wie kann ich die Installation zum Pfad hinzufügen?
aktualisieren
Ok, nach viel mein YAML Hantieren sieht nun wie folgt aus:
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
Jetzt habe ich ein kleineres Problem. lsb-release
wird nicht gefunden, obwohl das Installationsprogramm es korrekt installiert. Ist das ein Pfadproblem? Wie kann ich das ausführen, wenn ich nicht weiß, wo es installiert wird? Es ist schwierig zu debuggen, da es in einer Docker-Instanz auf Bitbucket ausgeführt wird.
Das ist toll, danke; Aber ich habe ein anderes Problem, das ich oben beschrieben habe. Irgendwelche Ideen? – serlingpa