All my steps are taking a long time to complete

You may recently have noticed that your builds sometimes slow down, appearing to wait for a minute or more before doing anything at each step.

 

If so, check to see if your config has something like the following.

 

      - run:
          name: Install node 9.11 # an example of the wrong way to do it
          command:  |
              set +e
              touch $BASH_ENV
              curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
              echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
              echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
              echo 'nvm install v9.11' >> $BASH_ENV
              echo 'nvm alias default v9.11' >> $BASH_ENV
 
Setting things up this way will check to see that nvm is installed before every single step runs. If there's any problem with a mirror that it checks, that can cause problems for the steps.
 
There was an easy-to-find article suggesting the above, which is why there's a good chance it's present in your config.
 
Instead, consider installing only once at the beginning of the job.
      - run:
          name: Install nvm
          command:  |
              set +e
              touch $BASH_ENV
              curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
              echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
              echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
      - run:
          name: Install node version
          command:  |
              nvm install v9.11
              echo 'nvm alias default v9.11' >> $BASH_ENV

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.