{"id":18823520,"url":"https://github.com/ocp-devspaces-gamification/ds-challenge-03","last_synced_at":"2026-01-27T04:05:23.154Z","repository":{"id":270291335,"uuid":"869786800","full_name":"ocp-devspaces-gamification/ds-challenge-03","owner":"ocp-devspaces-gamification","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-19T06:49:05.000Z","size":839,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-22T11:17:11.094Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ocp-devspaces-gamification.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-08T22:18:00.000Z","updated_at":"2024-12-22T23:46:06.000Z","dependencies_parsed_at":"2024-12-30T04:32:53.730Z","dependency_job_id":null,"html_url":"https://github.com/ocp-devspaces-gamification/ds-challenge-03","commit_stats":null,"previous_names":["ocp-devspaces-gamification/ds-challenge-03"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ocp-devspaces-gamification/ds-challenge-03","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocp-devspaces-gamification%2Fds-challenge-03","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocp-devspaces-gamification%2Fds-challenge-03/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocp-devspaces-gamification%2Fds-challenge-03/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocp-devspaces-gamification%2Fds-challenge-03/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocp-devspaces-gamification","download_url":"https://codeload.github.com/ocp-devspaces-gamification/ds-challenge-03/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocp-devspaces-gamification%2Fds-challenge-03/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28800985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T03:44:14.111Z","status":"ssl_error","status_checked_at":"2026-01-27T03:43:33.507Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-08T00:53:56.319Z","updated_at":"2026-01-27T04:05:23.138Z","avatar_url":"https://github.com/ocp-devspaces-gamification.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Challenge-03\n\n### Scenario\n* Lets continue to enhance the ds-challenge-02\n* So far we have done consistent way of creating tooling and extensions. Let's take a step further by enhancing this to create consistent way to build, package, run the programs and also creating standardized end points\n\n### Set Up + verification\n* It's time to create standardized commands. You will create two commands in devfile.yaml\n    * Create 1st command with id \"package\" and label (1. Package the application) inside devfile to execute below command\n      ```bash\n      ./mvnw package\n      ```\n    * Create 2nd command with id \"livecoding\" and lable (2. Start Development mode) inside devfile to execute below command\n      ```bash\n      ./mvnw compile quarkus:dev\n      ```\n    * Leverage the Resources section and find how you can create commands in devfile.yaml\n* Creating Two Endpoints in \"tools\" container of the devfile\n    * The \"src/main/java/org/acme/GreetingResource.java\" has restful endpoints : \n        * localhost:8080\n        * localhost:8080/api/hello\n        * localhost:8080/api/greet/#input\n    * Create 1st endpoint for \"/api/hello\" [with name=\"greet-attendee\"]\n    * Create 2nd endpoint for the root \"/\" [with name=base-challenge]\n    * Leverage the Resources section and find how you can create endpoints\n* Once you complete the above, reload the devspaces [Click the Arrows symbol(\u003e\u003c) in the Bottom Left corner to open a new menu] with option \"Restart Workspace from Local Devfile\".\n![ ](docs/images/challenge03.reload.jpg)\n\n* In devspaces, Open a terminal. Run the below command to change the mvnw file to be executable\n  ```bash\n  chmod 755 mvnw\n  ```\n* Run the command \"1. Package the application\" first. See success criteria on how to run the command\n* Run the quarkus application using command \"2. Start Development mode\" you created in devfile. \n* Select your option \"y/n\" to the question (if asked) : Do you agree to contribute anonymous build time data to the Quarkus community?\n* If things don't look OK, delete the workspace, update the devfile directly in source control and recreate the workspace\n\n\n### Success Criteria\n* Commands are created and can be invoked via the \"Hamburger Icon --\u003e Terminal --\u003e Run Task --\u003e Devfile --\u003e Select #Commands\"\n* Endpoints (shown in the bottom left corner of the IDE) can be invoked when live coding is ON\n* Invoking \"base-challenge\" endpoint displays an image of the \"Developer Flow\"\n![ ](docs/images/challenge03.endpoint.jpg)\n\n* Invoking \"greet-attendee\" endpoint (or executing below command in the terminal) displays a response \"Hello Challenge Attendees\"\n    ```bash\n    curl localhost:8080/api/hello\n    ```\n\n### Resources\n* https://devfile.io/docs/2.2.2/adding-commands\n* https://devfile.io/docs/2.2.2/defining-endpoints\n* https://devfile.io/docs/2.2.2/devfile-schema\n\n### What did we learn?\n* OpenShift DevSpaces reduces the Developers pain points. As a Developer, your life is getting simpler with the below\n    * Automatic Extensions (Language Support for Java(TM) by Red Hat) inclusion\n* Now we have consitent endpoints and commands. This makes iterative development faster (no more typing commands and or finding endpoints via code)\n* The next developer will know exactly how things are done making it a much better experience\n* One of the core functions of development is to Test \u0026 Debug code. In the next challenge, we will explore debugging inside DevSpaces\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focp-devspaces-gamification%2Fds-challenge-03","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focp-devspaces-gamification%2Fds-challenge-03","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focp-devspaces-gamification%2Fds-challenge-03/lists"}