Skip to content

Commit

Permalink
Rename Windows script (#3904)
Browse files Browse the repository at this point in the history
Rename Windows script Start.ps1 as Start-AntreaAgent.ps1, and rename
Stop.ps1 as Stop-AntreaAgent.ps1.

Signed-off-by: wenyingd <wenyingd@vmware.com>
  • Loading branch information
wenyingd authored Jun 16, 2022
1 parent 51b76ae commit 5b9cde5
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/upload_release_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ jobs:
asset_path: ./assets/antrea-cni.exe
asset_name: antrea-cni-windows-x86_64.exe
asset_content_type: application/octet-stream
- name: Upload Start.ps1
- name: Upload Start-AntreaAgent.ps1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./assets/Start.ps1
asset_name: Start.ps1
asset_path: ./assets/Start-AntreaAgent.ps1
asset_name: Start-AntreaAgent.ps1
asset_content_type: application/octet-stream
6 changes: 3 additions & 3 deletions ci/jenkins/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ function wait_for_antrea_windows_processes_ready {
kubectl get nodes -o wide --no-headers=true | awk -v role="$CONTROL_PLANE_NODE_ROLE" '$3 !~ role && $1 ~ /win/ {print $6}' | while read IP; do
echo "===== Run script to startup Antrea agent ====="
ANTREA_VERSION=$(ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "/cygdrive/c/k/antrea/bin/antrea-agent.exe --version" | awk '{print $3}')
ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "chmod +x /cygdrive/c/k/antrea/Start.ps1 && powershell 'c:\k\antrea\Start.ps1 -AntreaVersion ${ANTREA_VERSION}'"
ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "chmod +x /cygdrive/c/k/antrea/Start-AntreaAgent.ps1 && powershell 'c:\k\antrea\Start-AntreaAgent.ps1 -AntreaVersion ${ANTREA_VERSION}'"
for i in `seq 5`; do
sleep 5
timeout 5s ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "powershell Get-NetAdapter -Name br-int -ErrorAction SilentlyContinue" && break
Expand Down Expand Up @@ -379,8 +379,8 @@ function deliver_antrea_windows {
scp -o StrictHostKeyChecking=no -T bin/antrea-agent.exe Administrator@${IP}:/cygdrive/c/k/antrea/bin/
scp -o StrictHostKeyChecking=no -T bin/antctl.exe Administrator@${IP}:/cygdrive/c/k/antrea/bin/antctl.exe
scp -o StrictHostKeyChecking=no -T bin/antrea-cni.exe Administrator@${IP}:/cygdrive/c/opt/cni/bin/antrea.exe
scp -o StrictHostKeyChecking=no -T hack/windows/Start.ps1 Administrator@${IP}:/cygdrive/c/k/antrea/
scp -o StrictHostKeyChecking=no -T hack/windows/Stop.ps1 Administrator@${IP}:/cygdrive/c/k/antrea/
scp -o StrictHostKeyChecking=no -T hack/windows/Start-AntreaAgent.ps1 Administrator@${IP}:/cygdrive/c/k/antrea/
scp -o StrictHostKeyChecking=no -T hack/windows/Stop-AntreaAgent.ps1 Administrator@${IP}:/cygdrive/c/k/antrea/
scp -o StrictHostKeyChecking=no -T hack/windows/Helper.psm1 Administrator@${IP}:/cygdrive/c/k/antrea/
scp -o StrictHostKeyChecking=no -T build/yamls/windows/base/conf/antrea-cni.conflist Administrator@${IP}:/cygdrive/c/etc/cni/net.d/10-antrea.conflist
scp -o StrictHostKeyChecking=no -T build/yamls/windows/base/conf/antrea-agent.conf Administrator@${IP}:/cygdrive/c/k/antrea/etc
Expand Down
4 changes: 2 additions & 2 deletions docs/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,9 @@ steps. And then run the following commands in powershell.
```powershell
mkdir c:\k\antrea
cd c:\k\antrea
curl.exe -LO https://github.com/antrea-io/antrea/releases/download/<TAG>/Start.ps1
curl.exe -LO https://github.com/antrea-io/antrea/releases/download/<TAG>/Start-AntreaAgent.ps1
# $KubeConfigPath is the path of kubeconfig file
./Start.ps1 -kubeconfig $KubeConfigPath
./Start-AntreaAgent.ps1 -kubeconfig $KubeConfigPath
```

> Note: Some features such as supportbundle collection are not supported in this
Expand Down
2 changes: 1 addition & 1 deletion hack/release/prepare-assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ done
# the windows-bin Makefile target builds antrea-cni and antrea-agent with cgo
# explicitly disabled.
BINDIR="$OUTPUT_DIR" make windows-bin
sed "s/AntreaVersion=\"latest\"/AntreaVersion=\"$VERSION\"/" ./hack/windows/Start.ps1 > "$OUTPUT_DIR"/Start.ps1
sed "s/AntreaVersion=\"latest\"/AntreaVersion=\"$VERSION\"/" ./hack/windows/Start-AntreaAgent.ps1 > "$OUTPUT_DIR"/Start-AntreaAgent.ps1

export IMG_TAG=$VERSION

Expand Down
4 changes: 2 additions & 2 deletions hack/windows/Helper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function Install-AntreaAgent {
$AntreaAgentConfigPath = "$AntreaEtc\antrea-agent.conf"
$AntreaAgent = "$AntreaHome\bin\antrea-agent.exe"
$AntreaCNI = "$CNIPath\antrea.exe"
$StopScript = "$AntreaHome\Stop.ps1"
$StopScript = "$AntreaHome\Stop-AntreaAgent.ps1"
$Owner = "antrea-io"
$Repo = "antrea"

Expand Down Expand Up @@ -108,7 +108,7 @@ function Install-AntreaAgent {
Get-WebFileIfNotExist $AntreaAgent "$AntreaReleaseUrlBase/$AntreaVersion/antrea-agent-windows-x86_64.exe"
Get-WebFileIfNotExist $AntreaCNI "$AntreaReleaseUrlBase/$AntreaVersion/antrea-cni-windows-x86_64.exe"
# Prepare antrea scripts
Get-WebFileIfNotExist $StopScript "$AntreaRawUrlBase/hack/windows/Stop.ps1"
Get-WebFileIfNotExist $StopScript "$AntreaRawUrlBase/hack/windows/Stop-AntreaAgent.ps1"

# Download host-local IPAM plugin
if (!(Test-Path $HostLocalIpam)) {
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 5b9cde5

Please sign in to comment.