Adds Azure Gallery release script - no more need for WebPI builds

This commit is contained in:
Sebastiaan Janssen
2017-09-22 16:52:04 +02:00
parent 92b6e276bf
commit 74e3308017
8 changed files with 59 additions and 325 deletions

View File

@@ -377,14 +377,6 @@ function Prepare-Packages
Copy-Files "$src\Umbraco.Web.UI\umbraco\lib" "*" "$tmp\WebApp\umbraco\lib"
Copy-Files "$src\Umbraco.Web.UI\umbraco\views" "*" "$tmp\WebApp\umbraco\views"
Copy-Files "$src\Umbraco.Web.UI\umbraco\preview" "*" "$tmp\WebApp\umbraco\preview"
# prepare WebPI
Write-Host "Prepare WebPI"
Remove-Directory "$tmp\WebPi"
mkdir "$tmp\WebPi" > $null
mkdir "$tmp\WebPi\umbraco" > $null
Copy-Files "$tmp\WebApp" "*" "$tmp\WebPi\umbraco"
Copy-Files "$src\WebPi" "*" "$tmp\WebPi"
}
#
@@ -413,17 +405,6 @@ function Package-Zip
"$tmp\WebApp\*" `
"-x!dotless.Core.*" "-x!Content_Types.xml" "-x!*.pdb"`
> $null
Write-Host "Zip WebPI"
&$uenv.Zip a -r "$out\UmbracoCms.WebPI.$($version.Semver).zip" "-x!*.pdb"`
"$tmp\WebPi\*" `
"-x!dotless.Core.*" `
> $null
# hash the webpi file
Write-Host "Hash WebPI"
$hash = Get-FileHash "$out\UmbracoCms.WebPI.$($version.Semver).zip"
Write $hash | out-file "$out\webpihash.txt" -encoding ascii
}
#

View File

@@ -0,0 +1,59 @@
Param(
[string]$GitHubPersonalAccessToken,
[string]$Directory
)
$workingDirectory = $Directory
CD $workingDirectory
# Clone repo
$fullGitUrl = "https://$env:GIT_URL/$env:GIT_REPOSITORYNAME.git"
git clone $fullGitUrl 2>&1 | % { $_.ToString() }
# Remove everything so that unzipping the release later will update everything
# Don't remove the readme file nor the git directory
Write-Host "Cleaning up git directory before adding new version"
Remove-Item -Recurse $workingDirectory\$env:GIT_REPOSITORYNAME\* -Exclude README.md,.git
# Find release zip
$zipsDir = "$workingDirectory\$env:BUILD_DEFINITIONNAME\zips"
$pattern = "UmbracoCms.([0-9]{1,2}.[0-9]{1,3}.[0-9]{1,3}).zip"
Write-Host "Searching for Umbraco release files in $workingDirectory\$zipsDir for a file with pattern $pattern"
$file = (Get-ChildItem $zipsDir | Where-Object { $_.Name -match "$pattern" })
if($file)
{
# Get release name
$version = [regex]::Match($file.Name, $pattern).captures.groups[1].value
$releaseName = "Umbraco $version"
Write-Host "Found $releaseName"
# Unzip into repository to update release
Add-Type -AssemblyName System.IO.Compression.FileSystem
Write-Host "Unzipping $($file.FullName) to $workingDirectory\$env:GIT_REPOSITORYNAME"
[System.IO.Compression.ZipFile]::ExtractToDirectory("$($file.FullName)", "$workingDirectory\$env:GIT_REPOSITORYNAME")
# Telling git who we are
git config --global user.email "coffee@umbraco.com" 2>&1 | % { $_.ToString() }
git config --global user.name "Umbraco HQ" 2>&1 | % { $_.ToString() }
# Commit
CD $env:GIT_REPOSITORYNAME
Write-Host "Committing Umbraco $version Release from Build Output"
git add . 2>&1 | % { $_.ToString() }
git commit -m " Release $releaseName from Build Output" 2>&1 | % { $_.ToString() }
# Tag the release
git tag -a "v$version" -m "v$version"
# Push release to master
$fullGitAuthUrl = "https://$($env:GIT_USERNAME):$GitHubPersonalAccessToken@$env:GIT_URL/$env:GIT_REPOSITORYNAME.git"
git push $fullGitAuthUrl 2>&1 | % { $_.ToString() }
#Push tag to master
git push $fullGitAuthUrl --tags 2>&1 | % { $_.ToString() }
}
else
{
Write-Error "Umbraco release file not found, searched in $workingDirectory\$zipsDir for a file with pattern $pattern - cancelling"
}

View File

@@ -1,76 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<WebPlatform>
<Links>
<AddLink InDashboard="True">
<Title>Start Here</Title>
<Description>First time here? Complete the installation of your Umbraco Site, select a Starter Kit and Skin to get you started.</Description>
<Uri>/install/default.aspx</Uri>
<ImageUri>http://cdn.umbraco.org/cdn/umbraco/images/webmatrix/umbraco.png</ImageUri>
</AddLink>
<AddLink InDashboard="True" InLearn="True">
<Title>Getting Started with Umbraco</Title>
<Description>So you've finished installing Umbraco in WebMatrix, what next? Learn how to build and configure your new site!</Description>
<Uri>http://our.umbraco.org/wiki/how-tos/getting-started-with-umbraco-what-is-next-after-you-install</Uri>
<ImageUri>http://cdn.umbraco.org/cdn/umbraco/images/webmatrix/umbraco.png</ImageUri>
</AddLink>
<AddLink InDashboard="True" InLearn="True">
<Title>Extending Umbraco using WebMatrix</Title>
<Description>In this 5-minute video tutorial you'll learn how to edit templates, use the Razor syntax to add dynamic functionality and deploy an Umbraco site - all from within WebMatrix.</Description>
<Uri>http://umbraco.com/help-and-support/video-tutorials/getting-started/working-with-webmatrix</Uri>
<ImageUri>http://cdn.umbraco.org/cdn/umbraco/images/webmatrix/umbraco.png</ImageUri>
</AddLink>
<AddLink InDashboard="True" InLearn="True">
<Title>Umbraco Forum - Where the friendliest CMS community on the planet helps each other</Title>
<Description>Search for documentation, get help and guidance from seasoned experts, download and collaborate on plugins and extensions.</Description>
<Uri>http://our.umbraco.org/</Uri>
<ImageUri>http://cdn.umbraco.org/cdn/umbraco/images/webmatrix/community.png</ImageUri>
</AddLink>
<AddLink InDashboard="True">
<Title>Umbraco Products</Title>
<Description>We have additional products and services available to help you get the most out of Umbraco.</Description>
<Uri>http://umbraco.com/products</Uri>
<Uri xml:lang="es">http://umbraco.com/products</Uri>
<ImageUri>http://cdn.umbraco.org/cdn/umbraco/images/webmatrix/products.png</ImageUri>
</AddLink>
<AddLink InDashboard="True">
<Title>Umbraco Community Projects - "The Deli"</Title>
<Description>Find free and commercial add-ons, extensions, skins, and starter sites.</Description>
<Uri>http://our.umbraco.org/projects</Uri>
<ImageUri>http://cdn.umbraco.org/cdn/umbraco/images/webmatrix/deli.png</ImageUri>
</AddLink>
</Links>
<Ribbon>
<AddRibbonButton>
<Label>Site Admin</Label>
<Uri>/umbraco/</Uri>
<ImageUri>http://cdn.umbraco.org/cdn/umbraco/images/webmatrix/umbraco.png</ImageUri>
</AddRibbonButton>
<AddRibbonButton>
<Label>Community</Label>
<Uri>http://our.umbraco.org/</Uri>
<ImageUri>http://cdn.umbraco.org/cdn/umbraco/images/webmatrix/community.png</ImageUri>
</AddRibbonButton>
</Ribbon>
<PathProtection>
<AllowPath>
<RelativePath>install</RelativePath>
</AllowPath>
<AllowPath AllowNested="False">
<RelativePath>web.config</RelativePath>
</AllowPath>
<ProtectPath>
<RelativePath>bin</RelativePath>
</ProtectPath>
<ProtectPath>
<RelativePath>umbraco</RelativePath>
</ProtectPath>
<ProtectPath>
<RelativePath>umbraco_client</RelativePath>
</ProtectPath>
</PathProtection>
</WebPlatform>

View File

@@ -1,9 +0,0 @@
/**********************************************************************/
/* Install.SQL */
/* Creates a login and makes the user a member of db roles */
/* */
/* Modifications for SQL AZURE - ON MASTER */
/**********************************************************************/
CREATE LOGIN PlaceHolderForUser WITH PASSWORD = 'PlaceHolderForPassword'

View File

@@ -1,15 +0,0 @@
/**********************************************************************/
/* CreateUser.SQL */
/* Creates a user and makes the user a member of db roles */
/* This script runs against the User database and requires connection string */
/* Supports SQL Server and SQL AZURE */
/**********************************************************************/
-- Create database user and map to login
-- and add user to the datareader, datawriter, ddladmin and securityadmin roles
--
CREATE USER PlaceHolderForUser FOR LOGIN PlaceHolderForUser;
GO
EXEC sp_addrolemember 'db_owner', PlaceHolderForUser;
GO

View File

@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<msdeploy.iisApp>
<iisApp path="umbraco" />
<!-- managedRuntimeVersion="v4.0" /> -->
<setAcl path="umbraco"
setAclAccess="Read, Write, Modify" />
<setAcl path="umbraco/app_code"
setAclAccess="ReadandExecute" />
<setAcl path="umbraco/app_browsers"
setAclAccess="ReadandExecute" />
<setAcl path="umbraco/app_data"
setAclAccess="Read, Write, Modify" />
<setAcl path="umbraco/bin"
setAclAccess="Read" />
<setAcl path="umbraco/config"
setAclAccess="Read, Write, Modify" />
<setAcl path="umbraco/css"
setAclAccess="Read, Write, Modify" />
<setAcl path="umbraco/macroScripts"
setAclAccess="Read, Write, Modify" />
<setAcl path="umbraco/masterpages"
setAclAccess="Read, Write, Modify" />
<setAcl path="umbraco/media"
setAclAccess="Read, Write, Modify" />
<setAcl path="umbraco/scripts"
setAclAccess="Read, Write, Modify" />
<setAcl path="umbraco/umbraco"
setAclAccess="Read" />
<setAcl path="umbraco/usercontrols"
setAclAccess="Read" />
<setAcl path="umbraco/views"
setAclAccess="Read, Write, Modify" />
<setAcl path="umbraco/xslt"
setAclAccess="Read, Write, Modify" />
<setAcl path="umbraco/web.config"
setAclResourceType="File"
setAclAccess="Read, Write, Modify" />
<!-- Runs SQL script to create login and assign permissions, requires transacted="false"
This script runs as the database administrator provided in parameters.xml
-->
<dbfullsql path="installSQL1.sql" transacted="false" />
<dbfullsql path="installSQL2.sql" transacted="false" />
</msdeploy.iisApp>

View File

@@ -1,161 +0,0 @@
<parameters>
<!-- Prompts where to copy the content files and takes a web site path (such as "contoso.com/app"). -->
<parameter name="Application Path" description="It is recommended that Umbraco be installed as a web site root. Leave this parameter empty." tags="iisapp">
<parameterValidation type="AllowEmpty" />
<parameterEntry type="ProviderPath" scope="iisapp" match="^umbraco$" />
</parameter>
<!-- This is the parameter that is used to set ACLs on the root site folder -->
<parameter name="SetAclParameter1" description="Sets the ACL on the root site folder" defaultValue="{Application Path}" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco$" />
</parameter>
<!-- This is the parameter that is used to set ACLs on the app_code folder -->
<parameter name="SetAclParameter2" description="Sets the ACL on the app_code folder" defaultValue="{Application Path}/app_code" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/app_code$" />
</parameter>
<!-- This is the parameter that is used to set ACLs on the app_browsers folder -->
<parameter name="SetAclParameter15" description="Sets the ACL on the app_code folder" defaultValue="{Application Path}/app_browsers" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/app_browsers$" />
</parameter>
<!-- This is the parameter that is used to set ACLs on the app_data folder -->
<parameter name="SetAclParameter16" description="Sets the ACL on the app_code folder" defaultValue="{Application Path}/app_data" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/app_data$" />
</parameter>
<!-- This is the parameter that is used to set ACLs, on the bin folder -->
<parameter name="SetAclParameter3" description="Sets the ACL on the bin folder" defaultValue="{Application Path}/bin" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/bin$" />
</parameter>
<!-- This is the parameter that is used to set ACLs on the config folder -->
<parameter name="SetAclParameter4" description="Sets the ACL on the config folder" defaultValue="{Application Path}/config" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/config$" />
</parameter>
<!-- This is the parameter that is used to set ACLs on the css folder -->
<parameter name="SetAclParameter5" description="Sets the ACL on the css folder" defaultValue="{Application Path}/css" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="umbraco/css$" />
</parameter>
<!-- This is the parameter that is used to set ACLs on the masterpages folder -->
<parameter name="SetAclParameter7" description="Sets the ACL on the masterpages folder" defaultValue="{Application Path}/masterpages" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/masterpages$" />
</parameter>
<!-- This is the parameter that is used to set ACLs on the media folder -->
<parameter name="SetAclParameter8" description="Sets the ACL on the media folder" defaultValue="{Application Path}/media" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/media$" />
</parameter>
<!-- This is the parameter that is used to set ACLs on the macroScripts folder -->
<parameter name="SetAclParameter9" description="Sets the ACL on the python folder" defaultValue="{Application Path}/macroScripts" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/macroScripts$" />
</parameter>
<!-- This is the parameter that is used to set ACLs on the scripts folder -->
<parameter name="SetAclParameter10" description="Sets the ACL on the scripts folder" defaultValue="{Application Path}/scripts" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/scripts$" />
</parameter>
<!-- This is the parameter that is used to set ACLs on the umbraco folder -->
<parameter name="SetAclParameter11" description="Sets the ACL on the umbraco folder" defaultValue="{Application Path}/umbraco" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/umbraco$" />
</parameter>
<!-- This is the parameter that is used to set ACLs, it's set to the application path filled in by the user -->
<parameter name="SetAclParameter12" description="Sets the ACL on the usercontrols folder" defaultValue="{Application Path}/usercontrols" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/usercontrols$" />
</parameter>
<!-- This is the parameter that is used to set ACLs, it's set to the application path filled in by the user -->
<parameter name="SetAclParameter13" description="Sets the ACL on the xslt folder" defaultValue="{Application Path}/xslt" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/xslt$" />
</parameter>
<!-- This is the parameter that is used to set ACLs, it's set to the application path filled in by the user -->
<parameter name="SetAclParameter14" description="Sets the ACL on the web.config file" defaultValue="{Application Path}/web.config" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/web.config$" />
</parameter>
<!-- This is the parameter that is used to set ACLs, it's set to the application path filled in by the user -->
<parameter name="SetAclParameter17" description="Sets the ACL on the views folder" defaultValue="{Application Path}/views" tags="Hidden">
<parameterEntry type="ProviderPath" scope="setAcl" match="^umbraco/views$" />
</parameter>
<!-- Prompts for database server name, this is used in the connection string parameter later -->
<parameter name="Database Server" description="Location of your database server." defaultValue=".\sqlexpress" tags="DBServer, SQL">
</parameter>
<!-- Prompts for the database name and fills it into the database scripts -->
<parameter name="Database Name" description="Name of the database for your application." defaultValue="umbraco" tags="DBName, SQL">
<parameterEntry type="TextFile" scope="installSQL1.sql" match="PlaceHolderForDb" />
<parameterEntry type="TextFile" scope="installSQL2.sql" match="PlaceHolderForDb" />
</parameter>
<!-- Prompts for the database username and fills it into the database scripts.
The SQL tag indicates it is a parameter required for SQL, the DbUsername tag indicates this is a Db username -->
<parameter name="Database Username" description="User name to access you application database." defaultValue="umbracouser" tags="SQL, DbUsername">
<parameterEntry type="TextFile" scope="installSQL1.sql" match="PlaceHolderForUser" />
<parameterEntry type="TextFile" scope="installSQL2.sql" match="PlaceHolderForUser" />
</parameter>
<!-- Prompts for the database password and fills it into the database scripts.
The SQL tag indicates it is a parameter required for SQL, the DbUserPassword tag indicates this is a Db password -->
<parameter name="Database Password" description="Enter Password for the Database Username. Passwords will contain at least 1 upper case letter, at least 1 lower case letter, at least 1 number or special character, and be least 8 characters in length. "
tags="New, Password, SQL, DbUserPassword">
<parameterValidation type = "RegularExpression" validationString = "(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$" />
<parameterEntry type="TextFile" scope="installSQL1.sql" match="PlaceHolderForPassword" />
<parameterEntry type="TextFile" scope="installSQL2.sql" match="PlaceHolderForPassword" />
</parameter>
<!-- Prompts for the admin creds and uses it for the administrator connection string.
This is used to create a login and assign permissions. The SQL tag indicates it is a parameter required for SQL.
The DbAdminUsername tag indicates it should be used when the user is creating a new database.
If they're not, it can be filled in with the DbUsername value. -->
<parameter name="Database Administrator" description="Administrator username for your database." defaultValue="sa" tags="SQL, DbAdminUsername">
</parameter>
<!-- Prompts for the admin password and uses it for the administrator connection string.
This is used to create a login and assign permissions. The SQL tags indicates it is a parameter required for SQL.
The DbAdminPassword tag indicates it should be used when the user is creating a new database.
If they're not, it can be filled in with the DbUserPassword value. -->
<parameter name="Database Administrator Password" description="Password that is associated with the database administrator account." tags="Password, SQL, DbAdminPassword,NoStore">
</parameter>
<!-- This is the hidden admin connection string used to run the database scripts -->
<parameter name="Connection String Master" description="Automatically sets the connection string for the connection request." defaultValue="Server={Database Server};Database=master;uid={Database Administrator};Pwd={Database Administrator Password};" tags="Hidden,SQL,SQLConnectionString,NoStore">
<parameterEntry type="ProviderPath" scope="dbfullsql" match="installSQL1.sql" />
</parameter>
<!-- This is the hidden connection string with the newly created db account that is used in the web.config -->
<parameter name="Connection String" description="Connection string to enter into config" defaultValue="server={Database Server};database={Database Name};uid={Database Administrator};Pwd={Database Administrator Password};" tags="Hidden,SQL,SQLConnectionString,NoStore">
<parameterEntry type="ProviderPath" scope="dbfullsql" match="installSQL2.sql" />
</parameter>
<parameter name="SQLCE Database Preparation" defaultValue="local"
tags="SQLCE, Hidden,NoStore">
<parameterEntry type="XmlFile" scope="\\web.config$" match="//connectionStrings/add/@name" />
</parameter>
<!-- This is the hidden connection string with the newly created db account that is used in the web.config -->
<parameter name="Connection String for Config" description="Connection string to enter into config"
defaultValue="server={Database Server};database={Database Name};user id={Database Username};password={Database Password}"
tags="SQL, Hidden,NoStore">
<!-- scope=”web.config” will look for all web.config files under the root directory . Using scope=”\\web.config$” will select only the root web.config -->
<parameterEntry type="XmlFile" scope="\\web.config$" match="//connectionStrings/add[@name='umbracoDbDSN']/@connectionString" />
</parameter>
<!-- This is the hidden connection string with the newly created db account that is used in the web.config -->
<parameter name="Connection String for Config1" description="Connection string to enter into config"
defaultValue="server={Database Server};database={Database Name};user id={Database Username};password={Database Password}"
tags="SQL, Hidden,SQLConnectionString">
<!-- scope=”web.config” will look for all web.config files under the root directory . Using scope=”\\web.config$” will select only the root web.config -->
<parameterEntry type="XmlFile" scope="\\web.config$" match="//connectionStrings/add[@name='umbracoDbDSN']/@connectionString" />
</parameter>
</parameters>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB