Hi all -
We are trying to build a CI Pipeline starting our application with webpack-dev-server through docker & testing with nightwatch.js after.
Here is the current dockerfile & pipeline.yml.
----------------------------------------------------------------------------------
Dockerfile
FROM node:latest
MAINTAINER
#Set working directory in the container
WORKDIR /Users/xxxxxx/Repositories/xxxxxxxx
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
#Install local packages listed in package.json
RUN npm install
# Bundle app source
COPY . .
#Export port 8080
EXPOSE 8080
#Set command to run when the container is started
CMD [ "npm", "run", "start", "test" ]
--------------------------------------------------------------------------------------
Pipelines.yml
image: atlassian/default-image:2
pipelines:
default:
- step:
name: NewHomePage
script:
- docker build --tag=build5 .
- docker run -p build5
services:
- docker
caches:
- docker # adds docker layer caching
-------------------------------------------------------------------------------------
We are getting an error related to ssh private keys -
<span>npm ERR! Error while executing:</span><span>npm ERR!</span><span> /usr/bin/git ls-remote -h -t ssh://git@bitbucket.org/xxxxxxxxxxx/xxxxxx.git</span><span>npm ERR!</span> <span>npm ERR! Host key verification failed.</span><span>npm ERR! fatal: Could not read from remote repository.</span><span>npm ERR!</span> <span>npm ERR! Please make sure you have the correct access rights</span><span>npm ERR! and the repository exists.</span><span>npm ERR!</span> <span>npm ERR!</span><span> exited with error code: 128</span>
<span>Does anyone have any suggestions on how to solve this?</span>
<span>Any help would be appreciated!</span>