Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
slewis74 committed Oct 5, 2016
0 parents commit c59598a
Show file tree
Hide file tree
Showing 103 changed files with 2,962 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Confused? https://help.github.com/articles/dealing-with-line-endings/
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

*.bmp binary
*.gif binary
*.jpg binary
*.png binary

*.ascx text
*.cmd text
*.coffee text
*.config text
*.cs text diff=csharp
*.css text
*.less text
*.cshtml text
*.htm text
*.html text
*.htm text
*.js text
*.json text
*.msbuild text
*.resx text
*.ruleset text
*.Stylecop text
*.targets text
*.tt text
*.txt text
*.vb text
*.vbhtml text
*.xml text
*.xunit text

*.csproj text merge=union
*.vbproj text merge=union

*.sln text eol=crlf merge=union

*.approved.* binary
67 changes: 67 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
*.*scc
*.FileListAbsolute.txt
*.aps
*.bak
*.[Cc]ache
*.clw
*.eto
*.fb6lck
*.fbl6
*.fbpInf
*.ilk
*.lib
*.log
*.ncb
*.nlb
*.obj
*.patch
*.pch
*.pdb
*.plg
*.[Pp]ublish.xml
*.rdl.data
*.sbr
*.scc
*.sig
*.sqlsuo
*.suo
*.svclog
*.tlb
*.tlh
*.tli
*.tmp
*.user
*.vshost.*
*DXCore.Solution
*_i.c
*_p.c
Ankh.Load
Backup*/
CVS/
PrecompiledWeb/
UpgradeLog*.*
[Bb]in/
[Dd]ebug/
[Oo]bj/
[Rr]elease/
[Tt]humbs.db
_UpgradeReport_Files
_[Rr]e[Ss]harper.*/
hgignore[.-]*
ignore[.-]*
svnignore[.-]*
lint.db
build
tools/TestResult.xml
*.ReSharper
source/packages
source/OctopusTools.v2.ncrunchsolution
*.orig
*.userprefs
*.lock.json
.vs
.vscode
/tools/
/artifacts/
/publish/
TestResult.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" xmlns:octopus="http://octopus.org">
<metadata>
<id>Octopus.Server.Extensibility.Authentication.OpenIDConnect</id>
<title>Octopus Server Extensibility Authentication - OpenIDConnect</title>
<version>$version$</version>
<authors>Octopus Deploy</authors>
<owners>Octopus Deploy</owners>
<summary>Octopus Deploy OpenIDConnect authentication providers.</summary>
<description>
Implements the OpenIDConnect authentication providers.
</description>
<releaseNotes></releaseNotes>
<language>en-US</language>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://octopus.com/</licenseUrl>
<projectUrl>https://octopus.com/</projectUrl>
<iconUrl>http://i.octopusdeploy.com/resources/Avatar3_360.png</iconUrl>
<tags>automation deployment</tags>
<developmentDependency>true</developmentDependency>
</metadata>
<files>
<file src="*" target="tools" />
</files>
</package>
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Do not create new issues here directly

If you've found a bug or something isn't working, please quickly check these issues and
our [main issue repository](https://github.com/OctopusDeploy/Issues). If you think you have found a new issues, or need some help,
please [contact support](http://octopusdeploy.com/support). We don't read new GitHub issues regularly, so if you post here it will likely not get a reply. But if you contact support we can probably help to find a workaround or make sure the issue gets prioritized properly.



If you have an idea or a feature request, please post it to [our UserVoice site](http://octopusdeploy.uservoice.com) so others can vote for it.
11 changes: 11 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '{build}'
configuration: Release
platform: Any CPU
build_script:
- cmd: build.cmd
artifacts:
- path: artifacts\**\*.*
cache:
- '%USERPROFILE%\.nuget\packages'
test: off
deploy: off
157 changes: 157 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
//////////////////////////////////////////////////////////////////////
// TOOLS
//////////////////////////////////////////////////////////////////////
#tool "nuget:?package=GitVersion.CommandLine&prerelease"

using Path = System.IO.Path;
using IO = System.IO;
using Cake.Common.Tools;

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");

///////////////////////////////////////////////////////////////////////////////
// GLOBAL VARIABLES
///////////////////////////////////////////////////////////////////////////////
var publishDir = "./publish";
var artifactsDir = "./artifacts";
var assetDir = "./BuildAssets";
var globalAssemblyFile = "./source/Solution Items/VersionInfo.cs";
var extensionName = "Octopus.Server.Extensibility.Authentication.OpenIDConnect";
var solutionToBuild = "./source/" + extensionName + ".sln";

var isContinuousIntegrationBuild = !BuildSystem.IsLocalBuild;

GitVersion gitVersionInfo = null;

var nugetVersion = "0.0.0";

if (isContinuousIntegrationBuild)
{
gitVersionInfo = GitVersion(new GitVersionSettings {
OutputType = GitVersionOutput.Json
});
nugetVersion = gitVersionInfo.NuGetVersion;
}

///////////////////////////////////////////////////////////////////////////////
// SETUP / TEARDOWN
///////////////////////////////////////////////////////////////////////////////
Setup(context =>
{
Information("Building " + extensionName + " v{0}", nugetVersion);
});

Teardown(context =>
{
Information("Finished running tasks.");
});

//////////////////////////////////////////////////////////////////////
// PRIVATE TASKS
//////////////////////////////////////////////////////////////////////

Task("__Default")
.IsDependentOn("__Clean")
.IsDependentOn("__Restore")
.IsDependentOn("__UpdateAssemblyVersionInformation")
.IsDependentOn("__Build")
.IsDependentOn("__Pack")
.IsDependentOn("__Publish");

Task("__Clean")
.Does(() =>
{
CleanDirectory(artifactsDir);
CleanDirectory(publishDir);
CleanDirectories("./source/**/bin");
CleanDirectories("./source/**/obj");
});

Task("__Restore")
.Does(() => NuGetRestore(solutionToBuild));

Task("__UpdateAssemblyVersionInformation")
.WithCriteria(isContinuousIntegrationBuild)
.Does(() =>
{
GitVersion(new GitVersionSettings {
UpdateAssemblyInfo = true,
UpdateAssemblyInfoFilePath = globalAssemblyFile
});

Information("AssemblyVersion -> {0}", gitVersionInfo.AssemblySemVer);
Information("AssemblyFileVersion -> {0}", $"{gitVersionInfo.MajorMinorPatch}.0");
Information("AssemblyInformationalVersion -> {0}", gitVersionInfo.InformationalVersion);
});

Task("__Build")
.IsDependentOn("__UpdateAssemblyVersionInformation")
.Does(() =>
{
DotNetBuild(solutionToBuild, settings => settings.SetConfiguration(configuration));
});


Task("__Pack")
.Does(() => {
var nugetPackDir = Path.Combine(publishDir, "nuget");
var nuspecFile = extensionName + ".nuspec";

CreateDirectory(nugetPackDir);
CopyFileToDirectory(Path.Combine(assetDir, nuspecFile), nugetPackDir);

var solutionDir = "./source/";

Information(solutionDir + extensionName + "/bin/System.IdentityModel.Tokens.Jwt.dll");
CopyFileToDirectory(solutionDir + extensionName + "/bin/System.IdentityModel.Tokens.Jwt.dll", nugetPackDir);
CopyFileToDirectory(solutionDir + extensionName + "/bin/" + extensionName + ".dll", nugetPackDir);

CopyFileToDirectory(solutionDir + "Octopus.Server.Extensibility.Authentication.AzureAD/bin/Octopus.Server.Extensibility.Authentication.AzureAD.dll", nugetPackDir);
CopyFileToDirectory(solutionDir + "Octopus.Server.Extensibility.Authentication.GoogleApps/bin/Octopus.Server.Extensibility.Authentication.GoogleApps.dll", nugetPackDir);

NuGetPack(Path.Combine(nugetPackDir, nuspecFile), new NuGetPackSettings {
Version = nugetVersion,
OutputDirectory = artifactsDir
});
});

Task("__Publish")
.WithCriteria(isContinuousIntegrationBuild)
.Does(() =>
{
var isPullRequest = !String.IsNullOrEmpty(EnvironmentVariable("APPVEYOR_PULL_REQUEST_NUMBER"));
var isMasterBranch = EnvironmentVariable("APPVEYOR_REPO_BRANCH") == "master" && !isPullRequest;
var shouldPushToMyGet = !BuildSystem.IsLocalBuild && !String.IsNullOrEmpty(EnvironmentVariable("MyGetApiKey"));
var shouldPushToNuGet = !BuildSystem.IsLocalBuild && isMasterBranch && !String.IsNullOrEmpty(EnvironmentVariable("NuGetApiKey"));

if (shouldPushToMyGet)
{
NuGetPush("artifacts/" + extensionName + "." + nugetVersion + ".nupkg", new NuGetPushSettings {
Source = "https://octopus.myget.org/F/octopus-dependencies/api/v3/index.json",
ApiKey = EnvironmentVariable("MyGetApiKey")
});
}
if (shouldPushToNuGet)
{
NuGetPush("artifacts/" + extensionName + "." + nugetVersion + ".nupkg", new NuGetPushSettings {
Source = "https://www.nuget.org/api/v2/package",
ApiKey = EnvironmentVariable("NuGetApiKey")
});
}
});


//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////
Task("Default")
.IsDependentOn("__Default");

//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
RunTarget(target);
24 changes: 24 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@ECHO OFF
REM see http://joshua.poehls.me/powershell-batch-file-wrapper/

SET SCRIPTNAME=%~d0%~p0%~n0.ps1
SET ARGS=%*
IF [%ARGS%] NEQ [] GOTO ESCAPE_ARGS

:POWERSHELL
PowerShell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Unrestricted -Command "& { $ErrorActionPreference = 'Stop'; & '%SCRIPTNAME%' @args; EXIT $LASTEXITCODE }" %ARGS%
EXIT /B %ERRORLEVEL%

:ESCAPE_ARGS
SET ARGS=%ARGS:"=\"%
SET ARGS=%ARGS:`=``%
SET ARGS=%ARGS:'=`'%
SET ARGS=%ARGS:$=`$%
SET ARGS=%ARGS:{=`}%
SET ARGS=%ARGS:}=`}%
SET ARGS=%ARGS:(=`(%
SET ARGS=%ARGS:)=`)%
SET ARGS=%ARGS:,=`,%
SET ARGS=%ARGS:^%=%

GOTO POWERSHELL
Loading

0 comments on commit c59598a

Please sign in to comment.