Skip to content

Commit

Permalink
Updated gradle build files and added documentation for deployment steps
Browse files Browse the repository at this point in the history
  • Loading branch information
candace-campbell committed Aug 9, 2023
1 parent 63dc2e6 commit ab522be
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 12 deletions.
20 changes: 20 additions & 0 deletions cosmos-sync-function-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Cosmos Sync Function App

## Setup

The following is needed in order to build and deploy this function app:

- [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)
- [Azure Functions Core Tools](https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v4%2Clinux%2Ccsharp%2Cportal%2Cbash#v2)
- [gradle](https://gradle.org/install/)

## Build and Deploy

To build and deploy you can use the Azure Functions Gradle plugin. You can do this with the following command:

```
gradle azureFunctionsDeploy -Dsubscription=<subcription_id> -DresourceGroup=<resource_group> -DappName=<function_app_name>
```
Replace the `subscription`, `resourceGroup` and `appName` parameters with the actual values.

*Note:* You will need to temporarily enable public access through the Azure portal to successfully deploy the function app.
25 changes: 13 additions & 12 deletions cosmos-sync-function-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ plugins {
apply plugin: "java"
apply plugin: 'kotlin'

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}

group 'gov.cdc.ocio'
version '1.0.0-SNAPSHOT'

Expand All @@ -34,17 +40,12 @@ repositories {
}

azurefunctions {
// subscription = '<your subscription id>'
resourceGroup = 'java-functions-group'
appName = 'cosmos-sync-function-app' // please rename the function name
pricingTier = 'Consumption' // refers https://github.com/microsoft/azure-maven-plugins/tree/develop/azure-functions-maven-plugin#supported-pricing-tiers for all valid values
region = 'westus'
subscription = System.getProperty("subscription")
resourceGroup = System.getProperty("resourceGroup")
appName = System.getProperty("appName")
allowTelemetry = false
runtime {
os = 'windows'

auth {
type = 'azure_cli'
}
// appSettings {
// key = 'value'
// }
// localDebug = "transport=dt_socket,server=y,suspend=n,address=5005"
}
}
20 changes: 20 additions & 0 deletions supplemental-api-function-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Suplemental API Function App

## Setup

The following is needed in order to build and deploy this function app:

- [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)
- [Azure Functions Core Tools](https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v4%2Clinux%2Ccsharp%2Cportal%2Cbash#v2)
- [gradle](https://gradle.org/install/)

## Build and Deploy

To build and deploy you can use the Azure Functions Gradle plugin. You can do this with the following command:

```
gradle azureFunctionsDeploy -Dsubscription=<subcription_id> -DresourceGroup=<resource_group> -DappName=<function_app_name>
```
Replace the `subscription`, `resourceGroup` and `appName` parameters with the actual values.

*Note:* You will need to temporarily enable public access through the Azure portal to successfully deploy the function app.
6 changes: 6 additions & 0 deletions supplemental-api-function-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ plugins {
apply plugin: "java"
apply plugin: "kotlin"

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}

group "gov.cdc.ocio"
version "1.0.0-SNAPSHOT"

Expand Down

0 comments on commit ab522be

Please sign in to comment.