This is an automated email from the ASF dual-hosted git repository.
d4rkstar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openserverless.git
The following commit(s) were added to refs/heads/main by this push:
new b127515 building the operator (#198)
b127515 is described below
commit b1275154421bbb39b60511ea9ce8296daf2dd82c
Author: Michele Sciabarra <[email protected]>
AuthorDate: Sun May 10 10:44:03 2026 +0100
building the operator (#198)
* build from sources the operator
* removed build.sh
* chages
* fixed readme
* build runtimes
---------
Co-authored-by: Trustable User <[email protected]>
---
CHANGES | 4 +++
README.md | 42 ++++++++++++++++------------
Taskfile.yml | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
build.sh | 3 --
runtimes | 2 +-
test.sh | 25 +++++++++++++++++
6 files changed, 146 insertions(+), 21 deletions(-)
diff --git a/CHANGES b/CHANGES
index f351a0d..cb16e5a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,3 +2,7 @@
- archived old readme and dev environment files (moved in attic)
- build from sources compiling the cli (updated the README.md)
+
+# sciabarracom 3 May 2026
+- `Taskfile.yml` for building the operator
+- `test.sh` for a smoke test
\ No newline at end of file
diff --git a/README.md b/README.md
index da673cb..34b1ac0 100644
--- a/README.md
+++ b/README.md
@@ -8,39 +8,47 @@ Welcome to [Apache
OpenServerless](https://openserverless.apache.org), an incu
- If you want to **discuss** with us, join our mailing list sending an email
to `[email protected]`
- If you want to **locally install** open serverless from sources test or
development, read on.
-# Build from sources
+# Build and test from sources
## Prerequisites
- you need an Unix environment, either OSX, Linux or Windows WSL.
-- you need docker availabe on the path
+- you need docker on the path
- you need go available on the path
+- you need task (https://taskfile.dev) available in the path
## Procedure
-Clone all the modules and submodules recursively:
+### 1. Get the sources
-1. `git clone https://github.com/apache/openserverless --recurse-submodules`
+Clone all the modules and submodules recursively
-2. build ops running `./build.sh`
+`git clone https://github.com/apache/openserverless --recurse-submodules`
-3. check ops works executing `./ops -info`
+### 2. Build
-verify that OPS_ROOT is equals to $PWD/olaris, so you can use the tasks from
sources
+First clean everything
-then execute `./ops -t`
+`task clean`
-you should see somethin like this (files and version may vary)
+then build:
-```
-ensuring prerequisite coreutils 0.0.27
-ensuring prerequisite bun 1.2.5
-ensuring prerequisite kubectl 1.33.1
-```
+`task build`
-4. install openserverless in docker with
+This will
+- build the cli
+- build the operator image
+TODO: build the runtimes
+
+3. Smoke test
+
+Execute a basic smoke test
+
+`bash smoke.sh`
+
+4. More tests
+
+TODO: execute locally the full test suite under ./testing
-`./ops setup mini`
-If everything works you end up with a running openserverless in docker
diff --git a/Taskfile.yml b/Taskfile.yml
new file mode 100644
index 0000000..feb41ae
--- /dev/null
+++ b/Taskfile.yml
@@ -0,0 +1,91 @@
+version: 3
+
+vars:
+
+ OPERATOR_IMG:
+ sh: awk -F= '/ARG OPERATOR_IMAGE_DEFAULT=/ { print $2 ; exit }'
olaris-op/Dockerfile
+
+ OPERATOR_TAG:
+ sh: git -C olaris-op rev-parse --short HEAD
+
+ RUNTIMES_TAG:
+ sh: git -C runtimes rev-parse --short HEAD
+
+
+ OPERATOR_SRC: "{{.OPERATOR_IMG}}:{{.OPERATOR_TAG}}"
+
+ OPERATOR_TGT:
+ sh: |
+ B64="$(echo {{.OPERATOR_SRC}} | /usr/bin/base64 -w0 )"
+ echo ~/.ops/{{OS}}-{{ARCH}}/images/kind/$B64
+
+tasks:
+
+ default: task -l
+
+ clean:
+ desc: clean the intermediate artifacts
+ cmds:
+ - rm -vf ./ops ~/.ops/{{OS}}-{{ARCH}}/images/kind/*
+
+ build:
+ desc: build all
+ cmds:
+ - task: cli
+ - task: operator
+ - task: opsroot
+ - task: runtimes
+
+
+ image-save:
+ desc: save an a SRC image in the TGT file
+ requires: { vars: [SRC, TGT]}
+ cmds:
+ - docker save {{.SRC}} -o {{.TGT}}
+
+ cli:
+ desc: build the cli
+ dir: cli
+ cmds:
+ - go build -o ../ops cmd/ops/main.go
+ status:
+ - ! test -e ../ops
+
+ operator:
+ desc: build the operator
+ deps:
+ - cli
+ dir: olaris-op
+ cmds:
+ - echo Building {{.OPERATOR_SRC}}
+ - git tag -d $(git tag) && git tag {{.OPERATOR_TAG}}
+ - task b:build
+ - echo Saving {{.OPERATOR_TGT}}
+ - task: image-save
+ vars:
+ SRC: "{{.OPERATOR_SRC}}"
+ TGT: "{{.OPERATOR_TGT}}"
+ status:
+ - ! test -e "{{.OPERATOR_TGT}}"
+
+ opsroot:
+ desc: build current opsroot.json
+ dir: olaris
+ cmds:
+ - test -e opsroot.orig || jq . <opsroot.json >opsroot.orig
+ - >
+ jq <opsroot.orig >opsroot.json '
+ .config.images = {} |
+ .config.images.operator = "{{.OPERATOR_SRC}}"
+ '
+ - diff opsroot.orig opsroot.json || true
+
+ runtimes:
+ desc: build current runtimes.json
+ dir: runtimes
+ cmds:
+ - git tag -d $(git tag) && git tag {{.RUNTIMES_TAG}}
+ - task build-common
+ - task build
+ - task render-runtimes
+ - cp runtimes.json ../olaris/rutimes.json
diff --git a/build.sh b/build.sh
deleted file mode 100644
index 20ad74d..0000000
--- a/build.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-cd cli
-go build -o ../ops cmd/ops/main.go
-cd ..
\ No newline at end of file
diff --git a/runtimes b/runtimes
index b1c2ce7..fcf25e0 160000
--- a/runtimes
+++ b/runtimes
@@ -1 +1 @@
-Subproject commit b1c2ce7b63e5cec138d1b4ab95986df28cd30132
+Subproject commit fcf25e0e88a0c333ca85794fb165ba00f88b9d36
diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..ba7127c
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -euo pipefail
+
+echo Checking prerequisites
+test -e ./ops
+which docker
+
+echo Cleaning everything
+docker rm -f nuvolaris-control-plane
+
+echo Creating Kind Cluster
+./ops setup docker create
+
+echo Checking Images
+./ops util fr kind-list | grep apache/openserverless
+
+echo Deploying the operator
+
+./ops setup kubernetes permission
+./ops setup kubernetes pre-deploy
+./ops setup kubernetes operator
+
+echo Wait until the operator is up-and-running
+./ops setup kubernetes wait OBJECT=po/nuvolaris-operator-0 COND=true