This commit is contained in:
Sasha Pierson 2019-10-30 17:08:48 -07:00
Родитель 306bfc6ed0
Коммит f02caad356
13 изменённых файлов: 569 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,33 @@
{
"tool": "Credential Scanner",
"suppressions": [
{
"file": "PythonIoTBackgroundApplication_TemporaryKey.pfx",
"_justification": "Not a real cert but a sample for testing."
},
{
"file": "HubApp452Win81.Windows_TemporaryKey.pfx",
"_justification": "Not a real cert but a sample for testing."
},
{
"file": "UWP452_TemporaryKey.pfx",
"_justification": "Not a real cert but a sample for testing."
},
{
"file": "UWP452Win81.Windows_TemporaryKey.pfx",
"_justification": "Not a real cert but a sample for testing."
},
{
"file": "BlankUWPApp45_TemporaryKey.pfx",
"_justification": "Not a real cert but a sample for testing."
},
{
"file": "VBExcelAddIn45_TemporaryKey.pfx",
"_justification": "Not a real cert but a sample for testing."
},
{
"file": "WpfBrowserApp451_TemporaryKey.pfx",
"_justification": "Not a real cert but a sample for testing."
}
]
}

3
.config/cloudvault.json Normal file
Просмотреть файл

@ -0,0 +1,3 @@
{
"DeploymentRootPath" : "outputs\\build\\HelloWorld"
}

Просмотреть файл

@ -0,0 +1,14 @@
#!/bin/bash
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
apt-get update -y
apt-get dist-upgrade -y
apt-get install -y gcc golang erlang ruby oracle-java8-installer oracle-java8-set-default python python3 perl maven gradle nodejs dotnet-dev-1.0.1 mono-complete curl gettext
export JAVA_HOME=/usr/lib/jvm/java-8-oracle/bin
curl -sSf https://static.rust-lang.org/rustup.sh | sh

Просмотреть файл

