-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Working on converting app to a cloud service * Fixed workflow * Added msbuild * Restored packages * Renamed step * Installing cspack * Noted where cspack originally came from * Quoted everything * Created an octopus package and uploaded the artifact * Trying to fix file upload * Fixed path * Added new fields required for ARM * Added new config files * Fixed up cscfg file * Fixed the XML * Build both ASM and ARM cloud service package * Fixed step names * Fixed ids * Fixed instance names * Include the csdef file in the archive
- Loading branch information
1 parent
23bd491
commit 0e38811
Showing
8 changed files
with
147 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: RandomQuotes Cloud Service | ||
on: | ||
push: | ||
jobs: | ||
build: | ||
runs-on: windows-2019 | ||
steps: | ||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
- uses: actions/checkout@v1 | ||
- name: Nuget Restore | ||
shell: powershell | ||
run: nuget restore RandomQuotes.sln | ||
- name: MSBuild | ||
shell: powershell | ||
run: msbuild.exe RandomQuotes.sln /p:Configuration=Release "/p:Platform=Any CPU" /p:DeployOnBuild=true /p:DeployTarget=Package /p:AutoParameterizationWebConfigConnectionStrings=false | ||
# These files were found under C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin on a local install | ||
- name: Download cspack | ||
shell: powershell | ||
run: Invoke-WebRequest -Uri https://octopus-guides.s3.amazonaws.com/cspack/cspack.zip -OutFile cspack.zip | ||
- name: Extract cspack | ||
shell: powershell | ||
run: mkdir cspack; Expand-Archive -LiteralPath cspack.zip -DestinationPath cspack | ||
|
||
- name: CSPack ARM | ||
shell: powershell | ||
run: .\cspack\cspack.exe ServiceDefinitionARM.csdef "/role:WebRole1;RandomQuotes\obj\Production\Package\PackageTmp" "/rolePropertiesFile:WebRole1;.\AzureRoleProperties.txt" "/sitePhysicalDirectories:WebRole1;Web;RandomQuotes\obj\Production\Package\PackageTmp" "/out:RandomQuotes-Azure-Release-ARM.cspkg" | ||
- name: Create Octopus ARM Package | ||
shell: powershell | ||
run: Get-ChildItem -Path RandomQuotes-Azure-Release-ARM.cspkg, ServiceConfiguration.Cloud.ARM.cscfg, ServiceDefinitionARM.csdef | Compress-Archive -DestinationPath RandomQuotes-Azure-Release-ARM.1.0.${{ github.run_number }}.zip | ||
|
||
- name: CSPack ASM | ||
shell: powershell | ||
run: .\cspack\cspack.exe ServiceDefinition.csdef "/role:WebRole1;RandomQuotes\obj\Production\Package\PackageTmp" "/rolePropertiesFile:WebRole1;.\AzureRoleProperties.txt" "/sitePhysicalDirectories:WebRole1;Web;RandomQuotes\obj\Production\Package\PackageTmp" "/out:RandomQuotes-Azure-Release-ASM.cspkg" | ||
- name: Create Octopus ASM Package | ||
shell: powershell | ||
run: Get-ChildItem -Path RandomQuotes-Azure-Release-ASM.cspkg, ServiceConfiguration.Cloud.cscfg, ServiceDefinition.csdef | Compress-Archive -DestinationPath RandomQuotes-Azure-Release-ASM.1.0.${{ github.run_number }}.zip | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: 0.0.${{ github.run_number }} | ||
release_name: Release 0.0.${{ github.run_number }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload ARM Zip Release Asset | ||
id: upload-arm-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: .\RandomQuotes-Azure-Release-ARM.1.0.${{ github.run_number }}.zip | ||
asset_name: RandomQuotes-Azure-Release-ARM.1.0.${{ github.run_number }}.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload ASM Zip Release Asset | ||
id: upload-asm-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: .\RandomQuotes-Azure-Release-ASM.1.0.${{ github.run_number }}.zip | ||
asset_name: RandomQuotes-Azure-Release-ASM.1.0.${{ github.run_number }}.zip | ||
asset_content_type: application/zip |
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 @@ | ||
TargetFrameWorkVersion=v4.0 |
Binary file not shown.
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,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ServiceConfiguration serviceName="AzureCloudServiceCSharp" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="6" osVersion="*" schemaVersion="2015-04.2.6"> | ||
<!-- https://docs.microsoft.com/en-us/azure/cloud-services-extended-support/schema-cscfg-file --> | ||
<Role name="WebRole1"> | ||
<Instances count="1" /> | ||
<ConfigurationSettings> | ||
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" /> | ||
</ConfigurationSettings> | ||
</Role> | ||
|
||
<NetworkConfiguration> | ||
<VirtualNetworkSite name="randomquotes"/> | ||
<AddressAssignments> | ||
<InstanceAddress roleName="WebRole1"> | ||
<Subnets> | ||
<Subnet name="default"/> | ||
</Subnets> | ||
</InstanceAddress> | ||
</AddressAssignments> | ||
</NetworkConfiguration> | ||
|
||
</ServiceConfiguration> |
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ServiceConfiguration serviceName="AzureCloudServiceCSharp" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="6" osVersion="*" schemaVersion="2015-04.2.6"> | ||
<Role name="WebRole1"> | ||
<Instances count="1" /> | ||
<ConfigurationSettings> | ||
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" /> | ||
</ConfigurationSettings> | ||
</Role> | ||
</ServiceConfiguration> |
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ServiceConfiguration serviceName="AzureCloudServiceCSharp" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="6" osVersion="*" schemaVersion="2015-04.2.6"> | ||
<Role name="WebRole1"> | ||
<Instances count="1" /> | ||
<ConfigurationSettings> | ||
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" /> | ||
</ConfigurationSettings> | ||
</Role> | ||
</ServiceConfiguration> |
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,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ServiceDefinition name="AzureCloudServiceCSharp" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2015-04.2.6"> | ||
<WebRole name="WebRole1" vmsize="Standard_A1"> | ||
<Sites> | ||
<Site name="Web"> | ||
<Bindings> | ||
<Binding name="Endpoint1" endpointName="Endpoint1" /> | ||
</Bindings> | ||
</Site> | ||
</Sites> | ||
<ConfigurationSettings> | ||
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" /> | ||
</ConfigurationSettings> | ||
<Endpoints> | ||
<InputEndpoint name="Endpoint1" protocol="http" port="80" /> | ||
</Endpoints> | ||
</WebRole> | ||
</ServiceDefinition> |
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,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ServiceDefinition name="AzureCloudServiceCSharp" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2015-04.2.6"> | ||
<WebRole name="WebRole1" vmsize="Standard_A1"> | ||
<Sites> | ||
<Site name="Web"> | ||
<Bindings> | ||
<Binding name="Endpoint1" endpointName="Endpoint1" /> | ||
</Bindings> | ||
</Site> | ||
</Sites> | ||
<ConfigurationSettings> | ||
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" /> | ||
</ConfigurationSettings> | ||
<Endpoints> | ||
<InputEndpoint name="Endpoint1" protocol="http" port="80" /> | ||
</Endpoints> | ||
</WebRole> | ||
</ServiceDefinition> |