Git Product home page Git Product logo

docs's People

Contributors

ahawkins avatar aleksandarcole avatar bogyo210 avatar charismatron avatar commanderk5 avatar csidyel avatar d-stefanovic avatar damjanbecirovic avatar darkofabijan avatar dradulescu avatar ivana-markovic avatar ivanaur avatar jnunez1204 avatar lucaspin avatar mactsouk avatar markoa avatar mateuscap avatar mattrym avatar milica-nerlovic avatar mimimalizam avatar mlivancic avatar radwo avatar ralopes avatar ropsii avatar shiroyasha avatar simonremotify avatar skipi avatar ssamardzic avatar tomfern avatar veljkomaksimovic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

How to cache rbenv directory with additional Ruby versions

Use case is when a user installs a Ruby version which is not preinstalled on Semaphore. This is a time-consuming operation since it involves download over network and compilation. They want to do it once and keep the stuff available in cache "forever". Let's add a recipe for that using cache to the Ruby guide. Over time we can add similar tip for other languages too.

Use case: Go service to Kubernetes

A user on support recently outlined a complete scenario:

I have a Go 1.10 project, using MySQL for data storage.

  • The first step should do some linting with gofmt, go-checkstyle.
  • Then building a docker image.
  • Next do unit tests.
  • Finally the image should pushed to a Kubernetes cluster.

Mention that cache restore does partial matching

It's what makes possible things like:

cache restore gems-$SEMAPHORE_GIT_BRANCH-$(checksum Gemfile.lock),gems-$SEMAPHORE_GIT_BRANCH-,gems-master-

And so since restore does partial matching, we should probably clarify that other commands do full matching.

Applies to caching reference + guided tour page.

Ruby caching example provides incomplete info on restoring cache

A user reported:

In your Ruby docs you provide a demonstration on how to cache your gems in vendor/bundle and then use the BUNDLE_PATH environment in the next task to tell bundler where to find the dependencies. However I couldn’t get this to work at all like the docs described - I had to run bundle check --path vendor/bundle after restoring the cache to get bundler to recognise the dependency location. Is this an issue with the docs or something I’m doing?

How to cache parent or base Docker images

Scenario: my project is using some Docker images as a starting point. For example my service runs on golang:alpine parent image and also connects to a mongodb base image via docker compose. I don’t want to pull my parent or dependency images from scratch in every workflow. These images should stay in cache "indefinitely".

Use case: conditional testing of subcomponents

This one comes up on support occasionally and would be a useful demo and addition to the Use cases section.

Scenario

  1. Scan changes in current revision and determine which subcomponents of our app need to be rebuilt.
  2. Launch parallel jobs that execute a bin/ci script that will run the test suite for each affected subcomponent.

Solution outline

  1. In the first block of a pipeline, run a script to determine which subcomponents need to be tested. Store that info in cache.
  2. In the second block, define jobs for all subcomponents. At the start of each job fetch data created in the first step, check whether current subcomponent should be tested and run ci script only if it’s true.

It’s a demo so subcomponents can simply be two subdirectories.

Ubuntu 18.04 image reference is missing info on Node.js

  • (Only) Node version v8.11.3 is installed and set as default. Alias 8.11.
  • nvm is installed, version 0.33.2
  • nvm ls gives a long lis, basically every version can be installed minus the latest one via nvm install <version>
  • yarn dependency manager is installed, version 1.10.1
  • bower package manager is also installed, version 1.8.4

Provide info on using pip

Current Python docs show use of pipenv, which is fairly new and not preinstalled.

Pip is preinstalled and common so let's have show how to use pip in dependency caching section first, before pipenv.

Provide troubleshooting tips for sem init

For example, we sometimes receive a message like

I've been trying to add a project to Semaphore. Unfortunately, using sem init appears not to work appropriately, since on both my machine, as well as the machine of a Git admin, running sem init fails with "{"message":"admin permisssions are required on the repository in order to add the project to Semaphore"}".

Raw response:

In order to add a project to Semaphore 2.0, the user must be a member of your Semaphore 2.0 organization and also have Admin permission level for the project on GitHub.
Currently, Semaphore is "mirroring" permission rights from GitHub which means that a user will have the same level of permission on Semaphore 2.0 as on GitHub.

Also, if the person has Admin permission level on GitHub and is a member of your Semaphore 2.0 organization and still cannot add a project, could you please check if the access for Semaphore 2.0 was granted within your GitHub organization? You can check that here: https://github.com/settings/connections/applications/328c742132e5407abd7d.
If it has been granted, there should be a green checkmark next to your organization name. If there isn't one, that means that the access hasn't been granted for Semaphore 2.0 and you cannot add a project to it.

We'd add a potentially more concise explanation and any other similar FAQ to the guided tour.

How to reuse Docker images across blocks using cache

Let's complete #172 before starting work on this one. This would be a new take which would supersede #74, so please create a new pull request.

Scenario: I build Docker images based on my code in one block and then want to carry them to the next blocks as fast as possible. After we're done with testing phases and the image is promoted — let's say I've published my service/app to a registry — the image(s) are no longer needed in cache. So we can delete them from cache at the end of the workflow. This approach keeps cache use at a normal level.

sem reference: merge examples in the flow of document

Reading sem reference with fresh eyes is a difficult task without examples. There are examples, but they're very far down, so we ask the reader to make a lot of effort to go back and forth across a very long piece of text. Unless there was a strong argument for the current approach, let's not have a separate Examples section but merge the examples with the core reference.

Style polishing

Some details I noticed :).

image

  • I'd say we don't need the word reference in the title?
  • I don't know if it makes sense to make S capital in Sem command line tool title?
  • Not sure about capitalizing letters in titles

image

Again, not sure if it makes sense to stick to rule of the capital letter in the first bullet point and the small letter in the second.

image

See also part suggests also the articles which aren't yet published so we should check if this can be fixed anyhow.

These are just details which I was only able to make comments on due to lack of the technical knowledge :).

Enhance that it is necessary to run "bundle install" after restoring gems from cache

When bundle install --path vendor/bundle is not included, execution of bundle exec rake tasks fail with message similar to the following:

Could not find rake-x.x.x in any of the sources
Run `bundle install` to install missing gems.

Command sequence should look like:

cache restore gems-$(checksum Gemfile.lock)
bundle install  --path vendor/bundle

How to download and cache a custom file

Simple application of cache. The point is to download once, and then in all future workflows avoid network roundtrips which can vary. In the example let's use a .deb package.

How to install a different version of MySQL or Postgres

We currently send something like this via support:

docker run --net=host --rm -d -e MYSQL_ALLOW_EMPTY_PASSWORD=true --name mysql mysql:5.7

This sets up MySQL listening on 0.0.0.0:3306.

We should have a verified example for both MySQL and PG. Verification should include connecting and using the provisioned database (but this shouldn't be in the recipe).

Depending on final length we can add this either to the Ubuntu reference or create a new page.

Linkable headers

Sharing links to subsections of a docs page is a common action while doing support.

Currently, we need to "right click > inspect > copy id > paste into urlbar".

Use case: Heroku deployment

Can use the app from #165 as an example. The Heroku page can then be connected as one of the possible next steps to any web framework use case.

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.