Koupleless Runtime CD Test #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Koupleless Runtime CD Test | |
## trigger manually | |
on: | |
workflow_dispatch: | |
# Environment variables available to all jobs and steps in this workflow. | |
env: | |
NAMESPACE: sofaark_test | |
IMAGE: sofa-runtime-cdtest | |
TAG: ${{ github.sha }} | |
permissions: | |
contents: read | |
jobs: | |
ci_test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: maven | |
- name: Set up Docker | |
uses: docker/metadata-action@v3 | |
with: | |
images: | | |
node:14 | |
- name: Checkout adapter Repository | |
uses: actions/checkout@v3 | |
with: | |
repository: 'koupleless/adapter' | |
path: 'adapters' | |
- name: Build adapter and install | |
run: cd adapter && ./script/ci_build.sh 1.8 install | |
- name: get koupleless-runtime version & update koupleless-runtime version for all test sample app | |
run: | | |
koupleless_version=`egrep "<revision.default>([^<]+)</revision.default>" pom.xml |awk -F "revision.default>|</revision.default" '{print $2}'` | |
echo "升级 koupleless-runtime version to $koupleless_version" | |
for testsample in `find samples -name "*-samples"`;do sed -i "s/<koupleless.runtime.version>.*<\/koupleless.runtime.version>/<koupleless.runtime.version>$koupleless_version<\/koupleless.runtime.version>/g" $testsample/pom.xml ;done | |
- name: Test Env prepare | |
run: | | |
sudo apt-get update >>/tmp/envprepare.out | |
sudo apt-get install -y expect >>/tmp/envprepare.out | |
docker pull mongo:7.0.2-jammy | |
docker run --name mongodb -d -p 27017:27017 -v /home/runner/work/data:/data/db mongo:7.0.2-jammy | |
docker pull zookeeper:3.9.0 | |
docker run -p 2181:2181 -it --name zookeeper --restart always -d zookeeper:3.9.0 | |
sudo apt-get install redis-server -y | |
sudo systemctl start redis-server | |
sudo cp samples/ccbin/arkctl /usr/bin/arkctl | |
- name: Run jdk8 serverless runtime test | |
run: | | |
set -e | |
bash samples/ccbin/start.sh jdk8 |