@ -0,0 +1,31 @@
#!/bin/bash
set +e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo $DIR
echo -----------------------------------------------
echo Cleaning up old stuff
rm -f $DIR/*.txt
rm -f $DIR/*.gz
rm -f -R $DIR/hello*
rm -f -R $DIR/../src/LinuxSample/hello*
echo -----------------------------------------------
cd $DIR/../src/LinuxSample
echo ----------- .NET Core -------------------------
cd $DIR/../src/LinuxSample/DotNet
dotnet restore > store.txt
dotnet run
echo ----------- Nuget -----------------------------
cd $DIR/../src/LinuxSample/Nuget
nuget install WindowsAzure.ServiceBus -Version 4.0.0
echo ----------- Native ----------------------------
mkdir $DIR/../src/LinuxSample/Make
cd $DIR/../src/LinuxSample/Make
wget -O hello-2.7.tar.gz http://ftp.gnu.org/gnu/hello/hello-2.7.tar.gz > download.txt
tar -zxf hello-2.7.tar.gz > tar.txt
cd $DIR

72
.pipelines/LinuxSTX.sh Normal file
Просмотреть файл

@ -0,0 +1,72 @@
#!/bin/bash
set +e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo $DIR
cd $DIR/../src/LinuxSample
echo ----------- GCC -------------------------------
cd $DIR/../src/LinuxSample/C
gcc HelloWorld.c -o helloc
./helloc
echo ----------- G++ -------------------------------
cd $DIR/../src/LinuxSample/C++
g++ HelloWorld.cpp -o hellocplusplus
./hellocplusplus
echo ----------- .NET Core -------------------------
cd $DIR/../src/LinuxSample/DotNet
dotnet run
echo ----------- Erlang ----------------------------
cd $DIR/../src/LinuxSample/Erlang
erlc helloworld.erl
erl -noshell -s helloworld start -s init stop
echo ----------- Go --------------------------------
cd $DIR/../src/LinuxSample/Go
go build HelloWorld.go
./HelloWorld
echo ----------- Haskell ---------------------------
cd $DIR/../src/LinuxSample/Haskell
ghc -o helloHaskell HelloWorld > buildHaskell.txt
./helloHaskell
echo ----------- Java Standalone -------------------
cd $DIR/../src/LinuxSample/Java
javac HelloWorld.java
java HelloWorld
echo ----------- Perl ------------------------------
cd $DIR/../src/LinuxSample/Perl
perl HelloWorld.pl
echo ----------- Python 2.0 ------------------------
cd $DIR/../src/LinuxSample/Python2
python2 HelloWorld.py
echo ----------- Python 3.0 ------------------------
cd $DIR/../src/LinuxSample/Python3
python3 HelloWorld.py
echo ----------- Ruby ------------------------------
cd $DIR/../src/LinuxSample/Ruby
ruby HelloWorld.rb
echo ----------- Rust ------------------------------
cd $DIR/../src/LinuxSample/Rust
rustc HelloWorld.rs
./HelloWorld
echo ----------- Native ----------------------------
cd $DIR/../src/LinuxSample/Make
cd ./hello-2.7
./configure > config.txt
make > make.txt
make install > makeInstall.txt
hello
cd $DIR

1
.pipelines/RS4Test.cmd Normal file
Просмотреть файл

@ -0,0 +1 @@
echo "Fake build command to produce artifacts for cloud vault upload"

Просмотреть файл

@ -0,0 +1,93 @@
cd /D "%~dp0"
pushd
echo --------------- PYTHON 2 ---------------------
python2.exe "%~dp0\..\src\WindowsServerSample\Python2\HelloWorld.py"
popd
pushd
echo --------------- PYTHON 3 ---------------------
python3 "%~dp0\..\src\WindowsServerSample\Python3\HelloWorld.py"
popd
pushd
echo --------------- PERL ---------------------
perl "cd %~dp0\..\src\WindowsServerSample\perl\HelloWorld.pl"
popd
REM pushd
REM cd "%~dp0\..\src\WindowsServerSample\Java"
REM javac HelloWorld.java
REM java HelloWorld
REM popd
pushd
cd "%~dp0\..\src\WindowsServerSample\Go"
go build HelloWorld.go
.\HelloWorld.exe
popd
pushd
cd "%~dp0\..\src\WindowsServerSample\Haskell"
ghc -o helloHaskell HelloWorld > buildHaskell.txt
.\helloHaskell
popd
pushd
cd "%~dp0\..\src\WindowsServerSample\Ruby"
ruby "HelloWorld.rb"
popd
pushd
cd "%~dp0\..\src\WindowsServerSample\Rust"
rustc HelloWorld.rs
.\HelloWorld
popd
pushd
cd "%~dp0\..\src\WindowsServerSample\Node"
node app.js
popd
pushd
cd "%~dp0\..\src\WindowsServerSample\DotNet"
dotnet restore
dotnet run
popd
"%VS140COMNTOOLS%\vsvars32.bat"
pushd
cd "%~dp0\..\src\WindowsServerSample\C"
cl.exe HelloWorld.c -o helloc
helloc.exe
popd
pushd
cd "%~dp0\..\src\WindowsServerSample\C++"
cl.exe HelloWorld.cpp -o hellocplusplus
hellocplusplus.exe"
popd
pushd
choco.exe install -y winrar
popd
pushd
cd "%~dp0\..\src\WindowsServerSample\Erlang"
erl -noshell -s helloworld start -s init stop
popd
pushd
cd "%~dp0\..\src\WindowsServerSample\VisualStudio\HelloWorld"
msbuild HelloWorld.sln"
popd
pushd
cd "%~dp0\..\src\WindowsServerSample\VisualStudio\Various"
msbuild Various.sln
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" /logger:trx ".\MyClassLibrary.Test\bin\Debug\MyClassLibrary.Test.dll"
popd
cd "%~dp0"

Просмотреть файл

@ -0,0 +1,72 @@
environment:
host:
os: 'linux'
flavor: 'ubuntu'
version: '16.04'
runtime:
provider: 'appcontainer'
image: 'cdpxlinux.azurecr.io/global/ubuntu-1804-node10:1.0'
restore:
commands:
- !!defaultcommand
name: 'Update Node'
command: 'src/LinuxSample/Node/update-node.sh'
- !!defaultcommand
name: 'Linux Restore STX'
command: '.pipelines/LinuxRestoreSTX.sh'
fail_on_stderr: false
- !!defaultcommand
name: 'Node Restore'
command: 'src/LinuxSample/Node/restore.sh'
fail_on_stderr: false
build:
commands:
- !!defaultcommand
name: 'Linux STX'
command: '.pipelines/LinuxSTX.sh'
fail_on_stderr: false
- !!buildcommand
name: 'Build Node'
fail_on_stderr: false
command: 'src/LinuxSample/Node/build.sh'
artifacts:
- from: 'src/LinuxSample/Node/oe-template'
to: 'Linux/Node'
exclude:
- '**/node_modules'
include:
- '**/*'
- !!buildcommand
name: 'Build C'
command: 'src/LinuxSample/C/build-c.sh'
artifacts:
- from: 'src/LinuxSample/C'
to: 'Linux/C'
include:
- 'helloc'
logs:
- include:
- 'src/LinuxSample/C/build.log'
- !!buildcommand
name: 'Build C++'
command: 'src/LinuxSample/C++/build-cpp.sh'
artifacts:
- from: 'src/LinuxSample/C++'
to: 'Linux/C++'
include:
- 'hellocplusplus'
logs:
- include:
- 'src/LinuxSample/C++/build.log'
package:
commands:
- !!dockerbuildcommand
name: 'Build and Publish image'
context_folder: 'src/DockerBuildExample/dummy'
repository_name: 'cdpx/stx'

