!!!!!!!!!!! MOVED TO https://hub.docker.com/r/zotoio/github-task-manager/ - this will be deleted.
10K+
receive github hook, notify agent, receive task results, notify github (Unofficial)
Create an asynchronous CI agnostic mechanism for running custom test stage gates for github pull requests.
npm install --save github-task-manager| Environment variable | description |
|---|---|
| GTM_AWS_REGION | awsregion to create resources in |
| GTM_SQS_PENDING_QUEUE | name of SQS queue for new event |
| GTM_SQS_RESULTS_QUEUE | name of SQS queue for results |
| GTM_SNS_RESULTS_TOPIC | name of SNS topic for result ping |
| GTM_GITHUB_WEBHOOK_SECRET | shared secret from github webook config |
| GTM_GITHUB_TOKEN | access token for accessing github |
| GTM_GITHUB_TOKEN_FUNCTIONAL_TESTS | access token for individual test type. each task type can have a different token |
| GTM_GITHUB_HOST | api hostname can be updated for github enterprise |
| GTM_GITHUB_DEBUG | debug mode for api calls |
| GTM_GITHUB_TIMEOUT | github api timeout |
| GTM_GITHUB_PATH_PREFIX | path prefix for github enterprise |
| GTM_GITHUB_PROXY | github api client proxy |
| GTM_TASK_CONFIG_FILENAME | filename in repo to look for for task config - default is .githubTaskManager |
| GTM_AWS_ACCESS_KEY_ID | aws key id - for agent only |
| GTM_AWS_SECRET_ACCESS_KEY | aws secret - for agent only |
| AWS_PROXY | URL of proxy to use for network requests. Optional |
| GTM_AGENT_PORT | defaults to 9091 |
| GTM_AGENT_AWS_ACCESS_KEY_ID | access key for agent |
| GTM_AGENT_AWS_SECRET_ACCESS_KEY | secret key for agent |
| GTM_JENKINS_USER | login for jenkins executor |
| GTM_JENKINS_URL | url executor uses to talk to jenkins |
| GTM_JENKINS_CSRF | is csrf enabled? true or false |
| GTM_TEAMCITY_USER | teamcity executor user |
| GTM_TEAMCITY_PASSCODE | teamcity executor passcode |
| GTM_TEAMCITY_URL | teamcity api url |
| GTM_DOCKER_IMAGE_WHITELIST | comma separated list of regex of allows docker images eg. alpine:*,bash:latest |
| GTM_DOCKER_IMAGE_WHITELIST_FILE | use an optional docker whitelist file .dockerImageWhitelistExample |
| GTM_DOCKER_COMMANDS_ALLOWED | default is false, set to true to enable docker executor |
| GTM_DOCKER_ALLOW_PULL | allow agent to pull from registry |
| GTM_DOCKER_DEFAULT_WORKER_IMAGE | for running ci tasks, default is zotoio/gtm-worker:latest |
| IAM_ENABLED | agent host uses IAM ? |
| LAUNCHDARKLY_API_TOKEN | token for launchdarkly sass executor |
| GTM_LOGSTASH_HOST | optional logstash host for elasticsearch analysis |
| GTM_LOGSTASH_PORT | optional logstash port |
| GTM_SONAR_HOST_URL | sonar host url to connect to |
| GTM_SONAR_LOGIN | sonar access token |
| GTM_SONAR_PROJECTNAME_PREFIX | prefix if reporting to sonarqube |
| GTM_SONAR_ANALYSIS_MODE | mode for sonar runner, default preview for PRs |
| GTM_SONAR_GITHUB_OAUTH | github token for sonar to post comments and status |
| GTM_SONAR_SOURCES | default source dir is src |
| GTM_SONAR_JAVA_BINARIES | default is target |
| GTM_SONAR_MODULES | comma separated modules |
| GTM_SONAR_GITHUB_ENDPOINT | optional enterprise github api url |
| GTM_TASK_CONFIG_DEFAULT_URL | url to default sample config used when repo is missing .githubTaskManager.json |
| GTM_TASK_CONFIG_DEFAULT_MESSAGE_PATH | path to markdown comment file added to PRs when repo is missing .githubTaskManager.json |
npm run sls-deploy - note that this will create aws re$ources..npm run sls-logs-hook or npm run sls-logs-results to tail the logsnpm run build && npm start agent (or use docker/k8s)You can run the latest image from docker hub: https://hub.docker.com/r/wyvern8/github-task-manager
npm run docker-hub-run
..or run using the local checkout and tail logs:
npm run docker-local-bounce
..or if you have a k8s cluster and kubectl configured:
npm run k8s-apply
npm run k8s-delete
note that these k8s npm script inject vars from .env into the manifest
a starting point k8s manifest is in ./k8s/k8s-gtm-agent.yml
The agent uses environment variables to configure itself as well as any executors running within it. The below environment variables are required for basic operation of the GTM Agent.
TODO: Provide Variables
The GTM Agent provides an information page summarising the ongoing operation of the agent. The page is available on port 9091 by default.
Task executors for Jenkins, Teamcity, Travis, Http, Docker are in progress. Custom task executors can be added by adding this project as a dependency, and registering new Executors and EventHandlers. Please see https://github.com/wyvern8/gtm-agent for an example that you can fork and modify as required while still using this project as the core.
Fork this repository and work on your enhancements, then send a pull request. If you build custom plugins that may be useful to others in your forked gtm-agent, please let us know and may be able to assist wwith backporting to this project.
Use commitizen for conventional commit messages via git cz instead of git commit.
To setup if not already installed:
npm install -g commitizen
npm install -g cz-conventional-changelog
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
..or you can just use npm run commit which will use local commitizen install.
Content type
Image
Digest
Size
338.8 MB
Last updated
over 8 years ago
docker pull wyvern8/github-task-manager