mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
Update Workflows for build docs and javadocs (#2143)
* Build Docs and Java Docs * Update build preview and release workflows Adds javadocs push Adjusts docs for preview and release * Improve scripts
This commit is contained in:
parent
15a471d79f
commit
d3f7033528
46
.github/workflows/build.yml
vendored
46
.github/workflows/build.yml
vendored
@ -64,6 +64,16 @@ jobs:
|
|||||||
# name: nb-logs
|
# name: nb-logs
|
||||||
# path: logfiles.tgz
|
# path: logfiles.tgz
|
||||||
|
|
||||||
|
- name: generate javadoc
|
||||||
|
run: mvn javadoc:aggregate-jar
|
||||||
|
continue-on-error: false
|
||||||
|
|
||||||
|
- name: upload javadoc
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: javadocs
|
||||||
|
path: target/nosqlbench-*-javadoc.jar
|
||||||
|
|
||||||
- name: export docs
|
- name: export docs
|
||||||
if: success()
|
if: success()
|
||||||
run: nb5/target/nb5 export-docs
|
run: nb5/target/nb5 export-docs
|
||||||
@ -91,11 +101,11 @@ jobs:
|
|||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: exported-docs
|
name: exported-docs
|
||||||
|
path: build-docs
|
||||||
|
|
||||||
- name: overlay docs changes and push
|
- name: overlay docs changes and push
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
mv exported_docs.zip build-docs/.
|
|
||||||
cd build-docs
|
cd build-docs
|
||||||
./doimport.sh
|
./doimport.sh
|
||||||
rm exported_docs.zip
|
rm exported_docs.zip
|
||||||
@ -109,3 +119,37 @@ jobs:
|
|||||||
git commit -m"docs update for $GITHUB_REF"
|
git commit -m"docs update for $GITHUB_REF"
|
||||||
git push
|
git push
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
javadocs:
|
||||||
|
needs: builddocs
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
if: ${{ github.repository == 'nosqlbench/nosqlbench' && github.event_name == 'pull_request' && github.ref_name == 'main' }}
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: checkout javadocs
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: nosqlbench/nosqlbench-javadocs
|
||||||
|
path: javadocs
|
||||||
|
|
||||||
|
- name: download javadocs
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: javadocs
|
||||||
|
path: javadocs
|
||||||
|
|
||||||
|
- name: overlay javadocs changes and push
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
||||||
|
git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
||||||
|
cd javadocs
|
||||||
|
./refresh.sh snapshot
|
||||||
|
git add .
|
||||||
|
CHANGES=$(git status --porcelain 2>/dev/null| wc -l)
|
||||||
|
echo "found $CHANGES to push for javadocs updates"
|
||||||
|
if (( $CHANGES > 0 ))
|
||||||
|
then
|
||||||
|
git commit -m"javadocs update for $GITHUB_REF"
|
||||||
|
git push
|
||||||
|
fi
|
||||||
|
112
.github/workflows/preview.yml
vendored
112
.github/workflows/preview.yml
vendored
@ -49,13 +49,6 @@ jobs:
|
|||||||
- name: install fuse2
|
- name: install fuse2
|
||||||
run: sudo apt install libfuse2
|
run: sudo apt install libfuse2
|
||||||
|
|
||||||
# - name: Cache Maven packages
|
|
||||||
# uses: actions/cache@v4
|
|
||||||
# with:
|
|
||||||
# path: ~/.m2
|
|
||||||
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
||||||
# restore-keys: ${{ runner.os }}-m2
|
|
||||||
|
|
||||||
- name: read versions
|
- name: read versions
|
||||||
id: versions
|
id: versions
|
||||||
run: |
|
run: |
|
||||||
@ -108,15 +101,15 @@ jobs:
|
|||||||
name: binaries
|
name: binaries
|
||||||
path: staging
|
path: staging
|
||||||
|
|
||||||
# - name: generate javadoc
|
- name: generate javadoc
|
||||||
# run: mvn javadoc:aggregate-jar
|
run: mvn javadoc:aggregate-jar
|
||||||
# continue-on-error: false
|
continue-on-error: false
|
||||||
#
|
|
||||||
# - name: upload javadoc
|
- name: upload javadoc
|
||||||
# uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
# with:
|
with:
|
||||||
# name: javadoc
|
name: javadocs
|
||||||
# path: target/nosqlbench-*-javadoc.jar
|
path: target/nosqlbench-*-javadoc.jar
|
||||||
|
|
||||||
- name: prepare release summary
|
- name: prepare release summary
|
||||||
id: prepare_summary
|
id: prepare_summary
|
||||||
@ -213,36 +206,65 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "PREVIEW_VERSION=${{ needs.preview-build.outputs.preview_version }}" >> $GITHUB_ENV
|
echo "PREVIEW_VERSION=${{ needs.preview-build.outputs.preview_version }}" >> $GITHUB_ENV
|
||||||
echo "DOCKER_TAGS=${{ needs.preview-build.outputs.docker_tags }}" >> $GITHUB_ENV
|
echo "DOCKER_TAGS=${{ needs.preview-build.outputs.docker_tags }}" >> $GITHUB_ENV
|
||||||
- name: clone nosqlbench-build-docs
|
|
||||||
run: |
|
|
||||||
git clone https://${{secrets.NBDROID_NAME}}:${{secrets.NBDROID_TOKEN}}@github.com/nosqlbench/nosqlbench-build-docs.git nosqlbench-build-docs
|
|
||||||
cd nosqlbench-build-docs
|
|
||||||
echo "files listing"
|
|
||||||
find .
|
|
||||||
git remote set-url origin https://${{secrets.NBDROID_NAME}}:${{secrets.NBDROID_TOKEN}}@github.com/nosqlbench/nosqlbench-build-docs.git
|
|
||||||
git remote -v
|
|
||||||
|
|
||||||
- name: set CNAME
|
- name: checkout build docs
|
||||||
run: |
|
uses: actions/checkout@v4
|
||||||
echo "builddocs.nosqlbench.io" > nosqlbench-build-docs/site/static/CNAME
|
with:
|
||||||
|
repository: nosqlbench/nosqlbench-build-docs
|
||||||
|
path: build-docs
|
||||||
|
|
||||||
- name: commit changes
|
- name: download exported_docs
|
||||||
run: |
|
uses: actions/download-artifact@v4
|
||||||
cd nosqlbench-build-docs
|
with:
|
||||||
git add exported_docs.zip
|
name: exported-docs
|
||||||
|
path: build-docs
|
||||||
|
|
||||||
- name: tag-preview-build
|
- name: overlay docs changes and push
|
||||||
run: |
|
run: |
|
||||||
cd nosqlbench-build-docs
|
set -x
|
||||||
git tag -f ${{ env.PREVIEW_VERSION }}
|
cd build-docs
|
||||||
|
./doimport.sh
|
||||||
|
rm exported_docs.zip
|
||||||
|
git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
||||||
|
git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
||||||
|
git add .
|
||||||
|
git tag -f ${{ env.PREVIEW_VERSION }}
|
||||||
|
git commit -m"docs update for ${{ env.PREVIEW_VERSION }}"
|
||||||
|
git push
|
||||||
|
|
||||||
- name: push changes
|
javadocs:
|
||||||
env:
|
needs: preview-docs
|
||||||
NBDROID_NAME: ${{ secrets.NBDROID_NAME }}
|
runs-on: ubuntu-22.04
|
||||||
NBDROID_TOKEN: ${{ secrets.NBDROID_TOKEN }}
|
steps:
|
||||||
run: |
|
- name: import env vars
|
||||||
set -x
|
run: |
|
||||||
cd nosqlbench-build-docs
|
echo "PREVIEW_VERSION=${{ needs.preview-build.outputs.preview_version }}" >> $GITHUB_ENV
|
||||||
CHANGES=$(git status --porcelain 2>/dev/null| wc -l)
|
echo "DOCKER_TAGS=${{ needs.preview-build.outputs.docker_tags }}" >> $GITHUB_ENV
|
||||||
git push -f --tags
|
|
||||||
echo "push completed"
|
- name: checkout javadocs
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: nosqlbench/nosqlbench-javadocs
|
||||||
|
path: javadocs
|
||||||
|
|
||||||
|
- name: download javadocs
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: javadocs
|
||||||
|
path: javadocs
|
||||||
|
|
||||||
|
- name: overlay javadocs changes and push
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
||||||
|
git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
||||||
|
cd javadocs
|
||||||
|
./refresh.sh preview
|
||||||
|
git add .
|
||||||
|
CHANGES=$(git status --porcelain 2>/dev/null| wc -l)
|
||||||
|
echo "found $CHANGES to push for javadocs updates"
|
||||||
|
if (( $CHANGES > 0 ))
|
||||||
|
then
|
||||||
|
git commit -m"javadocs update for ${{ env.PREVIEW_VERSION }}"
|
||||||
|
git push
|
||||||
|
fi
|
||||||
|
166
.github/workflows/release.yml
vendored
166
.github/workflows/release.yml
vendored
@ -15,11 +15,13 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- "[0-9]+.[0-9]+.[0-9]+-release"
|
- "[0-9]+.[0-9]+.[0-9]+-release"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release-build:
|
release-build:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
outputs:
|
||||||
|
release_version: ${{ steps.versions.outputs.RELEASE_VERSION }}
|
||||||
|
release_version_numeric: ${{ steps.versions.outputs.RELEASE_VERSION_NUMERIC }}
|
||||||
|
docker_tags: ${{ steps.versions.outputs.DOCKER_TAGS }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: checkout repo
|
- name: checkout repo
|
||||||
@ -58,6 +60,7 @@ jobs:
|
|||||||
restore-keys: ${{ runner.os }}-m2
|
restore-keys: ${{ runner.os }}-m2
|
||||||
|
|
||||||
- name: read versions
|
- name: read versions
|
||||||
|
id: versions
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
RELEASE_VERSION=$(scripts/get-release-version.sh)
|
RELEASE_VERSION=$(scripts/get-release-version.sh)
|
||||||
@ -107,15 +110,15 @@ jobs:
|
|||||||
name: binaries
|
name: binaries
|
||||||
path: staging
|
path: staging
|
||||||
|
|
||||||
# - name: generate javadoc
|
- name: generate javadoc
|
||||||
# run: mvn javadoc:aggregate-jar
|
run: mvn javadoc:aggregate-jar
|
||||||
# continue-on-error: false
|
continue-on-error: false
|
||||||
#
|
|
||||||
# - name: upload javadoc
|
- name: upload javadoc
|
||||||
# uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
# with:
|
with:
|
||||||
# name: javadoc
|
name: javadocs
|
||||||
# path: target/nosqlbench-*-javadoc.jar
|
path: target/nosqlbench-*-javadoc.jar
|
||||||
|
|
||||||
- name: bump minor version
|
- name: bump minor version
|
||||||
run: |
|
run: |
|
||||||
@ -191,79 +194,74 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
[a-zA-Z]**/logs/*
|
[a-zA-Z]**/logs/*
|
||||||
|
|
||||||
# javadocs:
|
release-docs:
|
||||||
# needs: release
|
needs: release
|
||||||
# runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
# steps:
|
steps:
|
||||||
# - name: set git username
|
- name: import env vars
|
||||||
# run: git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
run: |
|
||||||
# - name: set git email
|
echo "RELEASE_VERSION=${{ needs.release-build.outputs.release_version }}" >> $GITHUB_ENV
|
||||||
# run: git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
echo "DOCKER_TAGS=${{ needs.release-build.outputs.docker_tags }}" >> $GITHUB_ENV
|
||||||
# - name: download javadocs
|
|
||||||
# uses: actions/download-artifact@v4
|
|
||||||
# with:
|
|
||||||
# name: javadoc
|
|
||||||
# - run: ls -la
|
|
||||||
# - name: unpackage javadoc
|
|
||||||
# run: unzip nosqlbench-*-javadoc.jar
|
|
||||||
# - run: ls -la
|
|
||||||
# - name: Push javadocs
|
|
||||||
# uses: ad-m/github-push-action@master
|
|
||||||
# with:
|
|
||||||
# repository: nosqlbench/nosqlbench-javadoc
|
|
||||||
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# branch: main
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# docs:
|
|
||||||
# needs: release
|
|
||||||
# runs-on: ubuntu-22.04
|
|
||||||
# steps:
|
|
||||||
#
|
|
||||||
# - name: set git username
|
|
||||||
# run: git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
|
||||||
#
|
|
||||||
# - name: set git email
|
|
||||||
# run: git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
|
||||||
#
|
|
||||||
# - name: download guidebook
|
|
||||||
# uses: actions/download-artifact@v1
|
|
||||||
# with:
|
|
||||||
# name: guidebook
|
|
||||||
# path: guidebook
|
|
||||||
#
|
|
||||||
# - run: ls -la
|
|
||||||
#
|
|
||||||
# - name: clone nosqlbench-docs
|
|
||||||
# env:
|
|
||||||
# NBDROID_NAME: ${{ secrets.NBDROID_NAME }}
|
|
||||||
# NBDROID_TOKEN: ${{ secrets.NBDROID_TOKEN }}
|
|
||||||
# run: |
|
|
||||||
# git clone https://${{secrets.NBDROID_NAME}}:${{secrets.NBDROID_TOKEN}}@github.com/nosqlbench/nosqlbench-docs.git nosqlbench-docs
|
|
||||||
# cd nosqlbench-docs
|
|
||||||
# echo "files listing"
|
|
||||||
# find .
|
|
||||||
# git remote set-url origin https://${{secrets.NBDROID_NAME}}:${{secrets.NBDROID_TOKEN}}@github.com/nosqlbench/nosqlbench-docs.git
|
|
||||||
# git remote -v
|
|
||||||
#
|
|
||||||
# Disabling this because it will be replaced soon.
|
|
||||||
# - name: push changes
|
|
||||||
# env:
|
|
||||||
# NBDROID_NAME: ${{ secrets.NBDROID_NAME }}
|
|
||||||
# NBDROID_TOKEN: ${{ secrets.NBDROID_TOKEN }}
|
|
||||||
# run: |
|
|
||||||
# rsync -av --delete guidebook/guidebook/ nosqlbench-docs/docs/
|
|
||||||
# echo "docs.nosqlbench.io" > nosqlbench-docs/docs/CNAME
|
|
||||||
# cd nosqlbench-docs
|
|
||||||
# git add docs
|
|
||||||
# git add -u
|
|
||||||
# CHANGES=$(git status --porcelain 2>/dev/null| wc -l)
|
|
||||||
# echo "found $CHANGES to push for doc updates"
|
|
||||||
# if (( $CHANGES > 0 ))
|
|
||||||
# then
|
|
||||||
# git commit -m"docs update for $GITHUB_REF"
|
|
||||||
# git push
|
|
||||||
# fi
|
|
||||||
|
|
||||||
|
- name: checkout build docs
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: nosqlbench/nosqlbench-build-docs
|
||||||
|
path: build-docs
|
||||||
|
|
||||||
|
- name: download exported_docs
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: exported-docs
|
||||||
|
path: build-docs
|
||||||
|
|
||||||
|
- name: overlay docs changes and push
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
cd build-docs
|
||||||
|
./doimport.sh
|
||||||
|
rm exported_docs.zip
|
||||||
|
git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
||||||
|
git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
||||||
|
git add .
|
||||||
|
git tag -f ${{ env.RELEASE_VERSION }}
|
||||||
|
git commit -m"docs update for ${{ env.RELEASE_VERSION }}"
|
||||||
|
git push
|
||||||
|
|
||||||
|
javadocs:
|
||||||
|
needs: release-docs
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: import env vars
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_VERSION=${{ needs.release-build.outputs.release_version }}" >> $GITHUB_ENV
|
||||||
|
echo "DOCKER_TAGS=${{ needs.release-build.outputs.docker_tags }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: checkout javadocs
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: nosqlbench/nosqlbench-javadocs
|
||||||
|
path: javadocs
|
||||||
|
|
||||||
|
- name: download javadocs
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: javadocs
|
||||||
|
path: javadocs
|
||||||
|
|
||||||
|
- name: overlay javadocs changes and push
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
||||||
|
git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
||||||
|
cd javadocs
|
||||||
|
./refresh.sh release
|
||||||
|
git add .
|
||||||
|
CHANGES=$(git status --porcelain 2>/dev/null| wc -l)
|
||||||
|
echo "found $CHANGES to push for javadocs updates"
|
||||||
|
if (( $CHANGES > 0 ))
|
||||||
|
then
|
||||||
|
git commit -m"javadocs update for ${{ env.RELEASE_VERSION }}"
|
||||||
|
git push
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user