Skip to main content

Monitor a git repository, execute a command when it changes. Basically a polling git-hook for pull.

purpose

Execute a chain of command when a git-repository changes

use case

Run testsets and build docker container after commit [change detected] * Run a testset * Build a docker container * Push to registry

requirements

pip install -r requirements.txt

use

reposmon.py

Monitor a git repository, execute a command when it changes.

Usage:
    reposmon.py [options] [--] [<giturl> <command>]
    reposmon.py -h | --help

Options:
  -h --help                   Show this screen.
  -o --once                   Run only once.
  -v --verbose                Verbose mode.
  -w --write=<writeymlpath>   Write arguments yaml file.
  -l --load=<loadymlpath>     Load arguments yaml file.
  -i --interval=<interval>    Seconds between checks [default: 60].
  -g --gitfolder=<gitfolder>  Folder to check the git repos out [default: .].
  -c --cmdfolder=<cmdfolder>  Folder from where to run the command [default: .].

example

When in local directory or work-directory changes, execute the command in the local directory or command-directory.

python reposmon.py git@github.com:erikdejonge/reposmon.git "docker build ."

optional

bash alias

alias reposmon=”~/[…]/reposmon/reposmon.py

install alias with a workspace checkout of reposmon:

alias reposmon="/Users/rabshakeh/workspace/reposmon/reposmon.py"

commit and sort aliases on osx

On osx the sortalias command sorts all aliasses in .bash_profile

alias sortalias='cat ~/.bash_profile > ~/.bash_profile.backup; cat ~/.bash_profile | grep -v alias | grep -v '\''^$'\'' > ~/.bash_profile_without_alias; alias | grep -v '\''^$'\'' > ~/.bash_profile_only_alias; cat ~/.bash_profile_without_alias > ~/.bash_profile; echo -e '\''\n'\'' >>  ~/.bash_profile; cat ~/.bash_profile_only_alias >>  ~/.bash_profile; rm ~/.bash_profile_without_alias; rm ~/.bash_profile_only_alias'

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reposmon-18.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file reposmon-18.tar.gz.

File metadata

  • Download URL: reposmon-18.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for reposmon-18.tar.gz
Algorithm Hash digest
SHA256 22567ad2693980b5bc3fd833ffdf76831d127cf613048147b22790277c87d8b4
MD5 a6f7c271aa5802d02078d3a5a705c477
BLAKE2b-256 e602da115fe63e04b9a2d5d78433aa7e27d93dd930ff3b032dd8f252e376f566

See more details on using hashes here.

Release history Release notifications | RSS feed

70

1 file

67

1 file

66

1 file

65

1 file

64

1 file

63

1 file

62

1 file

61

1 file

60

1 file

58

1 file

57

1 file

56

1 file

55

1 file

54

1 file

53

1 file

51

1 file

50

1 file

49

1 file

48

1 file

47

1 file

46

1 file

45

1 file

44

1 file

43

1 file

42

1 file

41

1 file

40

1 file

39

1 file

38

1 file

37

1 file

36

1 file

34

1 file

33

1 file

32

1 file

31

1 file

30

1 file

29

1 file

28

1 file

27

1 file

26

1 file

25

1 file

24

1 file

22

1 file

20

1 file

19

1 file

This release

18 This release

1 file

17

1 file

16

1 file

15

1 file

12

1 file

11

1 file

10

1 file

9

1 file

7

1 file

6

1 file

5

1 file

4

1 file

3

1 file

2

1 file

1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page