Skip to content
Open

0.9.0 #216

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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
**/.DS_Store
network-cache/
ops
RELEASE
3 changes: 3 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ header:
copyright-owner: Apache Software Foundation

paths-ignore:
- 'cli'
- 'admin-api'
- 'devcontainer'
- 'olaris'
Expand All @@ -33,7 +34,9 @@ header:
- '**/*.svg'
- '**/*.png'
- '**/*.md'
- '.vscode/**'
- 'LICENSE'
- 'DISCLAIMER'
- 'NOTICE'
- 'CHANGES'
- 'RELEASE'
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ Welcome to [Apache OpenServerless](https://openserverless.apache.org), an incub
# Build and test from sources

> [!WARNING]
> Building from the latest sources in git is **not recommended for production use**. The `main` branch may contain unstable, untested, or incomplete changes. For production deployments, use an official release tarball instead. There are no Apache Software Foundation approved releases yet.
> Building from the latest sources in git is **not recommended for production use**. The `main` branch may contain unstable, untested, or incomplete changes. For production deployments, use an official release tarball instead.

Download a releases tarball or clone all the latest sources with:
Download a releases tarball from the Apache distribution, untar and cd to it:

```
git clone https://github.com/apache/openserverless --recurse-submodules
tar xzvf openserverless-<version>.tar.gz
cd openserverless-<version>
```

or clone the latest sources from the `main` branch or a release branch:

```
git clone --branch <branch> https://github.com/apache/openserverless --recurse-submodules
cd openserverless
```

You can then build and test
You can then build and test as follows.

# Linux

Expand All @@ -42,7 +49,6 @@ You have to install [lima](https://limma-vm.io) (example: brew install lima). Ex

`./build-and-test-mac.sh`


# Development setup

## Prerequisites
Expand Down
61 changes: 53 additions & 8 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@
version: 3

vars:
RELEASE_FROM_DIR: '{{ if regexMatch "v[0-9][^/]+$" (base .TASKFILE_DIR) }}{{ regexFind "v[0-9][^/]+$" (base .TASKFILE_DIR) }}{{ else }}snapshot{{ end }}'
RELEASE:
sh: |
if test -e .git
then git -C olaris-op rev-parse --short HEAD
else
if test -e RELEASE
then cat RELEASE
else echo {{.RELEASE_FROM_DIR}} | tee RELEASE
fi
fi

OPERATOR_TAG: "{{.RELEASE}}"

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
OPERATOR_SRC: "{{.OPERATOR_IMG}}:{{.OPERATOR_TAG}}"

STREAMER_TAG: "{{.OPERATOR_TAG}}"
Expand All @@ -43,7 +54,9 @@ vars:

tasks:

default: task -l
default:
- task -l
- echo release '{{.RELEASE}}'

clean:
desc: clean the intermediate artifacts
Expand Down Expand Up @@ -168,11 +181,11 @@ tasks:
- test -e opsroot.orig || jq . <opsroot.json >opsroot.orig
- >
jq <opsroot.orig >opsroot.json '
.config.images.operator = "{{.OPERATOR_SRC}}" |
.config.images.streamer = "{{.STREAMER_SRC}}" |
.config.images.systemapi = "{{.ADMIN_API_SRC}}" |
.config.images.operator = "{{.OPERATOR_SRC}}" |
.config.images.streamer = "{{.STREAMER_SRC}}" |
.config.images.systemapi = "{{.ADMIN_API_SRC}}" |
.config.images.controller = "{{.CONTROLLER_SRC}}" |
.config.images.invoker = "{{.INVOKER_SRC}}"
.config.images.invoker = "{{.INVOKER_SRC}}"
'
- diff opsroot.orig opsroot.json || true

Expand All @@ -194,9 +207,24 @@ tasks:
fi


gitinit:
desc: initialize git if missing
cmds:
- |
for i in build cli olaris-op runtimes streamer admin-api
do
cd "$i"
if ! test -e .git
then git init 2>/dev/null
git commit -m "init" --allow-empty
fi
cd ..
Comment on lines +216 to +221
done

build:
desc: build all
cmds:
- task: gitinit
- task: opslink
- task: openwhisk
- task: operator
Expand All @@ -215,6 +243,8 @@ tasks:
export OPS_BRANCH="{{.OPS_BRANCH}}"
which ops
ops -info
ops setup docker delete || true
touch .secrets
./all.sh kind

license:
Expand All @@ -225,9 +255,24 @@ tasks:
license-eye header {{.CMD}}
for i in */.licenserc.yaml
do
DIR=$(dirname $i)
DIR="$(dirname $i)"
echo "*** Checking license headers in $DIR"
cd $DIR
license-eye header {{.CMD}}
cd {{.TASKFILE_DIR}}
done

release:
desc: release
requires:
vars: [ V ]
cmds:
- git tag "v{{.V}}"
- echo "v{{.V}}" >RELEASE
- >
{{if eq OS "darwin"}}gtar{{else}}tar{{end}}
-C .. --exclude='.git'
--transform 's,^openserverless,openserverless-v{{.V}},'
-czvf ../openserverless-v{{.V}}-incubating-src.tar.gz
openserverless
- git push --tags
2 changes: 1 addition & 1 deletion build
Submodule build updated 2 files
+3 −2 README.md
+ healthy-import.png
6 changes: 5 additions & 1 deletion build-and-test-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${GOARCH}/kub
sudo install -m 0755 /tmp/kubectl /usr/local/bin/kubectl
rm -f /tmp/kubectl

echo "Installing license-eye"
echo "Installing license-eye"
go install github.com/apache/skywalking-eyes/cmd/license-eye@latest

export PATH="$(go env GOPATH)/bin:/usr/local/bin:$PATH"
Expand All @@ -99,6 +99,10 @@ echo "Building and testing"
cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
git config --global --add safe.directory "$PWD"
git config --global --add safe.directory "$PWD/olaris-op"

git config --global --get user.name >/dev/null || git config --global user.name "Build OpenServerless"
git config --global --get user.email >/dev/null || git config --global user.email "noreply@example.com"

mkdir -p ~/.ssh
task license
task build
Expand Down
2 changes: 1 addition & 1 deletion cli
Submodule cli updated 2 files
+2 −1 .licenserc.yaml
+1 −1 _patches/task
2 changes: 1 addition & 1 deletion olaris
2 changes: 1 addition & 1 deletion testing