cego / gitte Goto Github PK
View Code? Open in Web Editor NEWGit automation and action execution across a list of projects
License: MIT License
Git automation and action execution across a list of projects
License: MIT License
For example, the build script is often identical between groups.
It would be nice to configure groups as:
build:
groups:
*: ["build.sh"]
And maybe even allow runnning
git-local-devops run build
, which would require all build actions to have a wildcard group.
I would like to be able to run
gitte run build&up group
Actions, groups and projects should be able to be specified as so.
I suppose let actions be sequential, and groups/projects be parallized.
Timeout?
Use JSON Schema with https://ajv.js.org/ package
Probably just need to split on \r
Dont print progressbar and latest output 10 times per second. Only print stuff once.
Some projects might depend on other projects to start properly.
May be related to #46
It is nice that stdout&stderr is not spammed in terminal, but it would be nice if a user could see exactly what happened, and when.
gitte run <action> <group|*> <project|*>
Spam the log, for debug purposes
If I run
gitte run build+up cego.dk
I want it to NOT run up, if any build script fails. Or at least ask me. Some actions has failed, do you want to continue (Y/n)
Also should same logic should be applied for?
gitte run build cego.dk+example.com
I think you can make an argument that groups should be independent, but actions should not.
git-local-devops --validate
Should return json schema errors
Resulting in errors not being printed pretty anymore.
gitte clean untracked
gitte clean ignores
gitte clean master
gitte clean non-gitte
- Remove folders not managed by gitte.gitte clean
-- all of the aboveFor example, one project action can have the '*'
group. If there are 3 other groups, and the command gitte run action *
is run, it will run the '*'
group action 4 times.
Progress bar for promises.all, potentially also output telling what the program is currently waiting for.
Should be disable-able via an option.
To enhance developer experience, refactor project to a module with TypeScript.
'*'
and +
syntax
Ability to specify projects.
For example the last line from a script may say something like
happytiger-dev environment: { name: happytiger.co.uk-dev, url: https://gamesearch-lejo.greathippydev.dk }
I suggest having a config along the lines of:
searchFor:
- regex: "-dev environment: { name: ([^.]*).*-dev, url: (.*) }"
hint: "{green {1} gamesearch service has started sucessfully - go visit it on} {cyan {2}}"
From which, if the regex matches any stdout output from that action, it should print
I think this config should sit on the action itself OR global.
Implemented in #64
Instead of git rev-parse --agreb-ref HEAD
.
Reason:
┌──(fresser㉿laudesk)-[~/git-local-devops]
└─$ git rev-parse --abrev-ref HEAD
--abrev-ref
dc9b998a7800bbdac455e1e5af87a4ca0cde7461
expected output:
┌──(fresser㉿laudesk)-[~/git-local-devops]
└─$ git branch --show-current
20-typescriptify-and-use-esm
Based on remote, use nesting folders instead of a long name
such that /services/abc/someproject
gets cloned into /services/abc/someproject
instead of services-abc-someproject
https://blog.sffc.xyz/post/185195398930/why-you-should-use-git-pull-ff-only-git-is-a
If rebase and or merge with origin/<default_branch> fails show conflict with default_branch message
Should work like gitlab CI, creating acyclic graphs of execution.
Depends on #44 to refactor how actions is run first.
Reason: Some actions can take many minutes, and it is unclear to the user what tasks the users is waiting for.
Do we want to enforce eslint?
git merge --no-commit --no-ff <default_branch>
Some developers will most likely find it instrusive to constantly have master merged into their repository.
Some developers will most likely want it.
Make it default disabled, so no one will get changes by surprise, and make it enableable with --auto-merge
or env variable GITTE_AUTO_MERGE
.
--- # .gitte.yml
projects:
example-com:
remote: [email protected]:cego/example.com
default_branch: master
actions:
up: ["docker-compose", "up"]
--- # .gitte-override.yml
projects:
example-com:
actions: {}
Config and Override files are deep extended enabling developers to opt-out or opt extra stuff in.
Add and option to output projects with script tragets eg.
$ git-local-devops --list
project1: [ up, down]
project2: [ up, down, clean]
Right now, output is saved to a file once everything finishes, likewise the hints are checked when everything have finished.
If an action is running for suspiciously long time, one could be interested in the current status/log of the action.
To fix, use execa instead of promisify-child-process and enable hooks that saves and regex matches relevant information as it comes in.
This way we can also avoid having a huge buffer for all stdout/stderr, and only save the produced hints.
Also it would be nice to maybe display the 5 latest log messages from stdout under the progressbar
Currenctly I have to run git-local-devops run up sn
but since up
is a custom defined action, I would prefer to ommit the run
part of the command.
So git-local-devops up sn
is equvivalent with git-local-devops run up sn
by making run
the default command.
If my project needs to up a mysql before upping my project, i want to be able to add --no-needs option, to skip upping mysql if it is already running.
Words like warn, warning, abandoned is good to know about, but not enough to mark the run as failed.
They are "random" right now, because of parallelization
If i clone
git clone [email protected]:githubtraining/hellogitworld.git
it clones into the folder hellogitworld
.
However getProjectDirFromRemote("[email protected]:githubtraining/hellogitworld.git") returns "githubtraining-hellogitworld". Is this intended?
The error message+hint should be enough.
If the project I am working on depends on a package, fx. a client to a service I cannot develop the client and test it with Gitte.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.