This repository was archived by the owner on Apr 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
Change CI paths to varibles #200
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -7,7 +7,7 @@ vpp_ligato_latest_container() | |
{ | ||
IMAGE="ligato/vpp-base:latest" | ||
|
||
cd $USERSPACEDIR | ||
cd ${USERSPACEDIR} | ||
|
||
echo "Changing to latest tag in dockerfile" | ||
sed -i "s|\(FROM\).*\(as builder\)|\1 $IMAGE \2|g" ./docker/userspacecni/Dockerfile | ||
|
@@ -23,13 +23,13 @@ grep -n "$IMAGE" ./ci/vpp_test_setup/vpp_host.sh | |
} | ||
|
||
install_go_kubectl_kind(){ | ||
wget -qO- https://golang.org/dl/go1.20.1.linux-amd64.tar.gz |tar -C /home/runner -xz | ||
export PATH="${PATH}:/home/runner/go/bin" | ||
echo "export PATH=\"${PATH}:/home/runner/go/bin/:home/runner/.local/bin/\"" >>~/.bashrc | ||
wget -qO- https://golang.org/dl/go1.20.1.linux-amd64.tar.gz |tar -C "$HOME" -xz | ||
export PATH="${PATH}:${HOME}/go/bin" | ||
echo "export PATH=\"${PATH}:${HOME}/go/bin/:${HOME}.local/bin/\"" >>~/.bashrc | ||
go install sigs.k8s.io/[email protected] | ||
|
||
wget -q https://dl.k8s.io/release/v1.27.3/bin/linux/amd64/kubectl -O /home/runner/go/bin/kubectl | ||
chmod +x /home/runner/go/bin/kubectl | ||
wget -q https://dl.k8s.io/release/v1.27.3/bin/linux/amd64/kubectl -O "${HOME}/go/bin/kubectl" | ||
chmod +x "${HOME}/go/bin/kubectl" | ||
} | ||
|
||
create_kind_cluster(){ | ||
|
@@ -43,12 +43,14 @@ kubectl get all --all-namespaces | |
|
||
#docker run -itd --device=/dev/hugepages:/dev/hugepages --privileged -v "$(pwd)/docker/vpp-centos-userspace-cni/:/etc/vpp/" --name vpp ligato/vpp-base | ||
sleep 10 | ||
cd /runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/ | ||
cd $USERSPACEDIR | ||
|
||
docker build . -f ./docker/userspacecni/Dockerfile -t userspacecni:latest | ||
# gets path for one directopry above, needed for mkdir with docker cp below | ||
mkdir_var=$(dirname ${USERSPACEDIR}) | ||
kind load docker-image userspacecni | ||
docker exec -i kind-control-plane bash -c "mkdir -p '/runner/_work/userspace-cni-network-plugin/'" | ||
docker cp "/runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/" "kind-control-plane:/runner/_work/userspace-cni-network-plugin/" | ||
docker exec -i kind-control-plane bash -c "mkdir -p $mkdir_var" | ||
docker cp "${USERSPACEDIR}" "kind-control-plane:${USERSPACEDIR}" | ||
} | ||
|
||
deploy_multus(){ | ||
|
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should a default just be set in parent dir instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more modular for end user, allows user to run this script without the others