Skip to content
Merged
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
9 changes: 1 addition & 8 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,11 @@ jobs:
submodules: recursive
- name: License
uses: apache/skywalking-eyes@main
- name: Assign TAG from pull request
if: ${{ github.event_name == 'pull_request' }}
- name: Assign TAG
run: |
TAG=$(git rev-parse --short HEAD)
echo "IMG_TAG=$TAG" >> "$GITHUB_ENV"
echo "OPERATOR_TAG=$TAG" >> "$GITHUB_ENV"
- name: Assign TAG from push
if: ${{ github.event_name != 'pull_request' }}
run: |
TAG=$(git describe --tags --abbrev=0)
echo "IMG_TAG=$TAG" >> "$GITHUB_ENV"
echo "OPERATOR_TAG=$TAG" >> "$GITHUB_ENV"
- name: Assign Custom Image Name
if: ${{ github.repository_owner != 'apache'}}
run: |
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ on:
push:
tags:
- '[0-9]*'
branches-ignore:
- '*'
jobs:
image:
name: Build OpenServerless Operator Image
Expand Down Expand Up @@ -87,9 +85,9 @@ jobs:
- name: Registry login
uses: docker/login-action@v3
with:
registry: registry.hub.docker.com
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: ${{ vars.IMAGE_REGISTRY || 'registry.hub.docker.com' }}
username: ${{ secrets.DOCKERHUB_USER || github.actor }}
password: ${{ secrets.DOCKERHUB_TOKEN || secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/trigger-testing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
name: Trigger Testing
run-name: Dispatch operator PR test for ${{ github.event.issue.number || github.event.inputs.pr_number }}

on:
issue_comment:
types: [created]
workflow_dispatch:
inputs:
pr_number:
description: "PR number to test"
required: true
type: string
platform:
description: "Platform to test on (e.g. k3s-amd, eks-amd)"
required: true
type: string

jobs:
dispatch:
name: Dispatch operator-pr-test
runs-on: ubuntu-22.04
# Run on /testing comments from authorized users, or on manual dispatch
if: >-
github.event_name == 'workflow_dispatch' ||
(
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/testing ') &&
contains(fromJSON('["MEMBER","OWNER","COLLABORATOR"]'), github.event.comment.author_association)
)
steps:
- name: Parse comment
id: parse
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "platform=${{ github.event.inputs.platform }}" >> "$GITHUB_OUTPUT"
echo "pr_number=${{ github.event.inputs.pr_number }}" >> "$GITHUB_OUTPUT"
else
COMMENT="${{ github.event.comment.body }}"
PLATFORM="${COMMENT#/testing }"
echo "platform=${PLATFORM}" >> "$GITHUB_OUTPUT"
echo "pr_number=${{ github.event.issue.number }}" >> "$GITHUB_OUTPUT"
fi

- name: Get PR details
id: pr
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ steps.parse.outputs.pr_number }})
echo "ref=$(echo "$PR_JSON" | jq -r '.head.ref')" >> "$GITHUB_OUTPUT"
echo "repo=$(echo "$PR_JSON" | jq -r '.head.repo.full_name')" >> "$GITHUB_OUTPUT"
echo "sha=$(echo "$PR_JSON" | jq -r '.head.sha')" >> "$GITHUB_OUTPUT"

- name: Add reaction to comment
if: github.event_name != 'workflow_dispatch'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions \
-f content=rocket

- name: Dispatch to testing repo
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.OPENSERVERLESS_TESTING_PAT }}
repository: ${{ github.repository_owner }}/openserverless-testing
event-type: operator-pr-test
client-payload: >-
{
"pr_number": "${{ steps.parse.outputs.pr_number }}",
"pr_ref": "${{ steps.pr.outputs.ref }}",
"pr_sha": "${{ steps.pr.outputs.sha }}",
"operator_repo": "${{ steps.pr.outputs.repo }}",
"platform": "${{ steps.parse.outputs.platform }}"
}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "olaris"]
path = olaris
url = https://github.com/apache/openserverless-task.git
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ header:
- '**/license-eye'
- '**/id_rsa*'
- '**/.gitkeep'
- '.gitmodules'
- 'poetry.lock'
- '**/__*'
- '.github/ngrok'
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ADD --chown=nuvolaris:nuvolaris quota.sh /home/nuvolaris/
FROM python:3.12-slim-bullseye AS deps

# --- Install Poetry ---
ARG POETRY_VERSION=1.8.5
ARG POETRY_VERSION=2.3.2
ENV POETRY_HOME=/opt/poetry
ENV POETRY_NO_INTERACTION=1
ENV POETRY_VIRTUALENVS_IN_PROJECT=1
Expand Down
1 change: 1 addition & 0 deletions olaris
Submodule olaris added at 775b72
15 changes: 8 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ PyYAML = "^6.0"
pykube = "^0.15.0"
Jinja2 = "^3.0.3"
requests = "^2.32.4"
flatdict = "^4.0.1"
flatdict = "^4.1.0"
croniter = "^1.3.5"
minio = "^7.1.13"
backoff = "^2.2.1"
Expand Down
Loading