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.

Deploying with an empty repositoryUrl (i.e. without pulling from git) doesn't seem to work

See original GitHub issue

Hi,

The documentation says that by leaving repositoryUrl empty (though that’s a bit ambiguous) shipit can be used to deploy without fetching from git (possibly using the local directory?): “If empty Shipit will try to deploy without pulling the changes.”

Now when I try to do that, it seems to ignore the above and tries to do the normal flow, it seems, which fail because of the missing repo url:

Running 'deploy:init' task...
Finished 'deploy:init' after 647 μs

Running 'deploy:fetch' task...
Create workspace...
Workspace created: "/tmp/tmp-100255o9Se5wCMUtf"
Initialize local repository in "/tmp/tmp-100255o9Se5wCMUtf"
Running "git init" on local.
@ Initialized empty Git repository in /tmp/tmp-100255o9Se5wCMUtf/.git/
Repository initialized.
List local remotes.
Running "git remote" on local.
Update remote "" to local repository "/tmp/tmp-100255o9Se5wCMUtf"
Running "git remote add shipit " on local.
@ usage: git remote add [<options>] <name> <url>
@
@     -f, --fetch           fetch the remote branches
@     --tags                import all tags and associated objects when fetching
@                           or do not fetch any tag at all (--no-tags)
@     -t, --track <branch>  branch(es) to track
@     -m, --master <branch>
@                           master branch
@     --mirror[=<push|fetch>]
@                           set up remote as a mirror to push to or fetch from
@
'deploy:fetch' errored after 27 ms
Error: Command failed: git remote add shipit
usage: git remote add [<options>] <name> <url>

    -f, --fetch           fetch the remote branches
    --tags                import all tags and associated objects when fetching
                          or do not fetch any tag at all (--no-tags)
    -t, --track <branch>  branch(es) to track
    -m, --master <branch>
                          master branch
    --mirror[=<push|fetch>]
                          set up remote as a mirror to push to or fetch from


    at ChildProcess.exithandler (child_process.js:270:12)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:921:16)
    at Socket.stream.socket.on (internal/child_process.js:348:11)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at Pipe._handle.close [as _onclose] (net.js:549:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
EduardsEcommented, Nov 23, 2019

How would one deal with a monorepo and microservices where all your services are in one git repo, but you would like to deploy them separately?

2reactions
sandervankasteelcommented, Nov 18, 2018

I have found a workaround for this (if this is still relevant for you @atleta )… Install shipit-utils add the following snippet to your shipitfile.js

  var utils = require('shipit-utils');

  // Deploy from working directory without repository fetch
  utils.registerTask(shipit, 'deploy:fetch', function() {

    // Set the workspace variable which is originally set in overridden deploy:fetch
    // This variable is needed in deploy:update and some other tasks
    shipit.workspace = shipit.config.workspace;
  
    shipit.emit('fetched');
  });

And of course set your repositoryUrl to an empty string 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git push: "fatal 'origin' does not appear to be a git repository
First, check that your origin is set by running git remote -v. This should show you all of the push / fetch remotes...
Read more >
How to Get Started with GIT and work with GIT Remote Repo
Initialize a new Git Repo (git init). To manage a project under Git, run " git init " at the project root directory...
Read more >
2.5 Git Basics - Working with Remotes
Managing remote repositories includes knowing how to add remote repositories, remove remotes that are no longer valid, manage various remote branches and define ......
Read more >
Working with Github in SAP Business Application Studio (next ...
Using SAP Business Application Studio, you can connect to all public git services, such as GitHub, GitLab, and GitBucket i.e You can connect ......
Read more >
Build GitHub repositories - Azure Pipelines - Microsoft Learn
Using a GitHub repository with Azure Pipelines. ... If no pr triggers appear in your YAML file, pull request validations are automatically ...
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