Skip to content
Merged

0.9.0 #124

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .github/wait.sh

This file was deleted.

42 changes: 20 additions & 22 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,48 @@
# under the License.
#

name: openserverless-operator-check
on:
push:
branches: [main]
name: Check
on:
pull_request:
branches: [main]
workflow_dispatch:

jobs:
check:
name: Check OpenServerless Operator
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v7
with:
submodules: recursive
- name: License
uses: apache/skywalking-eyes@main
- name: License
uses: apache/skywalking-eyes@v0.9.0
- name: Assign TAG
run: |
TAG=$(git rev-parse --short HEAD)
echo "IMG_TAG=$TAG" >> "$GITHUB_ENV"
echo "OPERATOR_TAG=$TAG" >> "$GITHUB_ENV"
- name: Assign Custom Image Name
if: ${{ github.repository_owner != 'apache'}}
- name: Generate .env
run: |
echo "MY_OPERATOR_IMAGE=${{ vars.MY_OPERATOR_IMAGE }}" >> "$GITHUB_ENV"
OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
if [ "$OWNER" = "apache" ]; then
IMAGE=$(awk -F= '/ARG OPERATOR_IMAGE_DEFAULT=/ { print $2 ; exit }' Dockerfile)
else
IMAGE="ghcr.io/$OWNER/openserverless-operator"
fi
echo "GITHUB_USER=$OWNER" > .env
echo "MY_OPERATOR_IMAGE=$IMAGE" >> .env
cat .env
- name: Kind
uses: container-tools/kind-action@v2.0.4
with:
version: v0.22.0
cluster_name: openserverless
config: .github/kind.yaml
- name: Set up Python 3.12
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: 3.12
- name: Setup
Expand All @@ -61,18 +68,9 @@ jobs:
run: task build-and-load
- name: AddIngress
run: task kind:ingress
- name: Ngrok
if: ${{ env.NGROK == 'on' }}
run: bash .github/debug-github-actions.sh
env:
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
USER_PASS: ${{ secrets.USER_PASS }}
- name: Wait
if: ${{ env.NGROK == 'on' }}
run: bash .github/wait.sh
- name: Unit Test
run: task utest
continue-on-error: false
- name: Integration Test
run: task itest
continue-on-error: false
continue-on-error: false
90 changes: 69 additions & 21 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,65 @@
# under the License.
#

name: Build OpenServerless Operator
name: Build Image

on:
push:
tags:
- '[0-9]*'
- '*.*.*.*'
branches-ignore:
- '*'
workflow_dispatch:

jobs:
image:
name: Build OpenServerless Operator Image
runs-on: ubuntu-22.04
permissions:
contents: write
packages: write
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
#- name: Remove unnecessary files
# run: |
# sudo rm -rf /usr/share/dotnet
# sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v7
with:
submodules: recursive
# full history and tags: "task tag" replaces the existing tags
# and "git describe" needs them to be present
fetch-depth: 0
- name: License
uses: apache/skywalking-eyes@main
- name: Assign TAG from pull request
if: ${{ github.event_name == 'pull_request' }}
uses: apache/skywalking-eyes@v0.9.0
# Manual run: create a new snapshot tag on the current HEAD and push it.
# The push of the tag does not start another run (GITHUB_TOKEN pushes do
# not trigger workflows), so this same run goes on and builds it.
- name: Tag HEAD (manual run)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "IMG_TAG=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
# task is installed later by cisetup.sh, get it now
sudo sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
task tag
task ci
- name: Assign TAG from push
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "IMG_TAG=$(git describe --tags --abbrev=0)" >> "$GITHUB_ENV"
#- name: Assign Custom Image Name
# if: ${{ github.repository_owner != 'apache'}}
# run: |
# echo "MY_OPERATOR_IMAGE=ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}" >> "$GITHUB_ENV"
# echo "IMAGE_REGISTRY=ghcr.io" >> "$GITHUB_ENV"
- name: Generate .env
run: |
OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
if [ "$OWNER" = "apache" ]; then
IMAGE=$(awk -F= '/ARG OPERATOR_IMAGE_DEFAULT=/ { print $2 ; exit }' Dockerfile)
else
IMAGE="ghcr.io/$OWNER/openserverless-operator"
fi
echo "GITHUB_USER=$OWNER" > .env
echo "MY_OPERATOR_IMAGE=$IMAGE" >> .env
cat .env
- name: Set up Python 3.12
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: 3.12
- name: Setup
Expand All @@ -74,17 +97,42 @@ jobs:
#- name: Integration Test
# run: task itest
# continue-on-error: false

