mirror of
https://github.com/rancher/rke.git
synced 2025-09-12 13:18:47 +00:00
Move from drone to GHA for rke 1.4 (#3616)
This commit is contained in:
@@ -6,5 +6,4 @@ cd $(dirname $0)
|
||||
./validate
|
||||
./build
|
||||
./test
|
||||
./integration
|
||||
./package
|
||||
|
@@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
REPO="https://api.github.com/repos/rancher/rancher/actions/workflows/go-get.yml/dispatches"
|
||||
|
||||
case $DRONE_TAG in
|
||||
"v1.4"*)
|
||||
ACTION_TARGET_BRANCH="release/v2.7"
|
||||
;;
|
||||
*)
|
||||
echo "Not a valid tag, not dispatching event"
|
||||
exit 0
|
||||
esac
|
||||
|
||||
echo "DRONE_TAG: $DRONE_TAG"
|
||||
echo "DRONE_COMMIT_AUTHOR: $DRONE_COMMIT_AUTHOR"
|
||||
|
||||
echo "Dispatching to branch ${ACTION_TARGET_BRANCH}"
|
||||
|
||||
# send dispatch event to workflow
|
||||
curl -XPOST -u "${PAT_USERNAME}:${PAT_TOKEN}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Content-Type: application/json" $REPO \
|
||||
--data '{"ref": "'"$ACTION_TARGET_BRANCH"'","inputs":{"goget_module":"github.com/rancher/rke","goget_version":"'"$DRONE_TAG"'","source_author":"'"$DRONE_COMMIT_AUTHOR"'"}}'
|
@@ -18,7 +18,7 @@ function cleanup {
|
||||
echo ""
|
||||
echo_with_time "---- Clean Up RKE ----"
|
||||
for i in ./bin/cluster-*.yml; do
|
||||
./bin/rke remove --dind --force --config $i 2>&1 >/dev/null
|
||||
./bin/rke remove --dind --force --config $i
|
||||
done
|
||||
rm -f ./bin/*.rkestate ./bin/*.yml
|
||||
}
|
||||
|
7
scripts/integration-ci
Executable file
7
scripts/integration-ci
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
./build
|
||||
./integration
|
@@ -10,23 +10,3 @@ SUFFIX=""
|
||||
[ "${ARCH}" != "amd64" ] && SUFFIX="_${ARCH}"
|
||||
|
||||
./scripts/create-releasenote.sh
|
||||
|
||||
cd package
|
||||
|
||||
TAG=${TAG:-${VERSION}${SUFFIX}}
|
||||
REPO=${REPO:-rke}
|
||||
|
||||
if echo $TAG | grep -q dirty; then
|
||||
TAG=dev
|
||||
fi
|
||||
|
||||
if [ -n "$DRONE_TAG" ]; then
|
||||
TAG=$DRONE_TAG
|
||||
fi
|
||||
|
||||
cp ../bin/rke .
|
||||
|
||||
IMAGE=${REPO}/rke:${TAG}
|
||||
docker build -t ${IMAGE} .
|
||||
echo ${IMAGE} > ../dist/images
|
||||
echo Built ${IMAGE}
|
||||
|
Reference in New Issue
Block a user