Skip to content

Commit

Permalink
testing PR (#8)
Browse files Browse the repository at this point in the history
* testing PR

* maybe

* oops

* install deps

* testing

* testing

* testing

* testing

* testing

* testing

* testing

* testing

* testing

darn

darn

darn

darn

use actor and local token

use actor and local token

use actor and local token

test with release
  • Loading branch information
EItanya authored Dec 3, 2021
1 parent e4aba4a commit 4ae0c84
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 18 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
jobs:
release-assets:
name: Github Release Assets
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
Expand All @@ -31,10 +31,11 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Upload Assets
run: ls && make upload-github-release-assets
run: make upload-github-release-assets
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
TAGGED_VERSION: ${{ github.event.release.tag_name }}

build-and-push-image:
runs-on: ubuntu-latest
permissions:
Expand All @@ -45,9 +46,21 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker Container
run: make docker-push
env:
TAGGED_VERSION: ${{ github.event.release.tag_name }}
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ SOURCES := $(shell find . -name "*.go" | grep -v test.go)
#----------------------------------------------------------------------------------
# Build Container
#----------------------------------------------------------------------------------

PUSH_CMD:=
docker-build:
# may run into issues with apt-get and the apt.llvm.org repo, in which case use --no-cache to build
# e.g. `docker build --no-cache ./builder -f builder/Dockerfile -t $(HUB)/bumblebee-builder:$(VERSION)
docker build ./builder -f builder/Dockerfile -t $(HUB)/bumblebee-builder:$(VERSION)
docker buildx build --platform linux/amd64,linux/arm64/v8 $(PUSH_CMD) ./builder -f builder/Dockerfile -t $(HUB)/bumblebee-builder:$(VERSION)

docker-push: PUSH_CMD=--push
docker-push: docker-build
docker push $(HUB)/bumblebee-builder:$(VERSION)

#----------------------------------------------------------------------------------
# CLI
Expand Down
22 changes: 11 additions & 11 deletions install_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ else
exit 1
fi

if [ -z "${EBPF_VERSION:-}" ]; then
EBPF_VERSIONS=$(curl -sH"Accept: application/vnd.github.v3+json" https://api.github.com/repos/solo-io/ebpf/releases | any_python -c "import sys; from distutils.version import StrictVersion, LooseVersion; from json import loads as l; releases = l(sys.stdin.read()); releases = [release['tag_name'] for release in releases]; filtered_releases = list(filter(lambda release_string: len(release_string) > 0 and StrictVersion.version_re.match(release_string[1:]) != None, releases)); filtered_releases.sort(key=LooseVersion, reverse=True); print('\n'.join(filtered_releases))")
if [ -z "${BUMBLEBEE_VERSION:-}" ]; then
BUMBLEBEE_VERSIONS=$(curl -sH"Accept: application/vnd.github.v3+json" https://api.github.com/repos/solo-io/bumblebee/releases | any_python -c "import sys; from distutils.version import StrictVersion, LooseVersion; from json import loads as l; releases = l(sys.stdin.read()); releases = [release['tag_name'] for release in releases]; filtered_releases = list(filter(lambda release_string: len(release_string) > 0 and StrictVersion.version_re.match(release_string[1:]) != None, releases)); filtered_releases.sort(key=LooseVersion, reverse=True); print('\n'.join(filtered_releases))")
else
EBPF_VERSIONS="${EBPF_VERSION}"
BUMBLEBEE_VERSIONS="${BUMBLEBEE_VERSION}"
fi

if [ "$(uname -s)" = "Linux" ]; then
Expand All @@ -26,14 +26,14 @@ else
exit 1
fi

for ebpf_version in $EBPF_VERSIONS; do
for BUMBLEBEE_version in $BUMBLEBEE_VERSIONS; do

tmp=$(mktemp -d /tmp/ebpf.XXXXXX)
filename="bee-${OS}-amd64"
url="https://github.com/solo-io/bumblebee/releases/download/${ebpf_version}/${filename}"
url="https://github.com/solo-io/bumblebee/releases/download/${bumblebee_version}/${filename}"

if curl -f ${url} >/dev/null 2>&1; then
echo "Attempting to download bee version ${ebpf_version}"
echo "Attempting to download bee version ${bumblebee_version}"
else
continue
fi
Expand All @@ -56,21 +56,21 @@ fi

(
cd "$HOME"
mkdir -p ".ebpf/bin"
mv "${tmp}/${filename}" ".ebpf/bin/bee"
chmod +x ".ebpf/bin/bee"
mkdir -p ".bumblebee/bin"
mv "${tmp}/${filename}" ".bumblebee/bin/bee"
chmod +x ".bumblebee/bin/bee"
)

rm -r "$tmp"

echo "bee was successfully installed 🎉"
echo ""
echo "Add the eBPF CLI to your path with:"
echo "Add the bumblebee CLI to your path with:"
echo " export PATH=\$HOME/.ebpf/bin:\$PATH"
echo ""
echo "Now run:"
echo " bee init # Initialize simple eBPF program to run with bee"
echo "Please see visit the Gloo Mesh website for more info: https://www.solo.io/products/ebpf/"
echo "Please see visit the bumblebee website for more info: https://www.solo.io/products/bumblebee/"
exit 0
done

Expand Down

0 comments on commit 4ae0c84

Please sign in to comment.