|
| 1 | + |
| 2 | +# A sample to use `Custom Shapes` within OCI Build pipelines. |
| 3 | + |
| 4 | +The feature enables developers to select their preferred CPU and memory for their managed build stage. |
| 5 | + |
| 6 | + ``` |
| 7 | + $ git init oni-build-custom-shapes |
| 8 | + $ cd ooci-build-custom-shapes |
| 9 | + $ git remote add origin <url to this git repo> |
| 10 | + $ git config core. sparse checkout true |
| 11 | + $ echo "oci-build-examples/oci-build-custom-shapes/*">>.git/info/sparse-checkout |
| 12 | + $ git pull --depth=1 origin main |
| 13 | +
|
| 14 | + ``` |
| 15 | + |
| 16 | +Procedure to use the illustration |
| 17 | +------- |
| 18 | + |
| 19 | +- Create OCI Notifications topic - https://docs.oracle.com/en-us/iaas/Content/Notification/Tasks/create-topic.htm#top |
| 20 | +- Create OCI DevOps projects and associate with the topic - https://docs.oracle.com/en-us/iaas/Content/devops/using/create_project.htm#create_a_project |
| 21 | +- Enables logs for the DevOps project. |
| 22 | +- Create a dynamic group with the below rules. |
| 23 | +```java |
| 24 | +ALL {resource.type = 'devopsbuildpipeline', resource.compartment.id = 'OCID OF YOUR COMPARTMENT'} |
| 25 | +``` |
| 26 | +- Create an identity policy with the below statements. |
| 27 | +```java |
| 28 | +Allow dynamic-group <NAME OF THE DYNAMIC GROUP> to manage ons-topics in compartment <NAME OF THE COMPARTMENT> |
| 29 | +``` |
| 30 | +- Create an `OCI Code repo` |
| 31 | +- Push the whole contents here to the OCI CODE REPO created. |
| 32 | +- Create a build pipeline. |
| 33 | +  |
| 34 | + |
| 35 | +- Use `+` and add a `custom managed build stage`. |
| 36 | +  |
| 37 | + |
| 38 | +- Select `custom shape` |
| 39 | +  |
| 40 | + |
| 41 | +- Choose runner shapes `OCPUs` and `Memory` using the slide bars. |
| 42 | +  |
| 43 | + |
| 44 | +- Associate the code repo as the `primary source code` for the stage. |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +- Click `Add` |
| 49 | +- Click the `Start manual run` option and run a build stage. |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +The custom build shape option will create a build runner with the desired OCPU and Memory and start the build run. The concerned resources are managed by building service internally and are not visible to customer tenancy. Based on the resource using the concerned price will be charged back to the user. |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +- The build will continue and display some of the default values from the build runner machine. |
| 58 | +- Along with the custom shape option, the default build runner option will be retained for use cases that can fix within the defined resources. |
| 59 | + |
| 60 | +Read more |
| 61 | +--- |
| 62 | + |
| 63 | +- OCI DevOps service - https://docs.oracle.com/en-us/iaas/Content/devops/using/home.htm |
| 64 | +- Details about OCI Anomaly detection and workshop -. |
| 65 | + |
| 66 | +- There are reference samples available within the directory [ai-data-references](ai-data-references) to set up the anomaly detection project /model and run execution using [OCI CLI](https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/run-workshop?p210_wid=819&p210_wec=&session=107963899615339). |
| 67 | + |
| 68 | +Contributors |
| 69 | +=========== |
| 70 | + |
| 71 | +- Author: [Rahul M R](https://github.com/RahulMR42). |
| 72 | +- Collaborators: |
| 73 | +- Last release: March 2023 |
| 74 | + |
| 75 | +### Back to examples. |
| 76 | +---- |
| 77 | + |
| 78 | +- 🍿 [Back to OCI Devops Build sample](./../README.md) |
| 79 | +- 🏝️ [Back to OCI Devops sample](./../../README.md) |
| 80 | + |
0 commit comments