Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI and Update HttpResponseMessage API (#60)
- Loading branch information
1 parent
0770a58
commit 707c594
Showing
8 changed files
with
87 additions
and
8 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
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
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
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,62 @@ | ||
# A function that checks exit codes and fails script if an error is found | ||
function StopOnFailedExecution { | ||
if ($LastExitCode) | ||
{ | ||
exit $LastExitCode | ||
} | ||
} | ||
|
||
# Clone and install function maven archetype | ||
git clone https://github.com/Microsoft/azure-maven-archetypes.git -b develop | ||
Push-Location -Path "./azure-maven-archetypes/azure-functions-archetype" -StackName libraryDir | ||
Write-Host "Build and install azure-maven-archetypes" | ||
cmd.exe /c '.\..\..\mvnBuildSkipTests.bat' | ||
StopOnFailedExecution | ||
Pop-Location -StackName "libraryDir" | ||
$archetypePom = Get-Content ".\azure-maven-archetypes\azure-functions-archetype\pom.xml" -Raw | ||
$archetypePom -match "<version>(.*)</version>" | ||
$atchetypeVersion = $matches[1] | ||
Write-Host "atchetypeVersion: " $atchetypeVersion | ||
|
||
# Clone and install function maven plugin | ||
git clone https://github.com/Microsoft/azure-maven-plugins.git -b develop | ||
Push-Location -Path "./azure-maven-plugins" -StackName libraryDir | ||
Write-Host "Build and install azure-functions-maven-plugins" | ||
cmd.exe /c '.\..\mvnBuildSkipTests.bat' | ||
StopOnFailedExecution | ||
Pop-Location -StackName "libraryDir" | ||
#$pluginPom = Get-Content ".\azure-maven-plugins\azure-functions-maven-plugin\pom.xml" -Raw | ||
#$pluginPom -match "<version>(.*)</version>" | ||
$pluginVersion = "1.0.0-beta-8-SNAPSHOT" | ||
Write-Host "pluginVersion: " $pluginVersion | ||
|
||
|
||
# Get azure-functions-library | ||
Write-Host "Build and install azure-functions-java-library" | ||
cmd.exe /c '.\mvnBuild.bat' | ||
$libraryPom = Get-Content "pom.xml" -Raw | ||
$libraryPom -match "<version>(.*)</version>" | ||
$libraryVersion = $matches[1] | ||
Write-Host "libraryVersion: " $libraryVersion | ||
|
||
# Generate HttpTrigger Function via archetype version built above | ||
md -Name ciTestDir | ||
Push-Location -Path "./ciTestDir" -StackName libraryDir | ||
Write-Host "Generating project with archetype" | ||
mvn archetype:generate -DarchetypeCatalog="local" -DarchetypeGroupId="com.microsoft.azure" -DarchetypeArtifactId="azure-functions-archetype" -DarchetypeVersion="$atchetypeVersion" -DgroupId="com.microsoft" -DartifactId="e2etestproject" -Dversion="1.0-SNAPSHOT" -Dpackage="com.microsoft" -DappRegion="westus" -DresourceGroup="e2etest-java-functions-group" -DappName="e2etest-java-functions" -B | ||
StopOnFailedExecution | ||
Pop-Location -StackName "libraryDir" | ||
|
||
#Build HttpTrigger Function | ||
|
||
Push-Location -Path "./ciTestDir/e2etestproject" -StackName libraryDir | ||
Remove-Item -Recurse -Force "src/test" -ErrorAction Ignore | ||
cmd.exe /c .\..\..\updateVersions.bat $libraryVersion $pluginVersion | ||
StopOnFailedExecution | ||
#Update versions in the HttpTrigger pom.xml | ||
mvn clean package -DskipTests | ||
StopOnFailedExecution | ||
Pop-Location -StackName "libraryDir" | ||
|
||
|
||
|
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 @@ | ||
mvn clean install -U -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B -Dgpg.skip |
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 @@ | ||
mvn clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip -U -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B |
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
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,8 @@ | ||
|
||
set libraryVersion=%1 | ||
|
||
echo %libraryVersion% | ||
set pluginVersion=%2 | ||
echo %pluginVersion% | ||
call mvn versions:set-property -Dproperty=azure.functions.java.library.version -DnewVersion=%libraryVersion% | ||
call mvn versions:set-property -Dproperty=azure.functions.maven.plugin.version -DnewVersion=%pluginVersion% |