-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
156 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import * as os from 'os'; | ||
import { Utility } from './Utility'; | ||
import { GitHubActionsToolHelper } from './GitHubActionsToolHelper'; | ||
|
||
const toolHelper = new GitHubActionsToolHelper(); | ||
const util = new Utility(); | ||
|
||
export class AddOnServicesHelper { | ||
|
||
/** | ||
* Creates or updates an add-on service. | ||
* @param addOnType - the type of the add-on binding. This could be one of the following: | ||
* kafka, redis, postres, qrant, mariadb, milvus, and weaviate. | ||
* @param bindingName - the name of the add-on binding | ||
* @param resourceGroup - the name of the resource group to use for the task. | ||
* @param environment - the Container App Environment that will be associated with the add-on | ||
*/ | ||
public async createAddOnService(addOnType: string, bindingName: string, resourceGroup: string, environment: string) { | ||
toolHelper.writeDebug(`Attempting to create a ${addOnType} binding service ${bindingName}`) | ||
try { | ||
await util.execute(`az containerapp add-on ${addOnType} create --name ${bindingName} --environment ${environment} --resource-group ${resourceGroup}`) | ||
} catch (err) { | ||
toolHelper.writeError(`Failed to create add-on binding ${bindingName} in resource group ${resourceGroup} and environment ${environment}`); | ||
throw err; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters