From afd71da5a3ee39c49cc28de551f028d11429da3c Mon Sep 17 00:00:00 2001 From: Mashhur Date: Tue, 19 Sep 2023 17:36:01 -0700 Subject: [PATCH] Add a workflow to create an empty plugin placeholder in VPR. --- .../add_plugin_placeholder_in_vpr.yml | 57 +++++++++++++++++++ .github/workflows/reference_docs.yml | 4 +- .github/workflows/vpr.yml | 2 +- .gitignore | 1 + 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/add_plugin_placeholder_in_vpr.yml diff --git a/.github/workflows/add_plugin_placeholder_in_vpr.yml b/.github/workflows/add_plugin_placeholder_in_vpr.yml new file mode 100644 index 000000000..3195cd6ac --- /dev/null +++ b/.github/workflows/add_plugin_placeholder_in_vpr.yml @@ -0,0 +1,57 @@ +name: Adds an empty plugin placeholder in VPR + +on: + workflow_dispatch: + inputs: + plugin_type: + description: 'Type of plugin: input, filter, output or integration' + required: true + default: 'input' + type: string + plugin_name: + description: 'Name for the plugin being created' + required: true + default: '' + type: string + +permissions: + contents: write + pull-requests: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: ruby/setup-ruby@v1 + with: + ruby-version: jruby + - uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + - name: Clone elastic/docs-tools + uses: actions/checkout@v2 + with: + repository: elastic/docs-tools + path: docs-tools + fetch-depth: 1 + - name: Clone elastic/logstash-docs + uses: actions/checkout@v2 + with: + repository: elastic/logstash-docs + path: logstash-docs + ref: versioned_plugin_docs + fetch-depth: 1 + - name: Setup git user + working-directory: ./docs-tools + run: | + git config --global user.email 43502315+logstashmachine@users.noreply.github.com + git config --global user.name logstashmachine + - run: bundle install + working-directory: ./docs-tools + - name: Create an empty placeholder + working-directory: ./docs-tools + run: bundle exec ruby create_plugin_placeholder.rb --output-path=../ --plugin-type=${{ github.event.inputs.plugin_type }} --plugin-name=${{ github.event.inputs.plugin_name }} + env: + JRUBY_OPTS: "-J-Xmx4g" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/reference_docs.yml b/.github/workflows/reference_docs.yml index d9f820450..3b71744da 100644 --- a/.github/workflows/reference_docs.yml +++ b/.github/workflows/reference_docs.yml @@ -1,3 +1,5 @@ +name: "Reference Documentation generation for specified version" + run-name: "Reference Documentation generation for ${{ github.event.inputs.branch }}" on: @@ -24,7 +26,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: '11' + java-version: '17' - name: Clone elastic/docs-tools uses: actions/checkout@v2 with: diff --git a/.github/workflows/vpr.yml b/.github/workflows/vpr.yml index 361bbd245..1a4b91f40 100644 --- a/.github/workflows/vpr.yml +++ b/.github/workflows/vpr.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: '11' + java-version: '17' - name: Clone elastic/docs-tools uses: actions/checkout@v2 with: diff --git a/.gitignore b/.gitignore index acb3a0063..c59c35869 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ docs/html_docs +.idea \ No newline at end of file