-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
…to nba610-initial-support
- Loading branch information
Showing
362 changed files
with
63,766 additions
and
5,154 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
parameters: | ||
- name: connectionName | ||
type: string | ||
default: sonic-dev-connection | ||
- name: kevaultName | ||
type: string | ||
default: sonic-kv | ||
- name: certificateName | ||
type: string | ||
default: sonic-secure-boot | ||
|
||
steps: | ||
- task: AzureKeyVault@2 | ||
inputs: | ||
connectedServiceName: ${{ parameters.connectionName }} | ||
keyVaultName: ${{ parameters.kevaultName }} | ||
secretsFilter: ${{ parameters.certificateName }} | ||
|
||
- script: | | ||
set -e | ||
TMP_FILE=$(mktemp) | ||
echo "$CERTIFICATE" | base64 -d > $TMP_FILE | ||
sudo mkdir -p /etc/certificates | ||
mkdir -p $(Build.StagingDirectory)/target | ||
# Save the public key | ||
openssl pkcs12 -in $TMP_FILE -clcerts --nokeys -nodes -passin pass: | sed -z -e "s/.*\(-----BEGIN CERTIFICATE\)/\1/" > $(SIGNING_CERT) | ||
# Save the private key | ||
openssl pkcs12 -in $TMP_FILE -nocerts -nodes -passin pass: | sed -z -e "s/.*\(-----BEGIN PRIVATE KEY\)/\1/" | sudo tee $(SIGNING_KEY) 1>/dev/null | ||
ls -lt $(SIGNING_CERT) $(SIGNING_KEY) | ||
rm $TMP_FILE | ||
env: | ||
CERTIFICATE: $(${{ parameters.certificateName }}) | ||
displayName: "Save certificate" |
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
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
variables: | ||
DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io' | ||
COMMON_LIB_BUILD_ENVS: 'bullseye' |
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,64 @@ | ||
# The steps to trigger the pipeline to publish the artifacts | ||
|
||
parameters: | ||
- name: artifactName | ||
type: string | ||
default: "" | ||
- name: publishPrefix | ||
type: string | ||
default: "$(Build.DefinitionName)/$(Build.SourceBranchName)" | ||
|
||
steps: | ||
- script: | | ||
. functions.sh | ||
sonic_version=$(sonic_get_version) | ||
latest_tag=$(git describe --tags --abbrev=0) | ||
docker_tags="$sonic_version $(Build.SourceBranchName)" | ||
if [ "$(Build.SourceBranchName)" == "master" ]; then | ||
docker_tags="$docker_tags latest" | ||
fi | ||
echo "##vso[task.setvariable variable=sonic_version]$sonic_version" | ||
echo "##vso[task.setvariable variable=latest_tag]$latest_tag" | ||
echo "##vso[task.setvariable variable=docker_tags]$docker_tags" | ||
condition: ne(variables['Build.Reason'], 'PullRequest') | ||
displayName: 'Set trigger build variables' | ||
- task: TriggerBuild@4 | ||
condition: ne(variables['Build.Reason'], 'PullRequest') | ||
inputs: | ||
definitionIsInCurrentTeamProject: false | ||
teamProject: internal | ||
tfsServer: $(System.CollectionUri) | ||
buildDefinition: 'publish-artifacts' | ||
queueBuildForUserThatTriggeredBuild: true | ||
ignoreSslCertificateErrors: false | ||
useSameSourceVersion: false | ||
useCustomSourceVersion: false | ||
useSameBranch: false | ||
waitForQueuedBuildsToFinish: false | ||
storeInEnvironmentVariable: true | ||
authenticationMethod: 'Personal Access Token' | ||
password: '$(system.accesstoken)' | ||
enableBuildInQueueCondition: false | ||
dependentOnSuccessfulBuildCondition: false | ||
dependentOnFailedBuildCondition: false | ||
checkbuildsoncurrentbranch: false | ||
failTaskIfConditionsAreNotFulfilled: false | ||
buildParameters: '' | ||
templateParameters: | | ||
pipelineContext: {"buildId":"$(Build.BuildId)", | ||
"pipelineId":"$(System.DefinitionId)", | ||
"project": "$(System.TeamProject)", | ||
"branchName":"$(Build.SourceBranchName)"}, | ||
artifactContext: {"artifactName":"${{ parameters.artifactName }}", | ||
"artifactPatterns":"**/*.bin\n | ||
**/*.swi\n | ||
**/*.raw\n | ||
**/*.img.gz\n | ||
**/*-rpc.gz\n | ||
**/python-saithrift*.deb"}, | ||
publishContext: {"publishPrefix":"${{ parameters.publishPrefix }}", | ||
"keepArtifactName":false, | ||
"dockerImagePatterns":"target/*-rpc.gz", | ||
"dockerTags":"$(docker_tags)", | ||
"version":"$(sonic_version)", | ||
"latestTag":"$(latest_tag)"} |
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
Oops, something went wrong.