GithubHelp home page GithubHelp logo

sproutsocial / botanist Goto Github PK

View Code? Open in Web Editor NEW
14.0 89.0 11.0 1.82 MB

Fast web and command-line code search tool for companies and teams who use github and/or bitbucket.

License: MIT License

Python 73.95% Shell 5.24% CSS 5.73% HTML 11.87% Dockerfile 3.20%
infrastructure-zone dx-squad product-jenkins tier-2

botanist's Introduction

botanist

a web and command-line code search tool for teams.

Provides the service behind codesearcher

Updates and Deploys

Updates

Updates to this repo will trigger a jenkins job to build, scan, and push the image to ECR.

Deploys

The image launched on the codesearcher instance is managed by infra_chef.

Once a new image is uploaded, to deploy it requires an infra_chef PR to update the botanist_version attribute

(Don't forget to also bump the cookbook version in metadata.rb and update CHANGELOG)

Web search

botanist-search-main

botanist-search-results

Command-line search

botanist-btgrep-command-line

Packages

some software packages are included to make this work. they are included in this repository for now for compatibility purposes.

Code search

The fast searching is made possible by the excellent codesearch tool from Google:

https://code.google.com/p/codesearch/ (cindex running on a periodic cron to re-index)

Bitbucket repository fetching

https://github.com/samkuehn/bitbucket-backup (running on a periodic cron to update the source code to search) NOTE: Enclosed under ./packages is a custom fork of samkeuhn/bitbucket-backup. I've issued several PR's that he's accepted so he is really quick and amenable to updates, I just haven't quite finished cleaning up the additions I made recently.

GitHub repository fetching

wrote up something to do this in Python based on https://github.com/celeen/gitter

The default GitHub branch name is "main".

Pull requests welcome!

Running locally using docker

1. Create location for repositories on disk

mkdir -p $HOME/botanist/repos

2. Set up credentials

# copy env file to env.local, and set GH_USER, GH_ORGS, GH_PW so you can fetch code to index
# GH_PW should be a personal access token with repo scope
# if the org you want to back up uses SSO, you also need to authorize the token to the org
# under "Configure SSO"
cp env.template env.local

3. Start botanist

docker-compose stop && docker-compose rm -f && docker-compose up --build -d

4. Fetch code repositories using the image you just built

docker run --env-file env.local -v $HOME/botanist/repos:/botanist/repos botanist-webapp /botanist/bin/fetch-code.sh

5. Index the code repositories using the image you just built

docker run --env-file env.local -v $HOME/botanist/repos:/botanist/repos botanist-webapp /botanist/bin/index.sh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.