Details
-
Bug
-
Resolution: Handled by Support
-
Medium
Description
Step 1/21 : FROM node:10-alpine as intermediate ---> e35872f034fd Step 2/21 : ARG SSH_PRIVATE_KEY ---> Using cache ---> d7fd4f000440 Step 3/21 : ARG NODE_ENV ---> Using cache ---> 4e78aef7bea1 Step 4/21 : ENV NODE_ENV ${NODE_ENV} ---> Running in 730280973d79 Removing intermediate container 730280973d79 ---> 106b000a56b6 Step 5/21 : RUN mkdir /root/.ssh/ ---> Running in b30715572202 Removing intermediate container b30715572202 ---> e9a15ee363d4 Step 6/21 : RUN echo "${SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa ---> Running in b0c274c0ce71 Removing intermediate container b0c274c0ce71 ---> 4f05a8b80cbc Step 7/21 : RUN chmod 400 /root/.ssh/id_rsa ---> Running in ab9315a22f75 Removing intermediate container ab9315a22f75 ---> 31e6bc2d28e3 Step 8/21 : RUN touch /root/.ssh/known_hosts ---> Running in d11d7a8adf55 Removing intermediate container d11d7a8adf55 ---> 8bd13d589b6e Step 9/21 : RUN apk add --no-cache openssh-client git ---> Running in 0023b515d0fa fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz (1/9) Installing ca-certificates (20171114-r3) (2/9) Installing nghttp2-libs (1.32.0-r0) (3/9) Installing libssh2 (1.8.2-r0) (4/9) Installing libcurl (7.61.1-r2) (5/9) Installing expat (2.2.5-r0) (6/9) Installing pcre2 (10.31-r0) (7/9) Installing git (2.18.1-r0) (8/9) Installing openssh-keygen (7.7_p1-r4) (9/9) Installing openssh-client (7.7_p1-r4) Executing busybox-1.28.4-r1.trigger Executing ca-certificates-20171114-r3.trigger OK: 24 MiB in 24 packages Removing intermediate container 0023b515d0fa ---> a0a8f3fc1c95 Step 10/21 : RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts ---> Running in 3c3f2ad49cc3 [91m# bitbucket.org:22 SSH-2.0-conker_1.1.59-75ba71f app-153 [0mRemoving intermediate container 3c3f2ad49cc3 ---> e60f3e5a19f5 Step 11/21 : WORKDIR /usr/src/app Removing intermediate container 866ef35e42ef ---> 81ceea380de7 Step 12/21 : COPY package.json yarn.lock ./ ---> 7b3383056d04 Step 13/21 : RUN yarn install ---> Running in 0a2cea20a493 yarn install v1.10.1 [1/4] Resolving packages... [2/4] Fetching packages... [91merror Command failed. Exit code: 128 Command: git Arguments: ls-remote --tags --heads ssh://git@bitbucket.org/alteadigital/aon-mycare-microservice.git Directory: /usr/src/app Output: Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. [0minfo Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. The command '/bin/sh -c yarn install' returned a non-zero code: 1 [Pipeline] } [Pipeline] // withDockerRegistry [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // container [Pipeline] } [Pipeline] // node [Pipeline] } [Pipeline] // podTemplate [Pipeline] End of Pipeline
The log above si the console log of a Jenkins pipeline that sometimes fails because of the failure of the following command:
git ls-remote --tags --heads ssh://git@bitbucket.org/alteadigital/aon-mycare-microservice.git
After a while the same pipeline with the same ssh key goes on normally …
The problem occurs mostly when the jenkins worker runs on a new host..