Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial changes for including arm64 binaries #290

Merged
merged 67 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
50a8b2f
initial changes for including arm64 binaries
hsubramanianaks Jul 7, 2023
39eefda
Merge branch 'main' into arm64-changes
hsubramanianaks Jul 7, 2023
ad7e502
changes for arm64 for build pipelines
hsubramanianaks Jul 18, 2023
02df487
add arm64 steps to workflow
hsubramanianaks Jul 18, 2023
c5cb9d9
add if condition to cover EPM launcher
hsubramanianaks Jul 18, 2023
a50e7af
set validation level for GH release
hsubramanianaks Jul 18, 2023
73ba95e
remove error warning
hsubramanianaks Jul 18, 2023
58f258f
Merge branch 'main' into arm64-changes
hsubramanianaks Jul 18, 2023
c800668
remove settings json
hsubramanianaks Jul 18, 2023
46d9656
Merge branch 'arm64-changes' of github.com:hsubramanianaks/Bridge-To-…
hsubramanianaks Jul 18, 2023
83f031a
add arch variables to support arm64 images
hsubramanianaks Jul 20, 2023
78e99a5
changes for arm64 for restore and routing manager
hsubramanianaks Jul 20, 2023
45e7116
Merge branch 'main' into arm64-changes
hsubramanianaks Aug 11, 2023
e87221e
Merge branch 'main' into arm64-changes
hsubramanianaks Aug 22, 2023
87dc937
Merge branch 'main' into arm64-changes
hsubramanianaks Sep 19, 2023
e89b76b
Merge branch 'main' into arm64-changes
hsubramanianaks Sep 25, 2023
57a9f1f
Merge branch 'main' into arm64-changes
hsubramanianaks Oct 11, 2023
cdb8a8b
changes to pull arm64 images based on node arch
hsubramanianaks Oct 11, 2023
b81b9f9
override image changes
hsubramanianaks Oct 11, 2023
18c2e0c
rearrange doker instructions
hsubramanianaks Oct 11, 2023
6db90d9
update todoapp to arm based and push to ACR
hsubramanianaks Oct 12, 2023
50b1d4f
update iamge provider to use lazyasync and client factory
hsubramanianaks Oct 12, 2023
6983fb8
changes needed for isolated mode
hsubramanianaks Oct 17, 2023
0e43a11
fix failing UT's.
hsubramanianaks Oct 17, 2023
4ef87e5
Merge branch 'main' into arm64-changes
hsubramanianaks Oct 17, 2023
0c09970
revert back to previous commit and add acr workflow
hsubramanianaks Oct 18, 2023
36f101b
Merge branch 'arm64-changes' of github.com:hsubramanianaks/Bridge-To-…
hsubramanianaks Oct 18, 2023
5472fcc
remove unused imports
hsubramanianaks Oct 18, 2023
4f81d46
docker files changes to support multi arch
hsubramanianaks Oct 19, 2023
7eba6ca
Arm64 changes (#43)
hsubramanianaks Oct 19, 2023
fbfbc86
update arch in the workflow
hsubramanianaks Oct 19, 2023
78a8a31
make jobs parallel
hsubramanianaks Oct 19, 2023
9f5eb4b
make jobs parallel
hsubramanianaks Oct 19, 2023
35e2d7a
add the missing $
hsubramanianaks Oct 19, 2023
7ba6910
add the missing $
hsubramanianaks Oct 19, 2023
83c5b80
try with include
hsubramanianaks Oct 19, 2023
6557016
try with include for key/value pair
hsubramanianaks Oct 19, 2023
141ce73
read version from image tag file
hsubramanianaks Oct 19, 2023
c4d1983
read version from image tag settings
hsubramanianaks Oct 19, 2023
1dd5726
try with backtick to exec shell
hsubramanianaks Oct 19, 2023
fe0d827
try with backtick
hsubramanianaks Oct 19, 2023
6e68969
try with chmod
hsubramanianaks Oct 19, 2023
ec8182d
try with double equal signs
hsubramanianaks Oct 19, 2023
cc66d31
add echo statements
hsubramanianaks Oct 19, 2023
8ae79d8
add more echo statements
hsubramanianaks Oct 19, 2023
9397adb
try with env variable
hsubramanianaks Oct 19, 2023
a85139f
add permissions and env variable
hsubramanianaks Oct 19, 2023
05837d1
rename step and add set telemtry var
hsubramanianaks Oct 19, 2023
0ebe024
rename step and add set telemtry var
hsubramanianaks Oct 19, 2023
c1a60f0
add environment choice
hsubramanianaks Oct 20, 2023
847fe65
add environment profile
hsubramanianaks Oct 20, 2023
8049d02
add environment to workflow
hsubramanianaks Oct 20, 2023
36bddb1
add pr build workflow
hsubramanianaks Oct 23, 2023
b697018
add unittest sln and pr build workflow
hsubramanianaks Oct 23, 2023
acb25cd
changes for samples dockerfile for both arch
hsubramanianaks Oct 23, 2023
14175a6
fix dockerfile to work for amd/arm64
hsubramanianaks Oct 23, 2023
3a129dd
update release workflow
hsubramanianaks Oct 23, 2023
a0e2369
Merge branch 'main' into arm64-changes
Tatsinnit Oct 23, 2023
e2ba7a4
upload release assests to matrix
hsubramanianaks Oct 24, 2023
5b04aef
Merge branch 'arm64-changes' of github.com:hsubramanianaks/Bridge-To-…
hsubramanianaks Oct 24, 2023
b147ea6
remove white spaces and unused vars
hsubramanianaks Oct 24, 2023
11525d4
remove whitespace changes
hsubramanianaks Oct 24, 2023
979725d
Merge branch 'main' into arm64-changes
hsubramanianaks Oct 24, 2023
d6b866f
Revert "upload release assests to matrix" (#45)
peterbom Oct 24, 2023
9d7099d
changes for managed identity
hsubramanianaks Nov 1, 2023
7decbe2
remove unused vars
hsubramanianaks Nov 1, 2023
7f00ab0
remove commented lines
hsubramanianaks Nov 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/acr-build-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: build and push to acr
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to build'
required: true
default: 'development'
type: choice
options:
- development
Tatsinnit marked this conversation as resolved.
Show resolved Hide resolved
- staging
- prod
jobs:
docker:
strategy:
matrix:
include:
- components: devhostagent
imageName: lpkremoteagent
- components: devhostagent.restorationjob
imageName: lpkrestorationjob
- components: routingmanager
imageName: routingmanager
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ vars.ACR_REGISTRY }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Set telemetry variables
shell: bash
run: |
if [ $GITHUB_REF == "refs/heads/main" ]; then
echo "##vso[task.setvariable variable=TelemetryType]TELEMETRY_PRODUCTION"
else
echo "##vso[task.setvariable variable=TelemetryType]TELEMETRY_DEVELOPMENT"
fi
- name: Set image tags
shell: bash
id: version
run: |
chmod +x ./deployment/settings/setenvironmentvariables.sh
`./deployment/settings/setenvironmentvariables.sh deployment/settings/services/imagetag.setting`
printenv | grep "MINDARO"
if [ ${{ matrix.components}} == "devhostagent" ]; then
echo "tag=$MINDARO_DEVHOSTAGENT_TAG" >> $GITHUB_ENV
elif [ ${{ matrix.components}} == "devhostagent.restorationjob" ]; then
echo "tag=$MINDARO_DEVHOSTAGENT_RESTORATIONJOB_TAG" >> $GITHUB_ENV
else
echo "tag=$MINDARO_ROUTINGMANAGER_TAG" >> $GITHUB_ENV
fi
- name: Build and push for ${{ matrix.components }}
uses: docker/build-push-action@v5
with:
file: src/${{ matrix.components }}/Dockerfile
platforms: linux/arm64,linux/amd64
push: true
tags: ${{ vars.ACR_REGISTRY }}/${{ matrix.imageName }}:${{ env.tag }}
48 changes: 48 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: PR build pipeline
on: [workflow_dispatch]

jobs:
self-contained:
runs-on: windows-latest
strategy:
matrix:
mode: [osx-x64,linux-x64,win-x64,win-arm64,osx-arm64,linux-arm64]
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1.0.6
- name: Restore dependencies using Nuget
run: nuget restore src\client.sln -Verbosity Normal -NonInteractive -ConfigFile src/nuget.config
- name: dotnet Publish for ${{ matrix.mode }}
run: dotnet publish src\dsc\dsc.csproj -c Release -r ${{ matrix.mode }} --no-restore --self-contained true --verbosity normal
- name: Build endpointmanagerlauncher
if: ${{ matrix.mode == 'win-x64' || matrix.mode == 'win-arm64'}}
run: dotnet publish src\EndpointManagerLauncher\endpointmanagerlauncher.csproj -r ${{ matrix.mode }} -c Release --no-restore
- name: Run unit test cases
run: |
dotnet restore src\unittest.sln
dotnet test src\unittest.sln -c Release --no-restore --verbosity normal
non-self-contained:
runs-on: windows-latest
strategy:
matrix:
mode: [osx-x64,linux-x64,win-x64,win-arm64,osx-arm64,linux-arm64]
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1.0.6
- name: Restore dependencies using Nuget
run: nuget restore src\client.sln -Verbosity Normal -NonInteractive -ConfigFile src/nuget.config
- name: dotnet Publish for ${{ matrix.mode }}
run: dotnet publish src\dsc\dsc.csproj -c Release -r ${{ matrix.mode }} --no-restore --self-contained false --verbosity normal
- name: Build endpointmanagerlauncher
if: ${{ matrix.mode == 'win-x64' || matrix.mode == 'win-arm64'}}
run: dotnet publish src\EndpointManagerLauncher\endpointmanagerlauncher.csproj -r ${{ matrix.mode }} -c Release --no-restore
81 changes: 55 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,26 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
mode: [osx-x64,linux-x64,win-x64]
mode: [osx-x64,linux-x64,win-x64,win-arm64,osx-arm64,linux-arm64]
hsubramanianaks marked this conversation as resolved.
Show resolved Hide resolved
Tatsinnit marked this conversation as resolved.
Show resolved Hide resolved
include:
- mode: osx-x64
kubectlUrl: 'https://dl.k8s.io/release/v1.27.3/bin/darwin/amd64/kubectl'
kubectlPath: 'osx\kubectl'
- mode: linux-x64
kubectlUrl: 'https://dl.k8s.io/release/v1.27.3/bin/linux/amd64/kubectl'
kubectlPath: 'linux\kubectl'
- mode: win-x64
kubectlUrl: 'https://dl.k8s.io/release/v1.27.3/bin/windows/amd64/kubectl.exe'
kubectlPath: 'win\kubectl.exe'
- mode: win-arm64
kubectlUrl: 'https://dl.k8s.io/release/v1.27.3/bin/windows/arm64/kubectl.exe'
kubectlPath: 'win\kubectl.exe'
- mode: osx-arm64
kubectlUrl: 'https://dl.k8s.io/release/v1.27.3/bin/darwin/arm64/kubectl'
kubectlPath: 'osx\kubectl'
- mode: linux-arm64
kubectlUrl: 'https://dl.k8s.io/release/v1.27.3/bin/linux/arm64/kubectl'
kubectlPath: 'linux\kubectl'
steps:
- uses: actions/checkout@v3
- name: Setup .NET
Expand All @@ -20,41 +39,24 @@ jobs:
- name: dotnet Publish for ${{ matrix.mode }}
run: dotnet publish src\dsc\dsc.csproj -c Release -r ${{ matrix.mode }} --no-restore --self-contained true --verbosity normal
- name: Build endpointmanagerlauncher
run: dotnet publish src\EndpointManagerLauncher\endpointmanagerlauncher.csproj -r win-x64 -c Release --no-restore
if: ${{ matrix.mode == 'win-x64' || matrix.mode == 'win-arm64'}}
run: dotnet publish src\EndpointManagerLauncher\endpointmanagerlauncher.csproj -r ${{ matrix.mode }} -c Release --no-restore
- name: Copy endpointmanagerlauncher
uses: Azure/powershell@v1
if: ${{ matrix.mode == 'win-x64' }}
if: ${{ matrix.mode == 'win-x64' || matrix.mode == 'win-arm64'}}
with:
inlineScript: |
Copy-Item -Path ${{ github.workspace }}\src\EndpointManagerLauncher\bin\Release\net7.0\win-x64\publish\ -Destination ${{ github.workspace }}\src\dsc\bin\Release\net7.0\win-x64\publish\EndpointManagerLauncher -Recurse -Exclude **/*.pdb
Copy-Item -Path ${{ github.workspace }}\src\EndpointManagerLauncher\bin\Release\net7.0\${{ matrix.mode }}\publish\ -Destination ${{ github.workspace }}\src\dsc\bin\Release\net7.0\${{ matrix.mode }}\publish\EndpointManagerLauncher -Recurse -Exclude **/*.pdb
azPSVersion: '3.1.0'
- name: Download Kubectl
uses: Azure/powershell@v1
with:
inlineScript: |
if ('${{ matrix.mode }}' -eq 'win-x64') {
$url = 'https://storage.googleapis.com/kubernetes-release/release/v1.21.2/bin/windows/amd64/kubectl.exe'
$dir = 'win'
$file = 'kubectl.exe'
} elseif ('${{ matrix.mode }}' -eq 'osx-x64') {
$url = 'https://storage.googleapis.com/kubernetes-release/release/v1.21.2/bin/darwin/amd64/kubectl'
$dir = 'osx'
$file = 'kubectl'
} else {
$url = 'https://storage.googleapis.com/kubernetes-release/release/v1.21.2/bin/linux/amd64/kubectl'
$dir = 'linux'
$file = 'kubectl'
}
Write-Output "url is: "$url
Write-Output "directory is: "$dir
Write-Output "file is: "$file
New-Item -Path '${{ github.workspace }}\src\dsc\bin\Release\net7.0\${{ matrix.mode }}\publish\kubectl' -ItemType Directory
$filePath = '${{ github.workspace }}\src\dsc\bin\Release\net7.0\${{ matrix.mode }}\publish\kubectl\'+$dir
Write-Output "file path is: "$filePath
New-Item -Path $filePath -ItemType Directory
$fileName = $filePath + '\' + $file
Write-Output "file name is: "$fileName
curl.exe $url -o $fileName
$kubectlPath = '${{ github.workspace }}\src\dsc\bin\Release\net7.0\${{ matrix.mode }}\publish\kubectl\${{ matrix.kubectlPath }}'
$kubectlDir = Split-Path $kubectlPath
New-Item -Path $kubectlDir -ItemType Directory
curl.exe $url -o $kubectlPath
azPSVersion: '3.1.0'
- name: Create .Zip files (${{ matrix.mode }})
uses: TheDoctor0/zip-release@0.6.2
Expand Down Expand Up @@ -99,6 +101,15 @@ jobs:
asset_path: ${{ github.workspace }}/lpk-win-x64/lpk-win-x64.zip
asset_name: lpk-win.zip
asset_content_type: application/zip
- name: Upload Window ARM64 Release Assets
hsubramanianaks marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/lpk-win-arm64/lpk-win-arm64.zip
asset_name: lpk-win-arm64.zip
asset_content_type: application/zip
- name: Upload Linux Release Assets
uses: actions/upload-release-asset@v1
env:
Expand All @@ -108,6 +119,15 @@ jobs:
asset_path: ${{ github.workspace }}/lpk-linux-x64/lpk-linux-x64.zip
asset_name: lpk-linux.zip
asset_content_type: application/zip
- name: Upload Linux ARM64 Release Assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/lpk-linux-arm64/lpk-linux-arm64.zip
asset_name: lpk-linux-arm64.zip
asset_content_type: application/zip
- name: Upload OSX Release Assets
uses: actions/upload-release-asset@v1
env:
Expand All @@ -117,3 +137,12 @@ jobs:
asset_path: ${{ github.workspace }}/lpk-osx-x64/lpk-osx-x64.zip
asset_name: lpk-osx.zip
asset_content_type: application/zip
- name: Upload OSX ARM64 Release Assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/lpk-osx-arm64/lpk-osx-arm64.zip
asset_name: lpk-osx-arm64.zip
asset_content_type: application/zip
Loading
Loading