- name: Select registry
env:
DOCKERHUB_REGISTRY: ${{ secrets.DOCKERHUB_REGISTRY }}
run: |
if [ -n "$DOCKERHUB_REGISTRY" ]; then
REGISTRY="$DOCKERHUB_REGISTRY"
elif [ "${{ github.repository_owner }}" = "apache" ]; then
REGISTRY="docker.io"
else
REGISTRY="ghcr.io"
fi
echo "REGISTRY=$REGISTRY" >> "$GITHUB_ENV"

- name: Select registry credentials
run: |
if [ "${REGISTRY%%/*}" = "ghcr.io" ]; then
echo "REGISTRY_USER=${{ github.actor }}" >> "$GITHUB_ENV"
echo "REGISTRY_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV"
else
echo "REGISTRY_USER=${{ secrets.DOCKERHUB_USER }}" >> "$GITHUB_ENV"
echo "REGISTRY_TOKEN=${{ secrets.DOCKERHUB_TOKEN }}" >> "$GITHUB_ENV"
fi
- name: Registry login
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
with:
registry: 'docker.io'
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
with:
image: tonistiigi/binfmt:qemu-v7.0.0-28
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0

- name: Image
run: task buildx-and-push TAG="$IMG_TAG"
94 changes: 0 additions & 94 deletions .github/workflows/trigger-testing.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ header:
- '**/LICENSE'
- '**/DISCLAIMER'
- '**/NOTICE'
- '**/WARN'
- '**/package-lock.json'
- '**/.*-version'
- '**/*.json'
Expand Down
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ RUN echo "Installing poetry" && \
# Install minimal dependencies
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get update && apt-get install -y --no-install-recommends \
curl gnupg zip unzip && \
curl zip unzip && \
curl -sSL https://install.python-poetry.org | python - && \
cd /home/openserverless && poetry install --no-root --no-interaction --no-ansi && rm -rf $POETRY_CACHE_DIR

Expand Down Expand Up @@ -125,7 +125,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
# Install minimal dependencies
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get update && apt-get install -y --no-install-recommends \
curl gnupg zip unzip && \
curl zip unzip && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
# install kubectl
KVER="v1.23.0" && \
Expand All @@ -137,10 +137,6 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
WSK_VERSION=1.2.0 && \
WSK_BASE=https://github.com/apache/openwhisk-cli/releases/download && \
curl -sL "$WSK_BASE/$WSK_VERSION/OpenWhisk_CLI-$WSK_VERSION-linux-$ARCH.tgz" | tar xzvf - -C /usr/bin/ && \
# install minio
MINIO_BASE=https://dl.min.io/client/mc/release/linux && \
MC_VER=RELEASE.2025-05-21T01-59-54Z && \
curl -sL "$MINIO_BASE-$ARCH/archive/mc.${MC_VER}" -o /usr/bin/mc && chmod +x /usr/bin/mc && \
# install taskfile
curl -sL https://taskfile.dev/install.sh | sh -s -- -d -b /usr/bin

Expand All @@ -157,4 +153,7 @@ RUN poetry install --only main --no-interaction --no-ansi && rm -rf ${POETRY_CAC
RUN mkdir -p /home/openserverless/deploy/whisk-system && \
./whisk-system.sh && \
cd deploy && tar cvf ../deploy.tar *
# Apache release metadata (see DISCLAIMER, LICENSE, NOTICE)
COPY DISCLAIMER LICENSE NOTICE /

CMD ["./run.sh"]
Loading
Loading