question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’m currently using Gitlab CI to manage my tests, build and deploy. I was using Docker for this but I just got rid of it because was causing other problems.

Right now I’m using mup to make the deployment. So far I tried locally and it works (well, I’ve got another issues but at least it connect to my server so far).

So now I’m integrating this process on my Gitlab pipeline:

Deploy:
  image: node:latest
  stage: Deploy
  script:
    - curl "https://install.meteor.com/?release=1.4.2.6" | sh
    - chown -R $USER ~/.meteor
    - chown -R $USER .meteor/local
    - npm install -g mup
    - cd .deploy
    - mup setup
    - mup deploy

It’s works.

But for this I need to storage my ssh key on my project folder and I don’t want to do this (I put it on my private folder). Gitlab provides the option to create variables (like $USER above) with for example a ssh key but the mup.json file needs the route for the ssh key and I can’t use this. Either login with password because I disabled this on my server for security reasons. Only is possible with a ssh key.

Run mup deploy on my local machine is not an option for me. So my question here is how can I manage this process with a ssh key created by Gitlab?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
zoderncommented, Apr 7, 2017

Sorry, I should have been more clear. You can add a step before mup setup for Gitlap Pipeline to save it in a file from the env variable.

Deploy:
  image: node:latest
  stage: Deploy
  script:
    - curl "https://install.meteor.com/?release=1.4.2.6" | sh
    - chown -R $USER ~/.meteor
    - chown -R $USER .meteor/local
    - npm install -g mup
    - cd .deploy
    - echo $SSH_KEY > ./ssh_key
    - mup setup
    - mup deploy
1reaction
mtwalshcommented, Feb 1, 2018

Try changing this:

echo $SSH_KEY > ./ssh_key

To this:

echo "$SSH_KEY" > ./ssh_key

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Continuous Integration: Testing, Software & Process ...
Having a CI process is not only beneficial for software developers, but for their managers as well. Both parties can gather valuable feedback...
Read more >
What is Continuous Integration | Atlassian
Continuous integration (CI) is the practice of automating the integration of code changes from multiple contributors into a single software project.
Read more >
Continuous Integration (CI) Explained - Semaphore
Continuous integration (CI) is a software development practice in which developers merge their changes to the main branch many times per day. Each...
Read more >
What is CI/CD? - Red Hat
CI /CD is a method to frequently deliver apps to customers by introducing automation into the stages of app development.
Read more >
What is Continuous Integration? – Amazon Web Services
Continuous integration most often refers to the build or integration stage of the software release process and entails both an automation component (e.g....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found