{"id":18601677,"url":"https://github.com/eficode/pipeline-the-game","last_synced_at":"2025-04-10T19:30:43.517Z","repository":{"id":49923348,"uuid":"322572925","full_name":"eficode/pipeline-the-game","owner":"eficode","description":"A digital version of: https://www.praqma.com/stories/pipeline-card-game/","archived":false,"fork":false,"pushed_at":"2024-10-09T13:55:57.000Z","size":5086,"stargazers_count":25,"open_issues_count":17,"forks_count":2,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-25T03:01:52.366Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eficode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-18T11:16:02.000Z","updated_at":"2024-11-09T07:11:07.000Z","dependencies_parsed_at":"2023-02-14T19:01:02.994Z","dependency_job_id":null,"html_url":"https://github.com/eficode/pipeline-the-game","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eficode%2Fpipeline-the-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eficode%2Fpipeline-the-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eficode%2Fpipeline-the-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eficode%2Fpipeline-the-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eficode","download_url":"https://codeload.github.com/eficode/pipeline-the-game/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281395,"owners_count":21077423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T02:09:07.050Z","updated_at":"2025-04-10T19:30:42.380Z","avatar_url":"https://github.com/eficode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pipeline: the game that delivers\n\nPipeline game app is developed by [Eficode](https://eficode.com) and [Xtreamers.io](https://xtreamers.io)\n\n### Table of Content\n\n1. [Introduction](#pencil2-introduction)\n2. [System Requirements](#memo-system-requirements)\n3. [Setup Firebase project](#setup-firebase-project)\n4. [How to run](#scroll-how-to-run)  \n   a. [Run locally](#run-locally)  \n   b. [Run with Firebase](#run-with-firebase)\n5. [How to make a production-ready build](#building_construction-how-to-make-a-production-ready-build)\n6. [How to deploy to Firebase](#rocket-how-to-deploy-to-firebase)\n7. [General project structure](#office-general-project-structure)\n\n## :pencil2: Introduction\n\n_Introduction taken from\n[Eficode's Pipeline page](https://www.eficode.com/pipeline-game)._\n\n\"What testing steps should you include in your\n**Continuous Delivery** pipeline? Don’t just\nstring together existing manual processes - use\nsimple, collaborative tools to design something\nbetter!\n\nCreating a Continuous Delivery (**CD**) pipeline\nis a key development in an organization’s\ntransformation to DevOps. A CD Pipeline covers all\nthe activities needed to transform a code change\nmade by a developer into updated software bringing\nvalue to users. Steps in the pipeline include\nbuilding a new version of the software as well as\ntesting and deploying it. Exactly what kinds of\nbuild, test and deployment steps will depend on\nmany factors and there is no ‘one perfect\npipeline’ which will suit all situations.\n\nI created the card game ‘Pipeline’ as a quick and\nfun way to explore alternatives for a CD pipeline\nwithout actually building anything. The goal of\nthe game is to design a pipeline for a given\nscenario and optimize the deployment lead time.\nYou work in a small group and get to discuss what\nsteps are needed and which order you want to do\nthem in. You will run into design tradeoff\ndecisions and may discover people have different\nrisk tolerances. If you play the game a second\ntime with a different scenario, or compare notes\nwith another group, you can learn more about how\ndifferent scenarios drive different decisions.\n\nPlaying the game should help you to build a real\npipeline for the real software system you are\nworking on. Building a CD pipeline needs\nspecialist knowledge of particular tools and could\nbe many weeks of work. Playing this game should\nhelp you to avoid some costly misunderstandings.\nIt’s also a fun way to engage a small group for an\nhour or two while you think through the issues\nyou’re facing.\"\n\nWell, this repository is just the **digital\nversion** of this card game!\n\n## :memo: System Requirements\n\nYou need to have Node 12. This is because, at the\ntime of writing, the highest stable Node version\n[supported by Cloud Functions](https://firebase.google.com/docs/functions/manage-functions)\nis Node 12. Please check your node version using\n\u003ccode\u003enode -v\u003c/code\u003e. If you have a different\nversion of Node, we recommend using\n[nvm](https://github.com/nvm-sh/nvm) (or the\ncorresponding\n[windows implementation](https://github.com/coreybutler/nvm-windows))\nto manage your Node versions.\n\n## :gear: Setup Firebase project\n\nTo run against your own Firebase project you have to\n\n* create a new firebase project\n* update .firebaserc file with your project id\n\n[Firebase doc](https://firebase.google.com/docs/web/setup) contains a great set-up guide to start with the web sdk from\nscratch.\n\nThis project uses firestore and realtime database, so create both!\n\n## :scroll: How to run\n\nAfter cloning this repository, move into the\n**root** folder and execute the following two\nscripts, which have been defined in the\n_[package.json](./package.json)_:\n\n```shell\nnpm run bootstrap\nnpm run build\n```\n\nThe first command will install all the\ndependencies needed to run the project, while the\nsecond command builds each package contained in\nthe lerna monorepo.\n\n#### Firebase and Environment variables setup\n\nAt the moment of writing, it is not possible to\nrun the firebase emulators without configuring a\nwhole firebase project through the firebase\nconsole. Thus, even if you want to only run the\nproject locally, you still need to create a\nfirebase project.\n\nOnce you have done that, please create a _.env_\nfile and put it into the\n[game-app](./packages/game-app) folder. This .env\nfile should contain and define values for the\nenvironment variables shown in\n[this template file](./packages/game-app/.env.template).\nTherefore, feel free to copy this template, rename\nit, and fill the values of the variables defined\nin it. Many of these variables can be filled with\nvalues from your firebase project console. For the\nremaining variables, please keep on reading the\nfollowing sections.\n\n### Run Locally\n\nFirst of all, make sure you have followed the\ninstructions for the\n[setup of Firebase and the environment variables](#firebase-and-environment-variables-setup).  \nWe use\n[Firebase Emulators](https://firebase.google.com/docs/emulator-suite)\nto use the Firebase services locally.\n\n#### Firebase Emulators\n\nTo start the emulators, move into the **root**\nfolder and run\n\n```shell\nnpm run start:emulators\n```\n\nAgain, this script is defined in the root\n[package.json](./package.json).  \nMake sure you have port 5000, 5001, 5555, 8080,\n9000 and 9090 available. Then, go to the _.env_\nfile created in the previous step (the one in the\n[game-app](./packages/game-app) folder) and fill\nin the following variables as follows:\n\n```dotenv\nREACT_APP_FIREBASE_USE_EMULATORS=true\nFIREBASE_AUTH_EMULATOR_HOST=localhost:9099\nFIRESTORE_EMULATOR_HOST=localhost:8080\n```\n\nNote: If you need these ports and cannot make them\navailable, you can always configure the firebase\nemulators by modifying the\n[firebase.json](./firebase.json). If you do so,\nplease remember to modify any reference to such\nports in the environment variables.\n\n#### Root Environment variables\n\nBefore running the project, you will need to\ncreate a _.env_ file also in the **root** folder\ncontaining the following **environment\nvariables**:\n\n```dotenv\nFIRESTORE_EMULATOR_HOST=localhost:8080\nFIREBASE_AUTH_EMULATOR_HOST=localhost:9099\nFIREBASE_DATABASE_EMULATOR_HOST=localhost:9000\nGCLOUD_PROJECT=pipeline-game-development\n```\n\nIf you want to skip signup and email verification\nyou can add\n\n```dotenv\nCREATE_TEST_USER=true\n```\n\nThis will create a test user with email\ntest@test.com and password Test1234\n\n#### Running\n\nRun the following script in the **root** folder to\ninitialize the local emulators:\n\n```shell\nnpm run scripts:load-initial-data:local\n```\n\nThis will fill the emulators with some initial\ndata needed to load the application.\n\nAnd now the last step: move into the\n[game-app](./packages/game-app) folder and run:\n\n```shell\nnpm run start\n```\n\nand your Pipeline react app will be available for\nyou to use.\n\n### Run with Firebase\n\nFirst of all, make sure you have followed the\ninstructions for the\n[setup of Firebase and the environment variables](#firebase-and-environment-variables-setup).  \nMake sure you have your firebase project up and\nrunning. Then, go to the _.env_ file **you** have\ncreated (the one in the\n[game-app](./packages/game-app) folder) and fill\nin the following variables as follows:\n\n```dotenv\nREACT_APP_FIREBASE_USE_EMULATORS=false\n```\n\nThe other environment variables concerning the\nemulators can be left undefined, since we are not\nusing the emulators in this section. If you want\nto run locally using the emulators, please refer\nto [this section](#run-locally).  \nFinally, you just have to move into the\n[game-app](./packages/game-app) folder and run:\n\n```shell\nnpm run start\n```\n\nand your Pipeline react app will be available for\nyou to use.\n\n## :building_construction: How to make a production-ready build\n\nThis step is also included in the\n[How to run](#how-to-run) section, but we rewrite\nit here for completeness.\n\nJust go to the **root** folder and execute the\nfollowing scripts:\n\n```shell\nnpm run bootstrap\nnpm run build\n```\n\nThis will create a production-ready build of the\npackages for which it is possible to do so.\n\n## :rocket: How to deploy to Firebase\n\nAfter\n[building the project](#building_construction-how-to-make-a-production-ready-build),\nyou can easily deploy to your Firebase project\nrunning:\n\n```shell\nnpx firebase deploy --project \u003cFIREBASE_PROJECT_ID\u003e\n```\n\nThis command will automatically deploy the\nfollowing projects to firebase:\n\n- Firestore rules and indexes\n- RealTime Database rules\n- Cloud functions\n- Hosting (game-app)\n\nPlease, refer to\n[the Firebase documentation](https://firebase.google.com/docs/cli#deployment)\nfor details about how to use the \u003ccode\u003efirebase\ndeploy\u003c/code\u003e command.\n\n### Initialize remote database\n\nTo load initial data into the firestore remote\ndatabase change your root env file, removing the\nfirebase emulator variable and adding the\nreference to your admin credentials json file\n\n```dotenv\nGCLOUD_PROJECT=\nGOOGLE_APPLICATION_CREDENTIALS=\n```\n\nand then run again\n\n\n```shell\nnpm run scripts:load-initial-data:local\n```\n\n###### tags: `Pipeline` `Documentation` `README` `Eficode` `xtream`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feficode%2Fpipeline-the-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feficode%2Fpipeline-the-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feficode%2Fpipeline-the-game/lists"}