Просмотреть файл

@ -0,0 +1,45 @@
environment:
host:
os: 'windows'
flavor: "server"
version: "2016"
runtime:
provider: 'appcontainer'
image: 'cdpxwinrs4test.azurecr.io/global/vse2017u7-external-azsdk-mobile-ext-win1803:latest-nodetools'
source_mode: map
restore:
commands:
- !!defaultcommand
name: 'Restore Node'
command: 'src\WindowsServerSample\Node\restore.cmd'
build:
commands:
- !!buildcommand
name: 'Fake Build for Validation'
command: '.pipelines\RS4Test.cmd'
fail_on_stderr: false
artifacts:
- from: '.pipelines'
to: 'HelloWorld'
include:
- '**/*'
exclude:
- '**/HelloWorld.py'
signing_options:
profile: 'none'
- !!buildcommand
name: 'Build Node'
fail_on_stderr: false
command: 'src\WindowsServerSample\Node\officialBuild.cmd'
artifacts:
- from: 'src\WindowsServerSample\Node\oe-template'
to: 'Node'
include:
- 'build/'
signing_options:
sign_inline: true
test:
commands:

Просмотреть файл

@ -0,0 +1,18 @@
restore:
commands:
- !!defaultcommand
name: 'Checkout contents'
command: 'testSubmodule.cmd'
build:
commands:
- !!defaultcommand
name: 'Checkout contents'
command: 'testSubmodule.cmd'
test:
commands:
- !!defaultcommand
name: 'Checkout contents'
command: 'testSubmodule.cmd'

Просмотреть файл

@ -0,0 +1,133 @@
environment:
host:
os: 'windows'
flavor: 'server'
version: '2016'
runtime:
provider: 'appcontainer'
image: 'cdpxwin.azurecr.io/global/vse2017u7/vse2017u7-external-winltsc2016-20190731:latest'
source_mode: 'map'
signing_options:
profile: 'azure'
restore:
commands:
- !!defaultcommand
name: 'Restore CSharp'
command: 'src\WindowsServerSample\VisualStudio\restore.cmd'
build:
commands:
- !!buildcommand
name: 'Build CSharp'
command: 'src\WindowsServerSample\VisualStudio\build.cmd'
fail_on_stderr: false
artifacts:
- from: 'src\WindowsServerSample\VisualStudio\Various\ClassLibrary\bin\Debug'
to: 'Dotnet_ClassLibrary'
include:
- '**/*'
signing_options:
sign_inline: true
- from: 'src\WindowsServerSample\VisualStudio\Various\ClassLibrary.Test\bin\Debug'
to: 'ClassLibrary.Test'
include:
- '**/*'
- !!buildcommand
name: 'Build CSharp MSBuild'
command: 'src\WindowsServerSample\DotNetMSBuild\build.cmd'
fail_on_stderr: false
artifacts:
- from: 'src\WindowsServerSample\DotNetMSBuild\MSBuildSample\bin'
to: 'Dotnet_HelloWorld'
include:
- '**/*'
signing_options:
sign_inline: true
- !!buildcommand
name: 'Build Haskell'
fail_on_stderr: false
command: 'src\WindowsServerSample\Haskell\build.cmd'
artifacts:
- from: 'src\WindowsServerSample\Haskell'
to: 'Haskell'
include:
- 'HelloWorld.exe'
- !!buildcommand
name: 'Build Go'
fail_on_stderr: false
command: 'src\WindowsServerSample\Go\build.cmd'
artifacts:
- from: 'src\WindowsServerSample\Go\build.cmd'
to: 'Go'
include:
- 'HelloWorld.exe'
- !!buildcommand
name: 'Build Java'
fail_on_stderr: false
command: 'src\WindowsServerSample\Java\build.cmd'
artifacts:
- from: 'src\WindowsServerSample\Java'
to: 'Plain JDK'
include:
- 'HelloWorld.class'
- !!buildcommand
name: 'Build Perl'
fail_on_stderr: false
command: 'src\WindowsServerSample\Perl\build.cmd'
artifacts:
- from: 'src\WindowsServerSample\Perl'
to: 'Perl'
include:
- 'HelloWorld.pl'
- !!buildcommand
name: 'Build Python3'
fail_on_stderr: false
command: 'src\WindowsServerSample\Python3\build.cmd'
artifacts:
- from: 'src\WindowsServerSample\Python3'
to: 'Python3'
include:
- 'HelloWorld.py'
signing_options:
profile: 'none'
- !!buildcommand
name: 'Build Ruby'
fail_on_stderr: false
command: 'src\WindowsServerSample\Ruby\build.cmd'
artifacts:
- from: 'src\WindowsServerSample\Ruby'
to: 'Ruby'
include:
- 'HelloWorld.rb'
test:
commands:
- !!testcommand
name: 'Test CSharp'
command: 'src\WindowsServerSample\VisualStudio\test.cmd'
fail_on_stderr: false
logs:
- to: 'test-csharp-logs'
include:
- '**/*.trx'
- '**/*.coverage'
testresults:
- from: 'src\WindowsServerSample\VisualStudio'
title: 'Even-Odd-Tests'
type: 'nunit'
include:
- '**/*.trx'
- '**/*.coverage'
static_analysis_options:
policheck_options:
scan_comments: true
files_to_scan:
- exclude:
- 'src\WindowsServerSample\VisualStudio2015\AspNet45AppInsights\Scripts\modernizr-2.6.2.js'
- 'src\WindowsServerSample\VisualStudio2015\AspNet46\Scripts\modernizr-2.6.2.js'
- 'src\WindowsServerSample\VisualStudio2015\DjangoWebProject\app\static\app\scripts\modernizr-2.6.2.js'
- 'src\WindowsServerSample\VisualStudio2015\CordovaApp\Project_Readme.html'
- 'src\WindowsServerSample\VisualStudio2015\TypescriptCordovaApp\Project_Readme.html'

