I am using gitlab pipeline to build and deploy the docker image to AWS ECS. It was working fine before 4 days. But now its giving an error in build stage.
Build log is here:
> [4/5] RUN npm install:
222.4 npm notice
222.5 npm ERR! code ECONNRESET
222.5 npm ERR! network Client network socket disconnected before secure TLS connection was established
222.5 npm ERR! network This is a problem related to network connectivity.
222.5 npm ERR! network In most cases you are behind a proxy or have bad network settings.
222.5 npm ERR! network
222.5 npm ERR! network If you are behind a proxy, please make sure that the
222.5 npm ERR! network 'proxy' config is set properly. See: 'npm help config'
222.9
223.0 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-01-08T07_25_50_560Z-debug-0.log
------
WARNING: current commit information was not captured by the build: git was not found in the system: exec: "git": executable file not found in $PATH
ERROR: failed to solve: executor failed running [/bin/sh -c npm install]: exit code: 1
section_end:1704698966:step_script
e[0Ksection_start:1704698966:upload_artifacts_on_failure
e[0Ke[0Ke[36;1mUploading artifacts for failed jobe[0;me[0;m
e[32;1mUploading artifacts...e[0;m
e[0;33mWARNING: gl-auto-build-variables.env: no matching files. Ensure that the artifact path is relative to the working directory (/builds/edukit/edukit-api-sails-1.5)e[0;m
e[31;1mERROR: No files to upload e[0;m
section_end:1704698966:upload_artifacts_on_failure
e[0Ksection_start:1704698966:cleanup_file_variables
e[0Ke[0Ke[36;1mCleaning up project directory and file based variablese[0;me[0;m
section_end:1704698967:cleanup_file_variables
e[0Ke[31;1mERROR: Job failed: exit code 1
Here is my pipline config:
include:
- template: AWS/Deploy-ECS.gitlab-ci.yml
workflow:
rules:
- if: $CI_COMMIT_BRANCH == "live" || ($CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "live" )
variables:
CI_AWS_ECS_CLUSTER: ****
CI_AWS_ECS_SERVICE: ****
CI_AWS_ECS_TASK_DEFINITION: ****
AWS_REGION: ****
AWS_DEFAULT_REGION: ****
AWS_ACCESS_KEY_ID: ****
AWS_SECRET_ACCESS_KEY: *****
Please help in this. I have tried the build process multiple time but facing same error.
Full log:
e[0KRunning with gitlab-runner 16.6.0~beta.105.gd2263193 (d2263193)e[0;m
e[0K on blue-4.saas-linux-small-amd64.runners-manager.gitlab.com/default J2nyww-s, system ID: s_cf1798852952e[0;m
e[0K feature flags: FF_USE_IMPROVED_URL_MASKING:truee[0;m
section_start:1704698713:prepare_executor
e[0Ke[0Ke[36;1mPreparing the "docker+machine" executore[0;me[0;m
e[0KUsing Docker executor with image registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image:v1.51.0 ...e[0;m
e[0KStarting service docker:20.10.12-dind ...e[0;m
e[0KPulling docker image docker:20.10.12-dind ...e[0;m
e[0KUsing docker image sha256:1a42336ff683d7dadd320ea6fe9d93a5b101474346302d23f96c9b4546cb414d for docker:20.10.12-dind with digest docker@sha256:6f2ae4a5fd85ccf85cdd829057a34ace894d25d544e5e4d9f2e7109297fedf8d ...e[0;m
e[0KWaiting for services to be up and running (timeout 30 seconds)...e[0;m
e[0KAuthenticating with credentials from job payload (GitLab Registry)e[0;m
e[0KPulling docker image registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image:v1.51.0 ...e[0;m
e[0KUsing docker image sha256:77767b5f46beb70cd96ae318409fed78042bb5fba03ea003f4e80380cca23c40 for registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image:v1.51.0 with digest registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image@sha256:3aa21af9d67edf70f5b8eb5535f6e66f1954447c184d640bf1a87bbd4c52a885 ...e[0;m
section_end:1704698731:prepare_executor
e[0Ksection_start:1704698731:prepare_script
e[0Ke[0Ke[36;1mPreparing environmente[0;me[0;m
Running on runner-j2nyww-s-project-46022365-concurrent-0 via runner-j2nyww-s-s-l-s-amd64-1704698675-34b3f55c...
section_end:1704698734:prepare_script
e[0Ksection_start:1704698734:get_sources
e[0Ke[0Ke[36;1mGetting source from Git repositorye[0;me[0;m
e[32;1mFetching changes with git depth set to 20...e[0;m
Initialized empty Git repository in /builds/edukit/edukit-api-sails-1.5/.git/
e[32;1mCreated fresh repository.e[0;m
e[32;1mChecking out 0fab283d as detached HEAD (ref is live)...e[0;m
e[32;1mSkipping Git submodules setupe[0;m
e[32;1m$ git remote set-url origin "${CI_REPOSITORY_URL}"e[0;m
section_end:1704698735:get_sources
e[0Ksection_start:1704698735:step_script
e[0Ke[0Ke[36;1mExecuting "step_script" stage of the job scripte[0;me[0;m
e[0KUsing docker image sha256:77767b5f46beb70cd96ae318409fed78042bb5fba03ea003f4e80380cca23c40 for registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image:v1.51.0 with digest registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image@sha256:3aa21af9d67edf70f5b8eb5535f6e66f1954447c184d640bf1a87bbd4c52a885 ...e[0;m
e[32;1m$ if [[ -z "$CI_COMMIT_TAG" ]]; then # collapsed multi-line commande[0;m
e[32;1m$ /build/build.she[0;m
Logging in to GitLab Container Registry with CI credentials...
Login Succeeded
Logging in to GitLab Dependency proxy with CI credentials...
Login Succeeded
Building Dockerfile-based application...
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 180B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/node:18-alpine
#3 DONE 0.4s
#4 [1/5] FROM docker.io/library/node:18-alpine@sha256:b1a0356f7d6b86c958a06949d3db3f7fb27f95f627aa6157cb98bc65c801efa2
#4 DONE 0.0s
#5 [internal] load build context
#5 DONE 0.0s
#6 [auth] edukit/edukit-api-sails-1.5/live:pull token for registry.gitlab.com
#6 DONE 0.0s
#7 importing cache manifest from registry.gitlab.com/edukit/edukit-api-sails-1.5/live:latest
#7 ...
#8 importing cache manifest from registry.gitlab.com/edukit/edukit-api-sails-1.5/live:5387d739081a61e710a113790d4eff529b7256f3
#8 DONE 0.4s
#7 importing cache manifest from registry.gitlab.com/edukit/edukit-api-sails-1.5/live:latest
#7 DONE 0.4s
#5 [internal] load build context
#5 transferring context: 2.65MB 0.1s done
#5 DONE 0.1s
#4 [1/5] FROM docker.io/library/node:18-alpine@sha256:b1a0356f7d6b86c958a06949d3db3f7fb27f95f627aa6157cb98bc65c801efa2
#4 resolve docker.io/library/node:18-alpine@sha256:b1a0356f7d6b86c958a06949d3db3f7fb27f95f627aa6157cb98bc65c801efa2 0.0s done
#4 sha256:b1a0356f7d6b86c958a06949d3db3f7fb27f95f627aa6157cb98bc65c801efa2 1.43kB / 1.43kB done
#4 sha256:91f3cd192c9f1a1a907b8f53bb8cf737557e6c1bb9dc499a725e48ba6ced58fd 1.16kB / 1.16kB done
#4 sha256:7e24f77d89cc2edd3dd6963dd95bfde2dd4fc72e242b060ca583f7d93bc87efe 7.15kB / 7.15kB done
#4 sha256:c303524923177661067f7eb378c3dd5277088c2676ebd1cd78e68397bb80fdbf 0B / 3.35MB 0.1s
#4 sha256:eb7895eb72c1a145d166631d5a81c61bffd747783c52e8a1de9fa0e7d5871817 0B / 39.98MB 0.1s
#4 sha256:7049a133eb54d652049fa44657d24cef7298dc371ffab6e27f5cd5e53e62159f 0B / 2.34MB 0.1s
#4 sha256:c303524923177661067f7eb378c3dd5277088c2676ebd1cd78e68397bb80fdbf 3.35MB / 3.35MB 0.1s done
#4 sha256:eb7895eb72c1a145d166631d5a81c61bffd747783c52e8a1de9fa0e7d5871817 2.10MB / 39.98MB 0.2s
#4 sha256:7049a133eb54d652049fa44657d24cef7298dc371ffab6e27f5cd5e53e62159f 2.10MB / 2.34MB 0.2s
#4 extracting sha256:c303524923177661067f7eb378c3dd5277088c2676ebd1cd78e68397bb80fdbf
#4 sha256:90577567f13c6046278cbfa4a557cb5a19ed5f9c281ab540e84ddd8f74c71922 0B / 445B 0.2s
#4 sha256:eb7895eb72c1a145d166631d5a81c61bffd747783c52e8a1de9fa0e7d5871817 11.53MB / 39.98MB 0.3s
#4 sha256:7049a133eb54d652049fa44657d24cef7298dc371ffab6e27f5cd5e53e62159f 2.34MB / 2.34MB 0.2s done
#4 extracting sha256:c303524923177661067f7eb378c3dd5277088c2676ebd1cd78e68397bb80fdbf 0.2s done
#4 sha256:90577567f13c6046278cbfa4a557cb5a19ed5f9c281ab540e84ddd8f74c71922 445B / 445B 0.2s done
#4 sha256:eb7895eb72c1a145d166631d5a81c61bffd747783c52e8a1de9fa0e7d5871817 39.98MB / 39.98MB 0.5s
#4 extracting sha256:eb7895eb72c1a145d166631d5a81c61bffd747783c52e8a1de9fa0e7d5871817
#4 sha256:eb7895eb72c1a145d166631d5a81c61bffd747783c52e8a1de9fa0e7d5871817 39.98MB / 39.98MB 0.6s done
#4 extracting sha256:eb7895eb72c1a145d166631d5a81c61bffd747783c52e8a1de9fa0e7d5871817 1.3s done
#4 extracting sha256:7049a133eb54d652049fa44657d24cef7298dc371ffab6e27f5cd5e53e62159f 0.1s
#4 extracting sha256:7049a133eb54d652049fa44657d24cef7298dc371ffab6e27f5cd5e53e62159f 0.1s done
#4 extracting sha256:90577567f13c6046278cbfa4a557cb5a19ed5f9c281ab540e84ddd8f74c71922 done
#4 DONE 2.3s
#9 [2/5] WORKDIR /app
#9 DONE 1.0s
#10 [3/5] COPY package*.json .
#10 DONE 0.0s
#11 [4/5] RUN npm install
#11 222.4 npm notice
#11 222.4 npm notice New patch version of npm available! 10.2.3 -> 10.2.5
#11 222.4 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.5>
#11 222.4 npm notice Run `npm install -g npm@10.2.5` to update!
#11 222.4 npm notice
#11 222.5 npm ERR! code ECONNRESET
#11 222.5 npm ERR! network Client network socket disconnected before secure TLS connection was established
#11 222.5 npm ERR! network This is a problem related to network connectivity.
#11 222.5 npm ERR! network In most cases you are behind a proxy or have bad network settings.
#11 222.5 npm ERR! network
#11 222.5 npm ERR! network If you are behind a proxy, please make sure that the
#11 222.5 npm ERR! network 'proxy' config is set properly. See: 'npm help config'
#11 222.9
#11 223.0 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-01-08T07_25_50_560Z-debug-0.log
#11 ERROR: executor failed running [/bin/sh -c npm install]: exit code: 1
------
> [4/5] RUN npm install:
222.4 npm notice
222.5 npm ERR! code ECONNRESET
222.5 npm ERR! network Client network socket disconnected before secure TLS connection was established
222.5 npm ERR! network This is a problem related to network connectivity.
222.5 npm ERR! network In most cases you are behind a proxy or have bad network settings.
222.5 npm ERR! network
222.5 npm ERR! network If you are behind a proxy, please make sure that the
222.5 npm ERR! network 'proxy' config is set properly. See: 'npm help config'
222.9
223.0 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-01-08T07_25_50_560Z-debug-0.log
------
WARNING: current commit information was not captured by the build: git was not found in the system: exec: "git": executable file not found in $PATH
ERROR: failed to solve: executor failed running [/bin/sh -c npm install]: exit code: 1
section_end:1704698966:step_script
e[0Ksection_start:1704698966:upload_artifacts_on_failure
e[0Ke[0Ke[36;1mUploading artifacts for failed jobe[0;me[0;m
e[32;1mUploading artifacts...e[0;m
e[0;33mWARNING: gl-auto-build-variables.env: no matching files. Ensure that the artifact path is relative to the working directory (/builds/edukit/edukit-api-sails-1.5)e[0;m
e[31;1mERROR: No files to upload e[0;m
section_end:1704698966:upload_artifacts_on_failure
e[0Ksection_start:1704698966:cleanup_file_variables
e[0Ke[0Ke[36;1mCleaning up project directory and file based variablese[0;me[0;m
section_end:1704698967:cleanup_file_variables
e[0Ke[31;1mERROR: Job failed: exit code 1
e[0;m