Skip to content

Conversation

@marcellodesales
Copy link

@marcellodesales marcellodesales commented Sep 24, 2023

🎉 Support for Dockerized execution

  • Create bot source-code using docker containers doesn't require installation of nodejs etc..
  • Requires docker engine
  1. Create an empty dir and cd to it
  2. Execute docker command
  3. Profit! The code is generated!

DOCKER COMMAND: docker run -ti -w $(pwd) -v $(pwd):$(pwd) marcellodesales/create-probot-app vionix-ghas-manager`

docker run -ti -w $(pwd) -v $(pwd):$(pwd) marcellodesales/create-probot-app vionix-ghas-manager
Let's create a Probot app! Hit enter to accept the suggestion. ? App name: vionix-ghas-manager ? Description of app: Manages Github Advanced Security features for a Github organization. ? Author's full name: Marcello DeSales ? Which template would you like to use? git-data-js => Opens a PR every time someone installs your app for the first time created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/.dockerignore created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/.env.example created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/CODE_OF_CONDUCT.md created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/CONTRIBUTING.md created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/Dockerfile created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/LICENSE created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/README.md created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/app.yml created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/index.js created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/package.json created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/.gitignore created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/test/index.test.js created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/test/fixtures/installation.created.json created file: /Users/mdesales/dev/github.company.com/seceng-devsecops-platform/devsecops-github-app-ghas-onboard/vionix-ghas-manager/test/fixtures/mock-cert.pem Finished scaffolding files! Installing dependencies. This may take a few minutes... npm WARN deprecated @types/pino-pretty@5.0.0: This is a stub types definition. pino-pretty provides its own type definitions, so you do not need this installed. npm WARN deprecated @types/pino-std-serializers@4.0.0: This is a stub types definition. pino-std-serializers provides its own type definitions, so you do not need this installed. added 604 packages, and audited 605 packages in 3m 43 packages are looking for funding  run `npm fund` for details found 0 vulnerabilities Successfully created vionix-ghas-manager. Begin using your app with:  cd vionix-ghas-manager  npm start Refer to your app's README for more usage instructions. Visit the Probot docs  https://probot.github.io/docs/ Get help from the community:  https://probot.github.io/community/ Enjoy building your Probot app!
Deprecated APIs are still being used in the app. Using npm@7 so that we can get the app dockerized. https://stackoverflow.com/questions/74935310/creation-of-probot-github-app-failing-with-error-the-programmatic-api-was-remov $ docker run -ti marcellodesales/create-probot-app node ./bin/create-probot-app.js create-probot-app [options] <destination> Argument <destination> is required. Example: create-probot-app my-first-app Run create-probot-app --help to see all options. (devsecops-platform-artifactory-manager)
$ docker compose build [+] Building 28.3s (14/14) FINISHED docker:desktop-linux => [create-probot-app internal] load .dockerignore 0.0s => => transferring context: 88B 0.0s => [create-probot-app internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 700B 0.0s => [create-probot-app internal] load metadata for docker.io/library/node:20-slim 1.3s => [create-probot-app base 1/4] FROM docker.io/library/node:20-slim@sha256:2dab2d0e8813ee1601f8d25a8e4aa5530ffc4d0cc16600ec4fd080263b5b1ccd 0.0s => [create-probot-app internal] load build context 0.0s => => transferring context: 5.03kB 0.0s => CACHED [create-probot-app base 2/4] RUN corepack enable 0.0s => [create-probot-app base 3/4] COPY . /app 0.1s => [create-probot-app base 4/4] WORKDIR /app 0.0s => [create-probot-app app-dependencies 1/3] WORKDIR /github.com/marcellodesales/probot 0.0s => [create-probot-app app-dependencies 2/3] COPY package* . 0.0s => [create-probot-app app-dependencies 3/3] RUN pnpm install 12.9s => [create-probot-app stage-5 1/2] COPY . . 0.1s => [create-probot-app stage-5 2/2] RUN pnpm run build 11.1s => [create-probot-app] exporting to image 2.6s => => exporting layers 2.6s => => writing image sha256:e793d3fee03df8abd57909c5d9b1cdc96aad8a135185e3c44661823fb4a58042 0.0s => => naming to docker.io/marcellodesales/create-probot-app
$ docker run -ti marcellodesales/create-probot-app myapp Let's create a Probot app! Hit enter to accept the suggestion. ? App name: (myapp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant