Skip to content

Commit d477e60

Browse files
committed
Add project CI config and others.
1 parent 98cd586 commit d477e60

14 files changed

+594
-11
lines changed

.travis.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: csharp
2+
sudo: required
3+
dist: trusty
4+
mono: none
5+
dotnet: 1.0.0
6+
7+
install:
8+
- export DOTNET_CLI_TELEMETRY_OPTOUT=1
9+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm get stable; brew update; brew install openssl; fi
10+
os:
11+
- linux
12+
- osx
13+
osx_image: xcode7.3
14+
before_script:
15+
- chmod a+x ./build.sh
16+
script:
17+
- ./build.sh
18+
notifications:
19+
email: false

CAP.sln

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{C09CDAB0-6
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{57A8A8E5-5715-41BF-A0A6-46B819933FBC}"
1111
ProjectSection(SolutionItems) = preProject
12+
.gitattributes = .gitattributes
1213
.gitignore = .gitignore
14+
.travis.yml = .travis.yml
15+
appveyor.yml = appveyor.yml
1316
CAP.vssettings = CAP.vssettings
14-
LICENSE = LICENSE
17+
CHANGELOG.md = CHANGELOG.md
18+
CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
19+
ConfigureMSDTC.ps1 = ConfigureMSDTC.ps1
20+
LICENSE.txt = LICENSE.txt
1521
README.md = README.md
1622
EndProjectSection
1723
EndProject

CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/).
6+
7+
## [Unreleased]
8+
_Nothing yet..._
9+
10+
## [0.7.0] - 2017-06-08
11+
### Changed
12+
- SqlServer: Set migration history's table name and schema.
13+
14+
### Fixed
15+
- Services not being disposed correctly after a job execution. [#4](https://github.com/mrahhal/MR.AspNetCore.Jobs/issues/4)
16+
17+
## [0.6.0] - 2017-04-22
18+
### Changed
19+
- SqlServer: Move to using EFCore to manage internal migrations and connections to the database.
20+
21+
[Unreleased]: https://github.com/mrahhal/MR.AspNetCore.Jobs/compare/0.7.0...HEAD
22+
[0.7.0]: https://github.com/mrahhal/MR.AspNetCore.Jobs/compare/0.6.0...0.7.0
23+
[0.6.0]: https://github.com/mrahhal/MR.AspNetCore.Jobs/compare/0.5.0...0.6.0

CODE_OF_CONDUCT.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

ConfigureMSDTC.ps1

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# ————————————
2+
# Enable MSDTC
3+
# ————————————
4+
5+
Write-Host "Enabling MSDTC..." -ForegroundColor Yellow
6+
$DTCSecurity = "Incoming"
7+
$RegPath = "HKLM:\SOFTWARE\Microsoft\MSDTC\"
8+
9+
#Set Security and MSDTC path
10+
11+
$RegSecurityPath = "$RegPath\Security"
12+
13+
Set-ItemProperty –path $RegSecurityPath –name "NetworkDtcAccess" –value 1
14+
Set-ItemProperty –path $RegSecurityPath –name "NetworkDtcAccessClients" –value 1
15+
Set-ItemProperty –path $RegSecurityPath –name "NetworkDtcAccessTransactions" –value 1
16+
Set-ItemProperty –path $RegSecurityPath –name "NetworkDtcAccessInbound" –value 1
17+
Set-ItemProperty –path $RegSecurityPath –name "NetworkDtcAccessOutbound" –value 1
18+
Set-ItemProperty –path $RegSecurityPath –name "LuTransactions" –value 1
19+
20+
if ($DTCSecurity –eq "None")
21+
{
22+
Set-ItemProperty –path $RegPath –name "TurnOffRpcSecurity" –value 1
23+
Set-ItemProperty –path $RegPath –name "AllowOnlySecureRpcCalls" –value 0
24+
Set-ItemProperty –path $RegPath –name "FallbackToUnsecureRPCIfNecessary" –value 0
25+
}
26+
elseif ($DTCSecurity –eq "Incoming")
27+
{
28+
Set-ItemProperty –path $RegPath –name "TurnOffRpcSecurity" –value 0
29+
Set-ItemProperty –path $RegPath –name "AllowOnlySecureRpcCalls" –value 0
30+
Set-ItemProperty –path $RegPath –name "FallbackToUnsecureRPCIfNecessary" –value 1
31+
}
32+
else
33+
{
34+
Set-ItemProperty –path $RegPath –name "TurnOffRpcSecurity" –value 0
35+
Set-ItemProperty –path $RegPath –name "AllowOnlySecureRpcCalls" –value 1
36+
Set-ItemProperty –path $RegPath –name "FallbackToUnsecureRPCIfNecessary" –value 0
37+
}
38+
39+
Restart-Service MSDTC
40+
Write-Host "——MSDTC has been configured—–" –foregroundcolor green

LICENSE renamed to LICENSE.txt

File renamed without changes.

appveyor.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ os: Visual Studio 2015
33
environment:
44
BUILDING_ON_PLATFORM: win
55
BuildEnvironment: appveyor
6-
# Jobs_SqlServer_ConnectionStringTemplate: Server=.\SQL2012SP1;Database={0};User ID=sa;Password=Password12!
6+
Cap_SqlServer_ConnectionStringTemplate: Server=.\SQL2012SP1;Database={0};User ID=sa;Password=Password12!
77
services:
88
- mssql2012sp1
99
build_script:
10-
#- ps: ./ConfigureMSDTC.ps1
10+
- ps: ./ConfigureMSDTC.ps1
1111
- ps: ./build.ps1
1212
test: off
1313
artifacts:
1414
- path: artifacts/packages/*.nupkg
15-
#deploy:
16-
# provider: NuGet
17-
# on:
18-
# appveyor_repo_tag: true
19-
# api_key:
20-
# secure: PWCeOQ12fgAhPiBjgkBAqHbvaPQArarsO2sI+8KCeXjBjE+AHaMIMW8b7efmDzQ6
21-
# skip_symbols: true
22-
# artifact: /artifacts\/packages\/.+\.nupkg/
15+
deploy:
16+
provider: NuGet
17+
on:
18+
appveyor_repo_tag: true
19+
api_key:
20+
secure: P4da9c6a6-00e1-47d0-a821-b62380362dc9
21+
skip_symbols: true
22+
artifact: /artifacts\/packages\/.+\.nupkg/

build.cake

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
#addin "nuget:https://www.nuget.org/api/v2?package=Newtonsoft.Json&version=9.0.1"
2+
3+
#load "./build/index.cake"
4+
5+
var target = Argument("target", "Default");
6+
7+
var build = BuildParameters.Create(Context);
8+
var util = new Util(Context, build);
9+
10+
Task("Clean")
11+
.Does(() =>
12+
{
13+
if (DirectoryExists("./artifacts"))
14+
{
15+
DeleteDirectory("./artifacts", true);
16+
}
17+
});
18+
19+
Task("Restore")
20+
.IsDependentOn("Clean")
21+
.Does(() =>
22+
{
23+
var settings = new DotNetCoreRestoreSettings
24+
{
25+
ArgumentCustomization = args =>
26+
{
27+
args.Append($"/p:VersionSuffix={build.Version.Suffix}");
28+
return args;
29+
}
30+
};
31+
DotNetCoreRestore(settings);
32+
});
33+
34+
Task("Build")
35+
.IsDependentOn("Restore")
36+
.Does(() =>
37+
{
38+
var settings = new DotNetCoreBuildSettings
39+
{
40+
Configuration = build.Configuration,
41+
VersionSuffix = build.Version.Suffix,
42+
ArgumentCustomization = args =>
43+
{
44+
args.Append($"/p:InformationalVersion={build.Version.VersionWithSuffix()}");
45+
return args;
46+
}
47+
};
48+
foreach (var project in build.ProjectFiles)
49+
{
50+
DotNetCoreBuild(project.FullPath, settings);
51+
}
52+
});
53+
54+
Task("Test")
55+
.IsDependentOn("Build")
56+
.Does(() =>
57+
{
58+
foreach (var testProject in build.TestProjectFiles)
59+
{
60+
DotNetCoreTest(testProject.FullPath);
61+
}
62+
});
63+
64+
Task("Pack")
65+
.Does(() =>
66+
{
67+
var settings = new DotNetCorePackSettings
68+
{
69+
Configuration = build.Configuration,
70+
VersionSuffix = build.Version.Suffix,
71+
OutputDirectory = "./artifacts/packages"
72+
};
73+
foreach (var project in build.ProjectFiles)
74+
{
75+
DotNetCorePack(project.FullPath, settings);
76+
}
77+
});
78+
79+
Task("Default")
80+
.IsDependentOn("Build")
81+
.IsDependentOn("Test")
82+
.IsDependentOn("Pack")
83+
.Does(() =>
84+
{
85+
util.PrintInfo();
86+
});
87+
88+
Task("Version")
89+
.Does(() =>
90+
{
91+
Information($"{build.FullVersion()}");
92+
});
93+
94+
Task("Print")
95+
.Does(() =>
96+
{
97+
util.PrintInfo();
98+
});
99+
100+
RunTarget(target);

0 commit comments

Comments
 (0)