Skip to content

Commit

Permalink
Add yaml examples generation to the release scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwb committed Mar 8, 2025
1 parent 077dbb8 commit b85c949
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build_release_candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ jobs:
echo "............Copying generated yamldoc into beam-site.........."
mkdir -p yamldoc/${{ github.event.inputs.RELEASE }}
cp -r ${BEAM_ROOT_DIR}/sdks/python/build/yaml-ref.html yamldoc/${{ github.event.inputs.RELEASE }}/index.html
cp -r ${BEAM_ROOT_DIR}/sdks/python/build/yaml-eamples.html yamldoc/${{ github.event.inputs.RELEASE }}/examples.html
# Update current symlink to point to the latest release
unlink yamldoc/current | true
ln -s ${{ github.event.inputs.RELEASE }} yamldoc/current
Expand Down
2 changes: 2 additions & 0 deletions release/src/main/scripts/build_release_candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ if [[ $confirmation = "y" ]]; then
cd ${BEAM_ROOT_DIR}
./gradlew :sdks:python:generateYamlDocs -PisRelease
GENERATE_YAMLDOC=~/${LOCAL_WEBSITE_UPDATE_DIR}/${LOCAL_YAML_DOC}/${BEAM_ROOT_DIR}/sdks/python/build/yaml-ref.html
GENERATE_YAMLDOC_EXAMPLES=~/${LOCAL_WEBSITE_UPDATE_DIR}/${LOCAL_YAML_DOC}/${BEAM_ROOT_DIR}/sdks/python/build/yaml-examples.html

echo "------------------Updating Release Docs---------------------"
cd ~/${LOCAL_WEBSITE_UPDATE_DIR}/${LOCAL_WEBSITE_REPO}
Expand Down Expand Up @@ -402,6 +403,7 @@ if [[ $confirmation = "y" ]]; then
echo "............Copying generated yaml docs into beam-site.........."
mkdir -p yamldoc
cp -r ${GENERATE_YAMLDOC} yamldoc/${RELEASE}/index.html
cp -r ${GENERATE_YAMLDOC_EXAMPLES} yamldoc/${RELEASE}/examples.html
# Update current symlink to point to the latest release
unlink yamldoc/current | true
ln -s ${RELEASE} yamldoc/current
Expand Down
3 changes: 2 additions & 1 deletion sdks/python/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ tasks.register("generateYamlDocs") {
exec {
executable 'sh'
args '-c', "${envdir}/bin/pip install $extraPackages && " +
"${envdir}/bin/python -m apache_beam.yaml.generate_yaml_docs --html_file=${buildDir}/yaml-ref.html"
"${envdir}/bin/python -m apache_beam.yaml.generate_yaml_docs --html_file=${buildDir}/yaml-ref.html --examples_file=${buildDir}/yaml-examples"
}
}
outputs.file "${buildDir}/yaml-ref.html"
outputs.file "${buildDir}/yaml-examples.html"
}

tasks.register("yamlIntegrationTests") {
Expand Down

0 comments on commit b85c949

Please sign in to comment.