Skip to content

Commit

Permalink
Merged PR 477786: Fixes issues with release
Browse files Browse the repository at this point in the history
* Publishes `bin/` and `scripts/` as part of the build
* Removes the windows image from the functions binding manifest
* Fixes login for the build manifest script
  • Loading branch information
myagley committed Oct 21, 2017
1 parent 396446f commit 443a54a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
5 changes: 0 additions & 5 deletions edge-modules/functions/binding/docker/manifest.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,3 @@ manifests:
platform:
architecture: arm
os: linux
-
image: __REGISTRY__/azureiotedge/functions-binding-windows-amd64:__VERSION__
platform:
architecture: amd64
os: windows
9 changes: 9 additions & 0 deletions scripts/linux/buildBranch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ PUBLISH_FOLDER=$BUILD_BINARIESDIRECTORY/publish
RELEASE_TESTS_FOLDER=$BUILD_BINARIESDIRECTORY/release-tests
SRC_DOCKER_DIR=$ROOT_FOLDER/docker
SRC_SCRIPTS_DIR=$ROOT_FOLDER/scripts
SRC_BIN_DIR=$ROOT_FOLDER/bin

# Process script arguments
PUBLISH_TESTS=${1:-""}
Expand Down Expand Up @@ -107,6 +108,14 @@ echo "Copying $SRC_DOCKER_DIR to $PUBLISH_FOLDER/docker"
rm -fr $PUBLISH_FOLDER/docker
cp -r $SRC_DOCKER_DIR $PUBLISH_FOLDER

echo "Copying $SRC_SCRIPTS_DIR to $PUBLISH_FOLDER/scripts"
rm -fr $PUBLISH_FOLDER/scripts
cp -r $SRC_SCRIPTS_DIR $PUBLISH_FOLDER

echo "Copying $SRC_BIN_DIR to $PUBLISH_FOLDER/bin"
rm -fr $PUBLISH_FOLDER/bin
cp -r $SRC_BIN_DIR $PUBLISH_FOLDER

if [ "$PUBLISH_TESTS" == "--publish-tests" ]; then

echo "Publishing tests"
Expand Down
7 changes: 7 additions & 0 deletions scripts/linux/buildManifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ process_args()
###############################################################################
process_args $@

#echo Logging in to Docker registry
docker login $DOCKER_REGISTRY -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
if [ $? -ne 0 ]; then
echo "Docker Login Failed!"
exit 1
fi

# Create temp file to store modified yaml file
manifest=$(mktemp /tmp/manifest.yaml.XXXXXX)
[ $? -eq 0 ] || exit $?
Expand Down
9 changes: 8 additions & 1 deletion scripts/windows/buildBranch.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ set PUBLISH_FOLDER=%BUILD_BINARIESDIRECTORY%\publish
set SRC_DOCKER_DIR=%BUILD_REPOSITORY_LOCALPATH%\docker
set RELEASE_TESTS_FOLDER=%BUILD_BINARIESDIRECTORY%\release-tests
set SRC_SCRIPTS_DIR=%BUILD_REPOSITORY_LOCALPATH%\scripts
set SRC_BIN_DIR=%BUILD_REPOSITORY_LOCALPATH%\bin
set TEST_CSPROJ_PATTERN=Microsoft.Azure*Test.csproj
set FUNCTION_BINDING_CSPROJ_PATTERN=*Binding.csproj

Expand Down Expand Up @@ -103,14 +104,20 @@ for /f "usebackq" %%f in (`FINDSTR /spmc:"<OutputType>Exe</OutputType>" %CSPROJ_
for /r %BUILD_REPOSITORY_LOCALPATH% %%f in (%FUNCTION_BINDING_CSPROJ_PATTERN%) do (
echo Publishing - %%f
for %%i in ("%%f") do set PROJ_NAME=%%~ni

"%DOTNET_ROOT_PATH%\dotnet" publish -f netstandard2.0 -c %CONFIGURATION% -o %PUBLISH_FOLDER%\!PROJ_NAME! %%f
if !ERRORLEVEL! neq 0 exit /b 1
)

echo Copying %SRC_DOCKER_DIR% to %PUBLISH_FOLDER%\docker
xcopy /si %SRC_DOCKER_DIR% %PUBLISH_FOLDER%\docker

echo Copying %SRC_SCRIPTS_DIR% to %PUBLISH_FOLDER%
xcopy /si %SRC_SCRIPTS_DIR% %PUBLISH_FOLDER%\scripts

echo Copying %SRC_BIN_DIR% to %PUBLISH_FOLDER%
xcopy /si %SRC_BIN_DIR% %PUBLISH_FOLDER%\bin

echo Publish tests - %PUBLISH_TESTS%
if "!PUBLISH_TESTS!" == "--publish-tests" (
echo.
Expand Down

0 comments on commit 443a54a

Please sign in to comment.