Commit 5d55bc4f by nabil el mahiri

using npm login

parent edb2cbfc
Pipeline #437 failed with stages
in 2 seconds
...@@ -25,13 +25,13 @@ build: ...@@ -25,13 +25,13 @@ build:
only: only:
- master - master
script: script:
# - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
# # Run ssh-agent (inside the build environment) # Run ssh-agent (inside the build environment)
# - eval $(ssh-agent -s) - eval $(ssh-agent -s)
# # Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store # Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
# - ssh-add <(echo "$SSH_PRIVATE_KEY" | base64 -d) - ssh-add <(echo "$SSH_PRIVATE_KEY" | base64 -d)
# - mkdir -p ~/.ssh - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- chmod +x sh/run.sh - chmod +x sh/run.sh
- docker build --build-arg SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY" --build-arg CI_JOB_TOKEN="${CI_JOB_TOKEN}" -f docker/Dockerfile -t atlasvoyages-docker:prod . - docker build --build-arg SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY" --build-arg CI_JOB_TOKEN="${CI_JOB_TOKEN}" -f docker/Dockerfile -t atlasvoyages-docker:prod .
- sh sh/clean.sh - sh sh/clean.sh
......
...@@ -50,14 +50,14 @@ ARG BUILD_TOKEN ...@@ -50,14 +50,14 @@ ARG BUILD_TOKEN
# 2. Populate the private key file. # 2. Populate the private key file.
# 3. Set the required permissions. # 3. Set the required permissions.
# 4. Add github to our list of known hosts for ssh. # 4. Add github to our list of known hosts for ssh.
RUN mkdir ~/.ssh && \ # RUN mkdir ~/.ssh && \
echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa && \ # echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa && \
chmod 0600 ~/.ssh/id_rsa && \ # chmod 0600 ~/.ssh/id_rsa && \
echo "Host labs.atlasvoyages.com"$'\n\t'"IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config # echo "Host labs.atlasvoyages.com"$'\n\t'"IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
RUN touch ~/.ssh/known_hosts # RUN touch ~/.ssh/known_hosts
RUN ssh-keyscan -t rsa labs.atlasvoyages.com >> ~/.ssh/known_hosts # RUN ssh-keyscan -t rsa labs.atlasvoyages.com >> ~/.ssh/known_hosts
RUN cat ~/.ssh/known_hosts # RUN cat ~/.ssh/known_hosts
# RUN ssh -T gitlab.com # RUN ssh -T gitlab.com
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment