-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fff5d9e
commit fdd97d7
Showing
3 changed files
with
96 additions
and
12 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 |
---|---|---|
@@ -1,14 +1,31 @@ | ||
freebsd_instance: | ||
image_family: freebsd-13-0 | ||
#freebsd_instance: | ||
# image_family: freebsd-13-0 | ||
# | ||
#task: | ||
# name: test-freebsd-amd64 | ||
# env: | ||
# NERDCTL_RUN_ARGS: --net none knast/freebsd:13-STABLE echo "Nerdctl is up and running." | ||
# install_script: | ||
# - pkg install -y go containerd runj | ||
# - daemon -o containerd.out containerd | ||
# test_script: | ||
# - go test -v ./pkg/... | ||
# - cd cmd/nerdctl | ||
# - sudo go run . run $NERDCTL_RUN_ARGS | grep running | ||
|
||
task: | ||
name: test-freebsd-amd64 | ||
docker_builder: | ||
name: windows | ||
platform: windows | ||
os_version: 2019 | ||
env: | ||
NERDCTL_RUN_ARGS: --net none knast/freebsd:13-STABLE echo "Nerdctl is up and running." | ||
install_script: | ||
- pkg install -y go containerd runj | ||
- daemon -o containerd.out containerd | ||
test_script: | ||
- go test -v ./pkg/... | ||
- cd cmd/nerdctl | ||
- sudo go run . run $NERDCTL_RUN_ARGS | grep running | ||
CGO_ENABLED: 0 | ||
GOTMPDIR: C:\\Windows\\TEMP\\cirrus-ci-build\\gotmp | ||
TEMP: C:\\Windows\\TEMP\\cirrus-ci-build\\tempfiles | ||
build_script: | ||
- mkdir %GOTMPDIR% | ||
- mkdir %TEMP% | ||
- powershell hack/configure-windows-ci.ps1 | ||
- refreshenv | ||
- go install .\cmd\nerdctl\ | ||
- echo %TEMP% | ||
- go test -v -run ^\QTestRunEnvFile\E$ ./cmd/... |
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,60 @@ | ||
$ErrorActionPreference = "Stop" | ||
|
||
#install golang | ||
choco install --limitoutput --no-progress -y golang | ||
refreshenv | ||
|
||
#install containerd | ||
$Version="1.5.7" | ||
curl.exe -L https://github.com/containerd/containerd/releases/download/v$Version/containerd-$Version-windows-amd64.tar.gz -o containerd-windows-amd64.tar.gz | ||
tar xvf containerd-windows-amd64.tar.gz | ||
mkdir -force "$Env:ProgramFiles\containerd" | ||
mv ./bin/* "$Env:ProgramFiles\containerd" | ||
|
||
& $Env:ProgramFiles\containerd\containerd.exe config default | Out-File "$Env:ProgramFiles\containerd\config.toml" -Encoding ascii | ||
& $Env:ProgramFiles\containerd\containerd.exe --register-service | ||
Start-Service containerd | ||
|
||
#configure cni | ||
mkdir -force "$Env:ProgramFiles\containerd\cni\bin" | ||
mkdir -force "$Env:ProgramFiles\containerd\cni\conf" | ||
curl.exe -LO https://github.com/microsoft/windows-container-networking/releases/download/v0.2.0/windows-container-networking-cni-amd64-v0.2.0.zip | ||
Expand-Archive windows-container-networking-cni-amd64-v0.2.0.zip -DestinationPath "$Env:ProgramFiles\containerd\cni\bin" -Force | ||
|
||
curl.exe -LO https://raw.githubusercontent.com/microsoft/SDN/master/Kubernetes/windows/hns.psm1 | ||
ipmo ./hns.psm1 | ||
|
||
# cirrus already has nat net work configured for docker. We can re-use that for testing | ||
$sn=(get-hnsnetwork | ? Name -Like "nat" | select -ExpandProperty subnets) | ||
$subnet=$sn.AddressPrefix | ||
$gateway=$sn.GatewayAddress | ||
@" | ||
{ | ||
"cniVersion": "0.2.0", | ||
"name": "nat", | ||
"type": "nat", | ||
"master": "Ethernet", | ||
"ipam": { | ||
"subnet": "$subnet", | ||
"routes": [ | ||
{ | ||
"gateway": "$gateway" | ||
} | ||
] | ||
}, | ||
"capabilities": { | ||
"portMappings": true, | ||
"dns": true | ||
} | ||
} | ||
"@ | Set-Content "$Env:ProgramFiles\containerd\cni\conf\0-containerd-nat.conf" -Force | ||
|
||
echo "configuration complete! Printing configuration..." | ||
echo "Service:" | ||
get-service containerd | ||
echo "cni configuraiton" | ||
cat "$Env:ProgramFiles\containerd\cni\conf\0-containerd-nat.conf" | ||
ls "$Env:ProgramFiles\containerd\cni\bin" | ||
echo "containerd install" | ||
ls "$Env:ProgramFiles\containerd\" | ||
& "$Env:ProgramFiles\containerd\containerd.exe" --version |
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