Просмотреть файл

@ -0,0 +1,49 @@
version:
major: 1
minor: 0
tag: 'alpha'
name: 'CDPX-Samples'
system: 'patch'
workspace_options:
enable_legacy_networking: false
static_analysis_options:
moderncop_options:
files_to_scan:
- from: src\LinuxSample\Node
exclude:
- '**/*.js'
- from: src\WindowsServerSample\Node
exclude:
- '**/*.js'
binskim_options:
files_to_scan:
- exclude:
- '**/Go/*.exe'
- '**/Haskell/*.exe'
package_sources:
nuget:
feeds:
'Toolset': 'https://msazure.pkgs.visualstudio.com/_packaging/Toolset/nuget/v3/index.json'
'CloudES-CDP': 'https://cloudes.pkgs.visualstudio.com/_packaging/CDP/nuget/v3/index.json'
'CloudES-Internal': 'https://cloudes.pkgs.visualstudio.com/_packaging/Internal/nuget/v3/index.json'
'MsNugetMirror': 'https://msazure.pkgs.visualstudio.com/_packaging/MsNugetMirror/nuget/v3/index.json'
'NugetMirror': 'https://msazure.pkgs.visualstudio.com/_packaging/NugetMirror/nuget/v3/index.json'
'CorextMirror': 'https://msazure.pkgs.visualstudio.com/_packaging/CorextMirror/nuget/v3/index.json'
'Official': 'https://msazure.pkgs.visualstudio.com/_packaging/Official/nuget/v3/index.json'
'Toolset': 'https://msazure.pkgs.visualstudio.com/_packaging/Toolset/nuget/v3/index.json'
'AzureCXP': 'https://msazure.pkgs.visualstudio.com/_packaging/AzureCXP/nuget/v3/index.json'
npm:
feeds:
'@AzureCXP:registry': 'https://msazure.pkgs.visualstudio.com/_packaging/AzureCXP/npm/registry/'
'@AzurePortal:registry': 'https://msazure.pkgs.visualstudio.com/_packaging/AzurePortal/npm/registry/'
'@CloudES:registry': 'https://msazure.pkgs.visualstudio.com/_packaging/CloudES/npm/registry/'
'@npmjs:registry': 'https://msazure.pkgs.visualstudio.com/_packaging/npmjs/npm/registry/'
artifact_publish_options: # Metadata section
publish_to_legacy_artifacts: true # Default is always true
publish_to_pipeline_artifacts: false # Default is always false
publish_to_cloudvault_artifacts: false # Default is always true
# only one of legacy and pipeline artifacts can be enabled at the same time

Просмотреть файл

@ -0,0 +1,5 @@
// This is a CDP xPlat pipeline generated file
using System.Reflection;
[assembly: AssemblyVersion("1.0.062117.1000")]
[assembly: AssemblyFileVersion("1.0.062117.1000")]
[assembly: AssemblyInformationalVersion("1.0.062117.1000-alpha-ca23db4d")]