-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split dotnet and dotnetisolated builds (#1140)
- Loading branch information
1 parent
42f9a5e
commit df67024
Showing
7 changed files
with
203 additions
and
120 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
41 changes: 0 additions & 41 deletions
41
host/4/bullseye/amd64/dotnet/dotnet-inproc/dotnet-composite.template
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
# This is ssh server systemwide configuration file. | ||
# | ||
# /etc/sshd_config | ||
|
||
Port SSH_PORT | ||
ListenAddress 0.0.0.0 | ||
LoginGraceTime 180 | ||
X11Forwarding yes | ||
Ciphers aes128-cbc,3des-cbc,aes256-cbc | ||
MACs hmac-sha1,hmac-sha1-96 | ||
StrictModes yes | ||
SyslogFacility DAEMON | ||
PasswordAuthentication yes | ||
PermitEmptyPasswords no | ||
PermitRootLogin yes |
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,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
export DOTNET_USE_POLLING_FILE_WATCHER=true | ||
|
||
if [ -z $PORT ]; then | ||
export ASPNETCORE_URLS=http://*:80 | ||
else | ||
export ASPNETCORE_URLS=http://*:$PORT | ||
fi | ||
|
||
# Install ca-certificates | ||
source /opt/startup/install_ca_certificates.sh | ||
|
||
|
||
if [ -z $SSH_PORT ]; then | ||
export SSH_PORT=2222 | ||
fi | ||
|
||
if [ "$APPSVC_REMOTE_DEBUGGING" == "TRUE" ]; then | ||
export languageWorkers__node__arguments="--inspect=0.0.0.0:$APPSVC_TUNNEL_PORT" | ||
export languageWorkers__python__arguments="-m ptvsd --host localhost --port $APPSVC_TUNNEL_PORT" | ||
fi | ||
|
||
# Get environment variables to show up in SSH session | ||
eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) | ||
|
||
# starting sshd process | ||
sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config | ||
|
||
service ssh start | ||
|
||
if [ -f /azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost ]; then | ||
/azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost | ||
else | ||
dotnet /azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost.dll | ||
fi |
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,138 @@ | ||
pool: | ||
vmImage: 'Ubuntu-latest' | ||
|
||
pr: | ||
branches: | ||
include: | ||
- dev | ||
- release/4.x | ||
paths: | ||
include: | ||
- host/4/bullseye/amd64/base/* | ||
- host/4/bullseye/amd64/dotnet/* | ||
- host/4/bookworm/dotnet/* | ||
- host/4/mariner/dotnet/* | ||
- host/4/dotnet-build.yml | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- dev | ||
- refs/tags/4.* | ||
- refresh/4.* | ||
- release/4.x | ||
- nightly-build | ||
|
||
variables: | ||
- name: image_list | ||
value: '' | ||
|
||
jobs: | ||
- job: Dotnet | ||
strategy: | ||
matrix: | ||
_isolated-net-6: | ||
dotnetVersion: "dotnet-isolated" | ||
dockerfilePath: "host/4/bullseye/amd64/dotnet/dotnet-isolated/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated6.0" | ||
_isolated-slim: | ||
dotnetVersion: "dotnet-isolated-slim" | ||
dockerfilePath: "host/4/bullseye/amd64/dotnet/dotnet-isolated/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated6.0-slim" | ||
_isolated-appservice: | ||
dotnetVersion: "dotnet-isolated-appservice" | ||
dockerfilePath: "host/4/bullseye/amd64/out/dotnet/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated6.0-appservice" | ||
_isolated-net-7: | ||
dotnetVersion: "dotnet-isolated" | ||
dockerfilePath: "host/4/bullseye/amd64/dotnet/dotnet7-isolated/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated7.0" | ||
_isolated-net-7-slim: | ||
dotnetVersion: "dotnet-isolated-slim" | ||
dockerfilePath: "host/4/bullseye/amd64/dotnet/dotnet7-isolated/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated7.0-slim" | ||
_isolated-net-7-appservice: | ||
dotnetVersion: "dotnet7-isolated-appservice" | ||
dockerfilePath: "host/4/bullseye/amd64/out/dotnet/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated7.0-appservice" | ||
_isolated-net-7-mariner: | ||
dotnetVersion: "dotnet7-isolated-mariner" | ||
dockerfilePath: "host/4/mariner/dotnet/dotnet-isolated/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated7.0-mariner" | ||
_isolated-net-8: | ||
dotnetVersion: "dotnet-isolated" | ||
dockerfilePath: "host/4/bullseye/amd64/dotnet/dotnet8-isolated/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated8.0" | ||
_isolated-net-8-slim: | ||
dotnetVersion: "dotnet-isolated-slim" | ||
dockerfilePath: "host/4/bullseye/amd64/dotnet/dotnet8-isolated/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated8.0-slim" | ||
_isolated-net-8-appservice: | ||
dotnetVersion: "dotnet8-isolated-appservice" | ||
dockerfilePath: "host/4/bullseye/amd64/out/dotnet/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated8.0-appservice" | ||
_isolated-net-8-mariner: | ||
dotnetVersion: "dotnet8-isolated-mariner" | ||
dockerfilePath: "host/4/mariner/dotnet/dotnet-isolated/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated8.0-mariner" | ||
_isolated-net-9: | ||
dotnetVersion: "dotnet9-appservice" | ||
dockerfilePath: "host/4/bookworm/dotnet-isolated/" | ||
dockerImagePath: "dotnet-isolated" | ||
dockerImageName: "-dotnet-isolated9.0-appservice" | ||
|
||
steps: | ||
- bash: | | ||
# login | ||
set -e | ||
echo $pswd | docker login -u $(dockerUsername) --password-stdin azurefunctions.azurecr.io | ||
displayName: login to registry | ||
continueOnError: false | ||
env: | ||
pswd: $(dockerPassword) | ||
- bash: | | ||
./host/generate-composite.sh -4 dotnet | ||
displayName: create dotnet dockerfiles | ||
continueOnError: false | ||
- bash: | | ||
set -e | ||
IMAGE_NAME=azurefunctions.azurecr.io/azure-functions/4/$(dockerImagePath):$(Build.SourceBranchName)$(dockerImageName) | ||
IMAGE_ARRAY="$(image_list),$IMAGE_NAME" | ||
echo "##vso[task.setvariable variable=image_list;]$IMAGE_NAME" | ||
docker build -t $IMAGE_NAME \ | ||
-f $(dockerfilePath)$(dotnetVersion).Dockerfile \ | ||
$(dockerfilePath) | ||
npm run test $IMAGE_NAME --prefix test/ | ||
docker push $IMAGE_NAME | ||
displayName: $(dotnetVersion) | ||
continueOnError: false | ||
- job: Publish | ||
dependsOn: Dotnet | ||
steps: | ||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 | ||
displayName: 'Manifest Generator' | ||
inputs: | ||
BuildDropPath: host | ||
Verbosity: Verbose | ||
DockerImagesToScan: $(image_list) | ||
|
||
- task: PublishPipelineArtifact@1 | ||
displayName: 'Publish SBOM Artifact' | ||
inputs: | ||
targetPath: host/_manifest | ||
artifact: SBOM-Functionsv4-dotnet-$(Build.SourceBranchName) |