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
SourceAction = new BitBucketSourceAction(new BitBucketSourceActionProps() | |
{ | |
ConnectionArn = connectionArn, | |
ActionName = "Github", | |
Output = artifact, | |
Owner = "OksanaH", | |
Repo = "CDKPipelines", | |
Branch = "main" | |
}), |
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
var codeStarConnection = new CfnConnection(this, "WhatDayConnection", new CfnConnectionProps | |
{ | |
ConnectionName = "WhatDayConnection", | |
ProviderType = "GitHub" | |
}); |
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
var containerOptions = new ContainerDefinitionOptions | |
{ | |
Image = ContainerImage.FromAsset("app") | |
Logging = logging | |
}; |
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
using Amazon.CDK; | |
using Amazon.CDK.AWS.EC2; | |
using Amazon.CDK.AWS.ECR; | |
using Amazon.CDK.AWS.ECS; | |
using Amazon.CDK.AWS.ECS.Patterns; | |
namespace Fargate | |
{ | |
public class RandomNumStack : Stack | |
{ |
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
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env | |
WORKDIR /app | |
EXPOSE 80 | |
# Copy csproj and restore as distinct layers | |
COPY *.csproj ./ | |
COPY *.config ./ | |
RUN dotnet restore | |
# Copy everything else and build |
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
using Microsoft.AspNetCore.Mvc; | |
namespace RandomNumberGenerator.Controllers | |
{ | |
[ApiController] | |
[Route("[controller]")] | |
public class RandomNumberController : ControllerBase | |
{ | |
[HttpGet] | |
public IActionResult Get() |
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
private static async Task<TableDescription> CreateTable(string name) | |
{ | |
var request = new CreateTableRequest | |
{ | |
AttributeDefinitions = new List<AttributeDefinition>() | |
{ | |
new AttributeDefinition{ | |
AttributeName = "City", | |
AttributeType = "S" | |
}, |
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
version: 0.2 | |
phases: | |
install: | |
runtime-versions: | |
dotnet: 3.1 | |
pre_build: | |
commands: | |
- dotnet restore AspNetCoreWebService/AspNetCoreWebService.csproj | |
- dotnet restore AspNetCoreWebServiceTest/AspNetCoreWebServiceTest.csproj | |
NewerOlder