Koupleless Runtime Snapshot for 2.0.x #9
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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Koupleless Runtime Snapshot for 2.0.x | |
## https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release | |
## trigger manually | |
on: | |
workflow_dispatch: | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: 'runtime-2.0.x' | |
- name: Set up Docker | |
uses: docker/metadata-action@v3 | |
with: | |
images: | | |
node:14 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven | |
run: mvn clean install -DskipTests -B -U -e | |
- name: Checkout sampletest Repository | |
uses: actions/checkout@v3 | |
with: | |
repository: 'koupleless/samples' | |
path: 'samples' | |
- name: Checkout adapter Repository | |
uses: actions/checkout@v3 | |
with: | |
repository: 'koupleless/adapter' | |
path: 'adapter' | |
- name: Build adapter and install | |
run: cd adapter && ./script/ci_build.sh 17 install | |
- 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 | |
docker pull apache/rocketmq:4.9.7 | |
docker run -d -p 9876:9876 -p 10909:10909 -p 10910:10910 -p 10911:10911 -p 10912:10912 -v $(pwd)/samples/springboot-samples/msg/rocketmq/config/start.sh:/home/rocketmq/rocketmq-4.9.7/bin/start.sh -v $(pwd)/samples/springboot-samples/msg/rocketmq/config/broker.conf:/home/rocketmq/rocketmq-4.9.7/bin/broker.conf apache/rocketmq:4.9.7 sh /home/rocketmq/rocketmq-4.9.7/bin/start.sh | |
sudo apt-get install redis-server -y | |
sudo systemctl start redis-server | |
docker-compose -f samples/springboot3-samples/config/apollo/config/docker-compose.yml up -d | |
sudo cp .github/workflows/ccbin/arkctl /usr/bin/arkctl | |
sudo chmod +x /usr/bin/arkctl | |
- name: get koupleless-runtime version & update koupleless-runtime version for all test sample app | |
run: | | |
koupleless_runtime_version=$(find koupleless-common -name "*.jar" |grep -v source |sed "s/.*koupleless-common-\(.*\).jar/\1/") | |
echo "升级 koupleless-runtime version to $koupleless_runtime_version" | |
for testsample in `find samples \( -name "*3-samples" \)`;do sed -i "s/<koupleless.runtime.version>.*<\/koupleless.runtime.version>/<koupleless.runtime.version>$koupleless_runtime_version<\/koupleless.runtime.version>/g" $testsample/pom.xml ;done | |
for testsample in `find samples \( -name "*3-samples" \)`;do if cat $testsample/pom.xml |grep "<koupleless.runtime.version>"|grep $koupleless_runtime_version;then echo "版本校验通过";else echo "版本校验失败";exit 1;fi;done | |
- name: Run jdk17 serverless runtime test | |
run: | | |
set -e | |
if ! bash .github/workflows/ccbin/start.sh jdk17;then | |
echo "测试失败" | |
exit 1 | |
fi | |
release_for_jdk17: | |
needs: build_and_test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: 'runtime-2.0.x' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase | |
- name: Build with Maven | |
run: mvn --batch-mode deploy -DskipTests -Psnapshot | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
adapter_release_for_jdk17: | |
needs: build_and_test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'koupleless/adapter' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase | |
- name: Build with Maven | |
run: ./script/ci_build.sh 17 snapshot | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |