Operations grimoire/Git operations in production containers: Difference between revisions

From Nasqueron Agora
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Sometimes, there is a need to use Git from a container.
If you're on Dwellers and not inside a container, you're interested by [[Operations grimoire/Dwellers to DevCentral|Dwellers to DevCentral]].
== This is not a good practice ==
Fill a task on Phabricator and explains why you need to do this.
These should be addressed and eliminated as a goal.
== When deployed code diverge than upstream ==
== When deployed code diverge than upstream ==


# Create a <code>production</code> branch to store any edited code
# Create a <code>production</code> branch to store any edited code
# Document on the grimoire the need to rebase this production branch against upstream relevant branch (generally master)
# Document on the grimoire the need to rebase this production branch against upstream relevant branch (generally <code>master</code>)


== Git configuration ==
== Git configuration ==
Line 14: Line 23:
         name = Nasqueron Operations
         name = Nasqueron Operations
</syntaxhighlight>
</syntaxhighlight>
== Known current cases ==
* Rebase a production branch against a master branch: we should use instead allow two containers for the same service, to be prepare a new container from a new image instead of rebase the code in the prod container directly.

Latest revision as of 02:17, 24 March 2018

Sometimes, there is a need to use Git from a container.

If you're on Dwellers and not inside a container, you're interested by Dwellers to DevCentral.

This is not a good practice

Fill a task on Phabricator and explains why you need to do this.

These should be addressed and eliminated as a goal.

When deployed code diverge than upstream

  1. Create a production branch to store any edited code
  2. Document on the grimoire the need to rebase this production branch against upstream relevant branch (generally master)

Git configuration

If you need to quickly use Git in production, use the following commit references if you use a shared ops account:

$ cat > ~/.gitconfig
[user]
        email = ops-noreply@nasqueron.org
        name = Nasqueron Operations

Known current cases

  • Rebase a production branch against a master branch: we should use instead allow two containers for the same service, to be prepare a new container from a new image instead of rebase the code in the prod container directly.