项目作者: plurid

项目描述 :
Cloud Service for Continuous Integration/Continuous Deployment Builder
高级语言: TypeScript
项目地址: git://github.com/plurid/performer.git
创建时间: 2020-07-25T17:33:41Z
项目社区:https://github.com/plurid/performer

开源协议:Other

下载











License: DEL


performer


Cloud Service for Continuous Integration/Continuous Delivery Builder


performer is a service or self-hosted system task-runner/builder based on GitOps.

Specialized support for the runtimes

  • NodeJS

performer uses plurid to explore information as a 3D structure.



Contents

Install

run

  1. npm install @plurid/performer

or

  1. yarn add @plurid/performer

create a server.js file

  1. import Performer from '@plurid/performer';
  2. const performer = new Performer();
  3. performer.start();

and run it

  1. node server.js

performer starts a server listening on port 56065 serving the performer UI on /, or which can receive GraphQL API requests on /perform.

Usage

In order to use performer, once the installation setup is finished, launch the performer UI and

Phase 0.⠀ — add provider(s);

Phase 1a. — link repositories;

Phase 1b. — add imagene(s);

Phase 2.⠀ — setup webhook(s);

Phase 3.⠀ — generate project(s);

Phase 4.⠀ — store secret(s);

Phase 5.⠀ — generate trigger(s);

Phase 6.⠀ — generate deployer(s);

——— performer setup finished ———

Phase 7.⠀ — code in the local repositories (linked at Phase 1a);

Phase 8.⠀ — push to branch listened by trigger (Phase 5);

Phase 9.⠀performer will automatically handle the builds and deploys based on the specified repositories, webhooks, triggers, and deployers;

Phase 10. — once performer finishes the build and deploy, run git fetch origin and git pull to update the local repositories.

Trigger example

  1. stages:
  2. - name: 'Name of the Stage'
  3. directory: '/path/of/the/directory/to/work/in'
  4. imagene: 'image-name-to-run-in-the-container'
  5. command: 'run a command'
  6. environment:
  7. - 'LIST=of-environment-variables'
  8. secretsEnvironment:
  9. - 'SECRET'
  10. - name: 'Deploy'
  11. imagene: 'deployer'
  12. id: 'deployer-id'
  13. timeout: 720s
  14. secrets:
  15. - 'SECRET'
  16. nodejs:
  17. cacheModulesActive: true # cache node_modules and .lock files for faster container creation
  18. cacheModulesTime: 5h # interger + 'h' for hours or 'forever'

Deployer example

  1. - name: 'Generate Latest Deployment'
  2. directory: '/path/of/the/directory/to/work/in'
  3. imagene: 'ubuntu'
  4. command: [
  5. '/bin/bash',
  6. '-c',
  7. 'sed "s/COMMIT_SHA/${SHORT_SHA}/g" Deployment.template.yaml > Deployment.latest.yaml'
  8. ]
  9. - name: 'Deploy Latest Imagene'
  10. directory: '/path/of/the/directory/to/work/in'
  11. imagene: 'kubectl'
  12. command: [
  13. 'apply',
  14. '-f',
  15. 'Deployment.latest.yaml'
  16. ]

Building

  1. docker build --file ./configurations/production.dockerfile \
  2. --tag performer \
  3. --build-arg PORT= \
  4. --build-arg PERFORMER_QUIET= \
  5. --build-arg PERFORMER_LOG_LEVEL= \
  6. --build-arg DOCKER_AUTH_USERNAME= \
  7. --build-arg DOCKER_AUTH_PASSWORD= \
  8. --build-arg DOCKER_AUTH_SERVER_ADDRESS= \
  9. --build-arg PERFORMER_DATABASE_TYPE= \
  10. --build-arg PERFORMER_STORAGE_TYPE= \
  11. --build-arg PERFORMER_STORAGE_BUCKET= \
  12. --build-arg PERFORMER_STORAGE_ROOT_PATH= \
  13. --build-arg PERFORMER_BASE_PATH= \
  14. --build-arg PERFORMER_AWS_API_VERSION= \
  15. --build-arg PERFORMER_AWS_REGION= \
  16. --build-arg PERFORMER_AWS_ACCESS_KEY_ID= \
  17. --build-arg PERFORMER_AWS_SECRET_ACCESS_KEY= \
  18. --build-arg GOOGLE_APPLICATION_CREDENTIALS= \
  19. --build-arg PERFORMER_CUSTOM_LOGIC= \
  20. --build-arg PERFORMER_PRIVATE_USAGE= \
  21. --build-arg PERFORMER_PRIVATE_OWNER_IDENTONYM= \
  22. --build-arg PERFORMER_PRIVATE_OWNER_KEY= \
  23. --build-arg PERFORMER_PRIVATE_TOKEN= \
  24. --build-arg PERFORMER_IN_CONTAINER_USAGE= \
  25. --build-arg PERFORMER_IN_CONTAINER_HOST_BIND= \
  26. .

performer uses by default delog for logging purposes.

In order to configure performer with delog pass the following required build arguments

  1. --build-arg USE_DELOG=true \
  2. --build-arg DELOG_ENDPOINT= \
  3. --build-arg DELOG_TOKEN= \

or customize the delog through any other build arguments

  1. --build-arg DELOG_GROUND_LEVEL= \
  2. --build-arg DELOG_FORMAT= \
  3. --build-arg DELOG_PROJECT= \
  4. --build-arg DELOG_SPACE= \

Packages

@plurid/performer">
@plurid/performer.svg?logo=npm&colorB=1380C3&style=for-the-badge" alt="Version">

@plurid/performer • the server application

@plurid/performer-cli">
@plurid/performer-cli.svg?logo=npm&colorB=1380C3&style=for-the-badge" alt="Version">

@plurid/performer-cli • the command-line interface

@plurid/performer-requests">
@plurid/performer-requests.svg?logo=npm&colorB=1380C3&style=for-the-badge" alt="Version">

@plurid/performer-requests • the API requests

Codeophon