From e5009dfa6174478c6a38e23955bce1ea5d771e0f Mon Sep 17 00:00:00 2001 From: Jason Dahlke Date: Tue, 3 Oct 2023 17:27:10 +0000 Subject: [PATCH] run prettier on yaml files --- .github/workflows/cherrypick.yml | 2 +- .github/workflows/codeql-analysis.yml | 12 +- .github/workflows/create-patch-branch.yml | 13 +- .github/workflows/dependency-review.yml | 6 +- .github/workflows/maven-ci.yml | 16 +- .github/workflows/maven-publish.yml | 8 +- .github/workflows/maven-release.yml | 14 +- .github/workflows/maven-version.yml | 6 +- contrib/docker/docker-compose.yml | 2 +- .../elasticsearch/filebeat.agents.docker.yml | 8 +- megalinter-reports/IDE-config.txt | 45 +++++ megalinter-reports/IDE-config/.yamllint.yml | 17 ++ .../linters_logs/ERROR-YAML_YAMLLINT.log | 21 +++ .../linters_logs/SUCCESS-YAML_PRETTIER.log | 5 + .../linters_logs/SUCCESS-YAML_V8R.log | 5 + .../linters_logs/SUCCESS-YAML_YAMLLINT.log | 5 + .../linters_logs/WARNING-YAML_PRETTIER.log | 18 ++ megalinter-reports/megalinter.log | 80 +++++++++ .../.github/workflows/cherrypick.yml | 53 ++++++ .../.github/workflows/codeql-analysis.yml | 72 ++++++++ .../.github/workflows/create-patch-branch.yml | 80 +++++++++ .../.github/workflows/dependency-review.yml | 21 +++ .../.github/workflows/maven-ci.yml | 43 +++++ .../.github/workflows/maven-publish.yml | 39 ++++ .../.github/workflows/maven-release.yml | 170 ++++++++++++++++++ .../.github/workflows/maven-version.yml | 66 +++++++ .../contrib/docker/docker-compose.yml | 40 +++++ .../elasticsearch/filebeat.agents.docker.yml | 19 ++ 28 files changed, 843 insertions(+), 43 deletions(-) create mode 100644 megalinter-reports/IDE-config.txt create mode 100644 megalinter-reports/IDE-config/.yamllint.yml create mode 100644 megalinter-reports/linters_logs/ERROR-YAML_YAMLLINT.log create mode 100644 megalinter-reports/linters_logs/SUCCESS-YAML_PRETTIER.log create mode 100644 megalinter-reports/linters_logs/SUCCESS-YAML_V8R.log create mode 100644 megalinter-reports/linters_logs/SUCCESS-YAML_YAMLLINT.log create mode 100644 megalinter-reports/linters_logs/WARNING-YAML_PRETTIER.log create mode 100644 megalinter-reports/megalinter.log create mode 100644 megalinter-reports/updated_sources/.github/workflows/cherrypick.yml create mode 100644 megalinter-reports/updated_sources/.github/workflows/codeql-analysis.yml create mode 100644 megalinter-reports/updated_sources/.github/workflows/create-patch-branch.yml create mode 100644 megalinter-reports/updated_sources/.github/workflows/dependency-review.yml create mode 100644 megalinter-reports/updated_sources/.github/workflows/maven-ci.yml create mode 100644 megalinter-reports/updated_sources/.github/workflows/maven-publish.yml create mode 100644 megalinter-reports/updated_sources/.github/workflows/maven-release.yml create mode 100644 megalinter-reports/updated_sources/.github/workflows/maven-version.yml create mode 100644 megalinter-reports/updated_sources/contrib/docker/docker-compose.yml create mode 100644 megalinter-reports/updated_sources/contrib/elasticsearch/filebeat.agents.docker.yml diff --git a/.github/workflows/cherrypick.yml b/.github/workflows/cherrypick.yml index 41b4708d75..aa65c95908 100644 --- a/.github/workflows/cherrypick.yml +++ b/.github/workflows/cherrypick.yml @@ -1,7 +1,7 @@ --- name: "Cherry pick commit(s) to a branch" -on: +on: # yamllint disable-line rule:truthy workflow_dispatch: inputs: cherrypick_commits: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index db42707ccc..064623b566 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,7 +19,7 @@ on: # yamllint disable-line rule:truthy # The branches below must be a subset of the branches above branches: [master, release-*] schedule: - - cron: '15 19 * * 1' + - cron: "15 19 * * 1" jobs: analyze: @@ -33,7 +33,7 @@ jobs: strategy: fail-fast: false matrix: - language: ['java', 'javascript'] + language: ["java", "javascript"] # CodeQL supports ['cpp', 'csharp', 'go', 'java', 'javascript', 'python'] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed @@ -47,10 +47,10 @@ jobs: uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) diff --git a/.github/workflows/create-patch-branch.yml b/.github/workflows/create-patch-branch.yml index 89ea478e28..b3bda881b9 100644 --- a/.github/workflows/create-patch-branch.yml +++ b/.github/workflows/create-patch-branch.yml @@ -1,6 +1,7 @@ -name: 'Create a Patch Branch' +--- +name: "Create a Patch Branch" -on: +on: # yamllint disable-line rule:truthy workflow_dispatch: inputs: cherrypick_commits: @@ -9,8 +10,8 @@ on: default: "" env: - JAVA_VERSION: '11' - JAVA_DISTRIBUTION: 'corretto' + JAVA_VERSION: "11" + JAVA_DISTRIBUTION: "corretto" jobs: verify: @@ -38,7 +39,7 @@ jobs: with: java-version: ${{ env.JAVA_VERSION }} distribution: ${{ env.JAVA_DISTRIBUTION }} - cache: 'maven' + cache: "maven" - name: Configure Git user run: | @@ -76,4 +77,4 @@ jobs: uses: ./.github/workflows/cherrypick.yml with: branch: ${{ needs.patch.outputs.branch }} - commits: ${{ github.event.inputs.cherrypick_commits }} \ No newline at end of file + commits: ${{ github.event.inputs.cherrypick_commits }} diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 9ea6004f94..0b31aa58b6 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -5,7 +5,7 @@ # Source repository: https://github.com/actions/dependency-review-action # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement --- -name: 'Dependency Review' +name: "Dependency Review" on: [pull_request] # yamllint disable-line rule:truthy permissions: @@ -15,7 +15,7 @@ jobs: dependency-review: runs-on: ubuntu-latest steps: - - name: 'Checkout Repository' + - name: "Checkout Repository" uses: actions/checkout@v3 - - name: 'Dependency Review' + - name: "Dependency Review" uses: actions/dependency-review-action@v3 diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index bee6302442..e6a4cbe484 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -1,3 +1,4 @@ +--- name: Java CI with Maven on: # yamllint disable-line rule:truthy @@ -8,20 +9,19 @@ on: # yamllint disable-line rule:truthy jobs: build: - name: Standard build on Java ${{ matrix.java }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: - java: ['11'] + java: ["11"] experimental: [false] include: - - java: '15' + - java: "15" experimental: true - - java: '16' + - java: "16" experimental: true - - java: '17' + - java: "17" experimental: true continue-on-error: ${{ matrix.experimental }} @@ -32,9 +32,9 @@ jobs: - name: Configure Java & Maven uses: actions/setup-java@v3 with: - java-version: '${{ matrix.java }}' - cache: 'maven' - distribution: 'corretto' + java-version: "${{ matrix.java }}" + cache: "maven" + distribution: "corretto" - name: Build with Maven run: mvn -B -e -ntp "-Dstyle.color=always" verify diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 2961b6a9e8..3d52c05683 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -1,7 +1,7 @@ # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path --- -name: 'Maven: Publish Packages to GitHub' +name: "Maven: Publish Packages to GitHub" on: # yamllint disable-line rule:truthy workflow_dispatch: @@ -10,8 +10,8 @@ on: # yamllint disable-line rule:truthy # types: [created] env: - JAVA_VERSION: '11' - JAVA_DISTRIBUTION: 'corretto' + JAVA_VERSION: "11" + JAVA_DISTRIBUTION: "corretto" jobs: publish: @@ -27,7 +27,7 @@ jobs: with: java-version: ${{ env.JAVA_VERSION }} distribution: ${{ env.JAVA_DISTRIBUTION }} - cache: 'maven' + cache: "maven" server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - name: Build with Maven diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml index 511b1121a0..e889f3325c 100644 --- a/.github/workflows/maven-release.yml +++ b/.github/workflows/maven-release.yml @@ -1,15 +1,15 @@ # This is a release workflow that leverages the maven release plugin specified in # the pom.xml to perform a release and create a tag of that release version. --- -name: 'Maven: Release' +name: "Maven: Release" on: # yamllint disable-line rule:truthy workflow_dispatch: inputs: release_type: - description: 'Choose the release type' + description: "Choose the release type" required: true - default: 'release' + default: "release" type: choice options: - release @@ -21,8 +21,8 @@ on: # yamllint disable-line rule:truthy default: "" env: - JAVA_VERSION: '11' - JAVA_DISTRIBUTION: 'corretto' + JAVA_VERSION: "11" + JAVA_DISTRIBUTION: "corretto" MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true" jobs: @@ -69,7 +69,7 @@ jobs: uses: actions/setup-java@v3 with: java-version: ${{ env.JAVA_VERSION }} - cache: 'maven' + cache: "maven" distribution: ${{ env.JAVA_DISTRIBUTION }} server-id: github # Value of the distributionManagement/repository/id field of the pom.xml @@ -140,7 +140,7 @@ jobs: with: java-version: ${{ env.JAVA_VERSION }} distribution: ${{ env.JAVA_DISTRIBUTION }} - cache: 'maven' + cache: "maven" - name: Configure Git user run: | diff --git a/.github/workflows/maven-version.yml b/.github/workflows/maven-version.yml index c201ab40d6..6c693c5432 100644 --- a/.github/workflows/maven-version.yml +++ b/.github/workflows/maven-version.yml @@ -11,8 +11,8 @@ on: # yamllint disable-line rule:truthy default: "" env: - JAVA_VERSION: '11' - JAVA_DISTRIBUTION: 'corretto' + JAVA_VERSION: "11" + JAVA_DISTRIBUTION: "corretto" MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true" jobs: @@ -39,7 +39,7 @@ jobs: with: java-version: ${{ env.JAVA_VERSION }} distribution: ${{ env.JAVA_DISTRIBUTION }} - cache: 'maven' + cache: "maven" - name: Configure Git user run: | diff --git a/contrib/docker/docker-compose.yml b/contrib/docker/docker-compose.yml index 69019aee7d..713d16f826 100644 --- a/contrib/docker/docker-compose.yml +++ b/contrib/docker/docker-compose.yml @@ -1,5 +1,5 @@ --- -version: '2' +version: "2" services: emissary-worker-1: diff --git a/contrib/elasticsearch/filebeat.agents.docker.yml b/contrib/elasticsearch/filebeat.agents.docker.yml index ad6edecff0..bf233eacc6 100644 --- a/contrib/elasticsearch/filebeat.agents.docker.yml +++ b/contrib/elasticsearch/filebeat.agents.docker.yml @@ -6,10 +6,10 @@ filebeat.inputs: json.overwrite_keys: true output.elasticsearch: - index: 'emissary-test-%{[agent.version]}-%{+yyyy.MM.dd}' - hosts: 'https://elasticsearch:9200' - username: 'elastic' - password: '${ESPASSWORD}' + index: "emissary-test-%{[agent.version]}-%{+yyyy.MM.dd}" + hosts: "https://elasticsearch:9200" + username: "elastic" + password: "${ESPASSWORD}" ssl.verification_mode: none ssl.certificate: "/etc/tls/http_ca.crt" ssl.key: "/etc/tls/http.key.pem" diff --git a/megalinter-reports/IDE-config.txt b/megalinter-reports/IDE-config.txt new file mode 100644 index 0000000000..7ff07ccbc1 --- /dev/null +++ b/megalinter-reports/IDE-config.txt @@ -0,0 +1,45 @@ +MegaLinter can help you to define the same linter configuration locally + +INSTRUCTIONS + +- Copy the content of IDE-config folder at the root of your repository +- if you are using Visual Studio Code, just reopen your project after the copy, and you will be prompted to install recommended extensions +- If not, you can install extensions manually using the following links. + +IDE EXTENSIONS APPLICABLE TO YOUR PROJECT + +prettier (YAML) + - atom: + - prettier-atom: https://github.com/prettier/prettier-atom + - atom-mprettier: https://github.com/t9md/atom-mprettier + - atom-miniprettier: https://github.com/duailibe/atom-miniprettier + - emacs: + - prettier-emacs: https://github.com/prettier/prettier-emacs + - prettier.el: https://github.com/jscheid/prettier.el + - apheleia: https://github.com/raxod502/apheleia + - idea: + - Prettier: https://plugins.jetbrains.com/plugin/10456-prettier + - sublime: + - JsPrettier: https://packagecontrol.io/packages/JsPrettier + - vim: + - vim-prettier: https://github.com/prettier/vim-prettier + - visual_studio: + - JavaScriptPrettier: https://github.com/madskristensen/JavaScriptPrettier + - vscode: + - prettier-vscode: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode + +v8r (YAML) + - eclipse: + - native support: https://www.eclipse.org/ + - idea: + - native support: https://www.jetbrains.com/products/#type=ide + - vim: + - vison: https://github.com/Quramy/vison + - vscode: + - native support: https://code.visualstudio.com/ + +yamllint (YAML) + - emacs: + - flycheck: https://github.com/krzysztof-magosa/flycheck-yamllint + - vim: + - ale: https://github.com/w0rp/ale diff --git a/megalinter-reports/IDE-config/.yamllint.yml b/megalinter-reports/IDE-config/.yamllint.yml new file mode 100644 index 0000000000..8bb9461140 --- /dev/null +++ b/megalinter-reports/IDE-config/.yamllint.yml @@ -0,0 +1,17 @@ +--- +########################################### +# These are the rules used for # +# linting all the yaml files in the stack # +# NOTE: # +# You can disable line with: # +# # yamllint disable-line # +########################################### +extends: default +rules: + new-lines: + level: warning + type: unix + line-length: + max: 500 + comments: + min-spaces-from-content: 1 # Used to follow prettier standard: https://github.com/prettier/prettier/pull/10926 diff --git a/megalinter-reports/linters_logs/ERROR-YAML_YAMLLINT.log b/megalinter-reports/linters_logs/ERROR-YAML_YAMLLINT.log new file mode 100644 index 0000000000..53a79a8cf0 --- /dev/null +++ b/megalinter-reports/linters_logs/ERROR-YAML_YAMLLINT.log @@ -0,0 +1,21 @@ +Results of yamllint linter (version 1.32.0) +See documentation on https://megalinter.io/7.4.0/descriptors/yaml_yamllint/ +----------------------------------------------- + +❌ [ERROR] for workspace /tmp/lint +Linter raw log: +.github/workflows/cherrypick.yml + 4:1 warning truthy value should be one of [false, true] (truthy) + +.github/workflows/codeql-analysis.yml + 50:9 warning comment not indented like content (comments-indentation) + +.github/workflows/create-patch-branch.yml + 1:1 warning missing document start "---" (document-start) + 3:1 warning truthy value should be one of [false, true] (truthy) + 79:61 error no new line character at the end of file (new-line-at-end-of-file) + +.github/workflows/maven-ci.yml + 1:1 warning missing document start "---" (document-start) + + diff --git a/megalinter-reports/linters_logs/SUCCESS-YAML_PRETTIER.log b/megalinter-reports/linters_logs/SUCCESS-YAML_PRETTIER.log new file mode 100644 index 0000000000..6be4fa1258 --- /dev/null +++ b/megalinter-reports/linters_logs/SUCCESS-YAML_PRETTIER.log @@ -0,0 +1,5 @@ +Results of prettier linter (version 3.0.3) +See documentation on https://megalinter.io/7.4.0/descriptors/yaml_prettier/ +----------------------------------------------- + +✅ [SUCCESS] for workspace /tmp/lint diff --git a/megalinter-reports/linters_logs/SUCCESS-YAML_V8R.log b/megalinter-reports/linters_logs/SUCCESS-YAML_V8R.log new file mode 100644 index 0000000000..56ed48db25 --- /dev/null +++ b/megalinter-reports/linters_logs/SUCCESS-YAML_V8R.log @@ -0,0 +1,5 @@ +Results of v8r linter (version 2.0.0) +See documentation on https://megalinter.io/7.4.0/descriptors/yaml_v8r/ +----------------------------------------------- + +✅ [SUCCESS] for workspace /tmp/lint diff --git a/megalinter-reports/linters_logs/SUCCESS-YAML_YAMLLINT.log b/megalinter-reports/linters_logs/SUCCESS-YAML_YAMLLINT.log new file mode 100644 index 0000000000..44a4ffc412 --- /dev/null +++ b/megalinter-reports/linters_logs/SUCCESS-YAML_YAMLLINT.log @@ -0,0 +1,5 @@ +Results of yamllint linter (version 1.32.0) +See documentation on https://megalinter.io/7.4.0/descriptors/yaml_yamllint/ +----------------------------------------------- + +✅ [SUCCESS] for workspace /tmp/lint diff --git a/megalinter-reports/linters_logs/WARNING-YAML_PRETTIER.log b/megalinter-reports/linters_logs/WARNING-YAML_PRETTIER.log new file mode 100644 index 0000000000..b17752be25 --- /dev/null +++ b/megalinter-reports/linters_logs/WARNING-YAML_PRETTIER.log @@ -0,0 +1,18 @@ +Results of prettier linter (version 3.0.3) +See documentation on https://megalinter.io/7.4.0/descriptors/yaml_prettier/ +----------------------------------------------- + +❌ [ERROR] for workspace /tmp/lint +Linter raw log: +Checking formatting... +[warn] .github/workflows/codeql-analysis.yml +[warn] .github/workflows/create-patch-branch.yml +[warn] .github/workflows/dependency-review.yml +[warn] .github/workflows/maven-ci.yml +[warn] .github/workflows/maven-publish.yml +[warn] .github/workflows/maven-release.yml +[warn] .github/workflows/maven-version.yml +[warn] contrib/docker/docker-compose.yml +[warn] contrib/elasticsearch/filebeat.agents.docker.yml +[warn] Code style issues found in 9 files. Run Prettier to fix. + diff --git a/megalinter-reports/megalinter.log b/megalinter-reports/megalinter.log new file mode 100644 index 0000000000..bf398fa911 --- /dev/null +++ b/megalinter-reports/megalinter.log @@ -0,0 +1,80 @@ +---------------------------------------------------------------------------------------------------- +------------------------------------ MegaLinter, by OX Security ------------------------------------ +---------------------------------------------------------------------------------------------------- + - Image Creation Date: 2023-09-22T15:10:54Z + - Image Revision: a87b2872713c6bdde46d2473c5d7ed23e5752dc2 + - Image Version: v7.4.0 +---------------------------------------------------------------------------------------------------- +The MegaLinter documentation can be found at: + - https://megalinter.io/7.4.0 +---------------------------------------------------------------------------------------------------- +MegaLinter initialization +MegaLinter will analyze workspace [/tmp/lint] + +MARKDOWN_REMARK_LINT has been temporary disabled in MegaLinter, please use a previous MegaLinter version or wait for the next one ! +Skipped linters: ACTION_ACTIONLINT, ANSIBLE_ANSIBLE_LINT, ARM_ARM_TTK, BASH_EXEC, BASH_SHELLCHECK, BASH_SHFMT, BICEP_BICEP_LINTER, CLOJURE_CLJSTYLE, CLOJURE_CLJ_KONDO, CLOUDFORMATION_CFN_LINT, COFFEE_COFFEELINT, COPYPASTE_JSCPD, CPP_CPPLINT, CSHARP_CSHARPIER, CSHARP_DOTNET_FORMAT, CSS_SCSS_LINT, CSS_STYLELINT, C_CPPLINT, DART_DARTANALYZER, DOCKERFILE_HADOLINT, EDITORCONFIG_EDITORCONFIG_CHECKER, ENV_DOTENV_LINTER, GHERKIN_GHERKIN_LINT, GO_GOLANGCI_LINT, GO_REVIVE, GRAPHQL_GRAPHQL_SCHEMA_LINTER, GROOVY_NPM_GROOVY_LINT, HTML_DJLINT, HTML_HTMLHINT, JAVASCRIPT_ES, JAVASCRIPT_PRETTIER, JAVASCRIPT_STANDARD, JAVA_CHECKSTYLE, JAVA_PMD, JSON_ESLINT_PLUGIN_JSONC, JSON_JSONLINT, JSON_NPM_PACKAGE_JSON_LINT, JSON_PRETTIER, JSON_V8R, JSX_ESLINT, KOTLIN_KTLINT, KUBERNETES_HELM, KUBERNETES_KUBECONFORM, KUBERNETES_KUBESCAPE, LATEX_CHKTEX, LUA_LUACHECK, MAKEFILE_CHECKMAKE, MARKDOWN_MARKDOWNLINT, MARKDOWN_MARKDOWN_LINK_CHECK, MARKDOWN_MARKDOWN_TABLE_FORMATTER, MARKDOWN_REMARK_LINT, OPENAPI_SPECTRAL, PERL_PERLCRITIC, PHP_PHPCS, PHP_PHPLINT, PHP_PHPSTAN, PHP_PSALM, POWERSHELL_POWERSHELL, POWERSHELL_POWERSHELL_FORMATTER, PROTOBUF_PROTOLINT, PUPPET_PUPPET_LINT, PYTHON_BANDIT, PYTHON_BLACK, PYTHON_FLAKE8, PYTHON_ISORT, PYTHON_MYPY, PYTHON_PYLINT, PYTHON_PYRIGHT, PYTHON_RUFF, RAKU_RAKU, REPOSITORY_CHECKOV, REPOSITORY_DEVSKIM, REPOSITORY_DUSTILOCK, REPOSITORY_GITLEAKS, REPOSITORY_GIT_DIFF, REPOSITORY_GRYPE, REPOSITORY_KICS, REPOSITORY_SECRETLINT, REPOSITORY_SEMGREP, REPOSITORY_SYFT, REPOSITORY_TRIVY, REPOSITORY_TRIVY_SBOM, REPOSITORY_TRUFFLEHOG, RST_RSTCHECK, RST_RSTFMT, RST_RST_LINT, RUBY_RUBOCOP, RUST_CLIPPY, R_LINTR, SALESFORCE_SFDX_SCANNER_APEX, SALESFORCE_SFDX_SCANNER_AURA, SALESFORCE_SFDX_SCANNER_LWC, SCALA_SCALAFIX, SNAKEMAKE_LINT, SNAKEMAKE_SNAKEFMT, SPELL_CSPELL, SPELL_LYCHEE, SPELL_PROSELINT, SPELL_VALE, SQL_SQLFLUFF, SQL_SQL_LINT, SQL_TSQLLINT, SWIFT_SWIFTLINT, TEKTON_TEKTON_LINT, TERRAFORM_TERRAFORM_FMT, TERRAFORM_TERRAGRUNT, TERRAFORM_TERRASCAN, TERRAFORM_TFLINT, TSX_ESLINT, TYPESCRIPT_ES, TYPESCRIPT_PRETTIER, TYPESCRIPT_STANDARD, VBDOTNET_DOTNET_FORMAT, XML_XMLLINT +To receive reports as email, please set variable EMAIL_REPORTER_EMAIL + +MegaLinter now collects the files to analyse +Listing all files in directory [/tmp/lint], then filter with: +- File extensions: .yaml, .yml +- Excluding regex: .*contrib/helm.* +- Excluding .gitignored files [3731]: .idea/codeStyles/codeStyleConfig.xml, .idea/compiler.xml, .idea/emissary.iml, .idea/encodings.xml, .idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_11.xml, .idea/libraries/Maven__ch_qos_logback_logback_core_1_2_11.xml, .idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_13_4.xml, .idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_13_4.xml, .idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_13_4_2.xml, .idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_jaxb_annotations_2_13_4.xml,…(full list in DEBUG) +Kept [15] files on [4546] found files + ++----MATCHING LINTERS---+------------+----------------+------------+ +| Descriptor | Linter | Criteria | Matching files | Format/Fix | ++------------+----------+------------+----------------+------------+ +| YAML | prettier | .yml|.yaml | 15 | yes | +| YAML | yamllint | .yml|.yaml | 15 | no | +| YAML | v8r | .yml|.yaml | 15 | no | ++------------+----------+------------+----------------+------------+ + +Processing linters on [16] parallel cores… +✅ Linted [YAML] files with [yamllint] successfully - (0.26s) +- Using [yamllint v1.32.0] https://megalinter.io/7.4.0/descriptors/yaml_yamllint +- MegaLinter key: [YAML_YAMLLINT] +- Rules config: [.yamllint.yml] +- Number of files analyzed: [15] + +✅ Linted [YAML] files with [prettier] successfully - (0.49s) +- Using [prettier v3.0.3] https://megalinter.io/7.4.0/descriptors/yaml_prettier +- MegaLinter key: [YAML_PRETTIER] +- Rules config: identified by [prettier] +- Number of files analyzed: [15] + +✅ Linted [YAML] files with [v8r] successfully - (3.93s) +- Using [v8r v2.0.0] https://megalinter.io/7.4.0/descriptors/yaml_v8r +- MegaLinter key: [YAML_V8R] +- Rules config: identified by [v8r] +- Number of files analyzed: [15] + +[Updated Sources Reporter] copied 10 fixed source files in folder /tmp/lint/megalinter-reports/updated_sources. +Download it from artifacts then copy-paste it in your local repo to apply linters updates + ++----SUMMARY-+----------+---------------+-------+-------+--------+--------------+ +| Descriptor | Linter | Mode | Files | Fixed | Errors | Elapsed time | ++------------+----------+---------------+-------+-------+--------+--------------+ +| ✅ YAML | prettier | list_of_files | 15 | 10 | 0 | 0.49s | +| ✅ YAML | v8r | list_of_files | 15 | | 0 | 3.93s | +| ✅ YAML | yamllint | list_of_files | 15 | | 0 | 0.26s | ++------------+----------+---------------+-------+-------+--------+--------------+ + +You could have same capabilities but better runtime performances if you use a MegaLinter flavor: +- [ci_light] oxsecurity/megalinter/flavors/ci_light@v7 (22 linters) https://megalinter.io/7.4.0/flavors/ci_light/ +- [documentation] oxsecurity/megalinter/flavors/documentation@v7 (51 linters) https://megalinter.io/7.4.0/flavors/documentation/ +- [ruby] oxsecurity/megalinter/flavors/ruby@v7 (51 linters) https://megalinter.io/7.4.0/flavors/ruby/ +- [rust] oxsecurity/megalinter/flavors/rust@v7 (51 linters) https://megalinter.io/7.4.0/flavors/rust/ +- [swift] oxsecurity/megalinter/flavors/swift@v7 (51 linters) https://megalinter.io/7.4.0/flavors/swift/ +- [go] oxsecurity/megalinter/flavors/go@v7 (53 linters) https://megalinter.io/7.4.0/flavors/go/ +- [php] oxsecurity/megalinter/flavors/php@v7 (54 linters) https://megalinter.io/7.4.0/flavors/php/ +- [salesforce] oxsecurity/megalinter/flavors/salesforce@v7 (54 linters) https://megalinter.io/7.4.0/flavors/salesforce/ +- [java] oxsecurity/megalinter/flavors/java@v7 (55 linters) https://megalinter.io/7.4.0/flavors/java/ +- [terraform] oxsecurity/megalinter/flavors/terraform@v7 (55 linters) https://megalinter.io/7.4.0/flavors/terraform/ +- [javascript] oxsecurity/megalinter/flavors/javascript@v7 (60 linters) https://megalinter.io/7.4.0/flavors/javascript/ +- [python] oxsecurity/megalinter/flavors/python@v7 (62 linters) https://megalinter.io/7.4.0/flavors/python/ +- [dotnet] oxsecurity/megalinter/flavors/dotnet@v7 (63 linters) https://megalinter.io/7.4.0/flavors/dotnet/ +- [dotnetweb] oxsecurity/megalinter/flavors/dotnetweb@v7 (72 linters) https://megalinter.io/7.4.0/flavors/dotnetweb/ +- [cupcake] oxsecurity/megalinter/flavors/cupcake@v7 (85 linters) https://megalinter.io/7.4.0/flavors/cupcake/ + +✅ Successfully linted all files without errors diff --git a/megalinter-reports/updated_sources/.github/workflows/cherrypick.yml b/megalinter-reports/updated_sources/.github/workflows/cherrypick.yml new file mode 100644 index 0000000000..aa65c95908 --- /dev/null +++ b/megalinter-reports/updated_sources/.github/workflows/cherrypick.yml @@ -0,0 +1,53 @@ +--- +name: "Cherry pick commit(s) to a branch" + +on: # yamllint disable-line rule:truthy + workflow_dispatch: + inputs: + cherrypick_commits: + description: "List of space delimited commits to cherry pick" + required: false + default: "" + workflow_call: + inputs: + branch: + required: true + type: string + commits: + required: true + type: string + +jobs: + cherry_pick: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Set env + run: | + echo "CHERRYPICK_COMMITS=$([ -n "${{ inputs.commits }}" ] && echo "${{ inputs.commits }}" || echo "${{ github.event.inputs.cherrypick_commits }}")" >> "$GITHUB_ENV" + echo "BRANCH=$([ -n "${{ inputs.branch }}" ] && echo "${{ inputs.branch }}" || echo "${{ github.ref_name }}")" >> "$GITHUB_ENV" + + - name: Check for protected branch + if: ${{ env.BRANCH == 'master' }} + run: | + echo "Cannot cherry pick to protected branch" + exit 1 + + - name: Check for commit(s) + if: ${{ env.CHERRYPICK_COMMITS == '' }} + run: | + echo "No commits specified to cherry pick" + exit 1 + + - name: Checkout repo + uses: actions/checkout@v3.3.0 + + - name: Cherry pick to patch branch + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + git fetch --all + git switch ${{ env.BRANCH }} + git cherry-pick ${{ env.CHERRYPICK_COMMITS }} + git push -u origin ${{ env.BRANCH }} diff --git a/megalinter-reports/updated_sources/.github/workflows/codeql-analysis.yml b/megalinter-reports/updated_sources/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000000..064623b566 --- /dev/null +++ b/megalinter-reports/updated_sources/.github/workflows/codeql-analysis.yml @@ -0,0 +1,72 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +--- +name: "CodeQL" + +on: # yamllint disable-line rule:truthy + push: + branches: [master, release-*] + pull_request: + # The branches below must be a subset of the branches above + branches: [master, release-*] + schedule: + - cron: "15 19 * * 1" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["java", "javascript"] + # CodeQL supports ['cpp', 'csharp', 'go', 'java', 'javascript', 'python'] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v3.3.0 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + # - run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/megalinter-reports/updated_sources/.github/workflows/create-patch-branch.yml b/megalinter-reports/updated_sources/.github/workflows/create-patch-branch.yml new file mode 100644 index 0000000000..b3bda881b9 --- /dev/null +++ b/megalinter-reports/updated_sources/.github/workflows/create-patch-branch.yml @@ -0,0 +1,80 @@ +--- +name: "Create a Patch Branch" + +on: # yamllint disable-line rule:truthy + workflow_dispatch: + inputs: + cherrypick_commits: + description: "List of space delimited commits to cherry pick" + required: false + default: "" + +env: + JAVA_VERSION: "11" + JAVA_DISTRIBUTION: "corretto" + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - name: Check patch release type is using correct branch + if: ${{ !startsWith(github.ref_name, 'release/') }} + run: | + echo "Cannot create a patch branch, please target a branch the starts with 'release/'" + exit 1 + + patch: + needs: verify + runs-on: ubuntu-latest + permissions: + contents: write + outputs: + branch: ${{ steps.set_output.outputs.patch_branch }} + steps: + - name: Checkout repo + uses: actions/checkout@v3.3.0 + + - name: Set up JDK ${{ env.JAVA_VERSION }} + uses: actions/setup-java@v3 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRIBUTION }} + cache: "maven" + + - name: Configure Git user + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + + - name: Get the version + run: | + echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | grep -v '\[.*' )" >> "$GITHUB_ENV" + echo "PATCH_BRANCH=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | grep -v '\[.*' | awk -F. '{print "patch/"$1"."$2".x"}')" >> "$GITHUB_ENV" + + - id: set_output + run: echo "patch_branch=${{ env.PATCH_BRANCH }}" >> "$GITHUB_OUTPUT" + + - name: Fail for milestone versions + if: ${{ contains(env.PROJECT_VERSION, '-M') }} + run: | + echo "Cannot create a patch branch on a milestone release" + exit 1 + + - name: Branch that patch + run: git switch -c ${{ env.PATCH_BRANCH }} + + - name: Set the patch version + run: | + mvn -B -V -e -ntp versions:set -DnextSnapshot=true + mvn -B -V -e -ntp versions:commit + git add . + git commit -m "[github-actions](${{ github.actor }}) prepare for next patch iteration" + git push -u origin ${{ env.PATCH_BRANCH }} + + cherry_pick: + if: ${{ github.event.inputs.cherrypick_commits != '' }} + needs: patch + uses: ./.github/workflows/cherrypick.yml + with: + branch: ${{ needs.patch.outputs.branch }} + commits: ${{ github.event.inputs.cherrypick_commits }} diff --git a/megalinter-reports/updated_sources/.github/workflows/dependency-review.yml b/megalinter-reports/updated_sources/.github/workflows/dependency-review.yml new file mode 100644 index 0000000000..0b31aa58b6 --- /dev/null +++ b/megalinter-reports/updated_sources/.github/workflows/dependency-review.yml @@ -0,0 +1,21 @@ +# Dependency Review Action +# +# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. +# +# Source repository: https://github.com/actions/dependency-review-action +# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement +--- +name: "Dependency Review" +on: [pull_request] # yamllint disable-line rule:truthy + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: "Checkout Repository" + uses: actions/checkout@v3 + - name: "Dependency Review" + uses: actions/dependency-review-action@v3 diff --git a/megalinter-reports/updated_sources/.github/workflows/maven-ci.yml b/megalinter-reports/updated_sources/.github/workflows/maven-ci.yml new file mode 100644 index 0000000000..e6a4cbe484 --- /dev/null +++ b/megalinter-reports/updated_sources/.github/workflows/maven-ci.yml @@ -0,0 +1,43 @@ +--- +name: Java CI with Maven + +on: # yamllint disable-line rule:truthy + push: + branches: [master, release/**, patch/**] + pull_request: + branches: [master, release/**, patch/**] + +jobs: + build: + name: Standard build on Java ${{ matrix.java }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: ["11"] + experimental: [false] + include: + - java: "15" + experimental: true + - java: "16" + experimental: true + - java: "17" + experimental: true + continue-on-error: ${{ matrix.experimental }} + + steps: + - name: Checkout repo + uses: actions/checkout@v3.3.0 + + - name: Configure Java & Maven + uses: actions/setup-java@v3 + with: + java-version: "${{ matrix.java }}" + cache: "maven" + distribution: "corretto" + + - name: Build with Maven + run: mvn -B -e -ntp "-Dstyle.color=always" verify + + - name: Verify Changed Files + run: contrib/ci/detect-changes.sh diff --git a/megalinter-reports/updated_sources/.github/workflows/maven-publish.yml b/megalinter-reports/updated_sources/.github/workflows/maven-publish.yml new file mode 100644 index 0000000000..3d52c05683 --- /dev/null +++ b/megalinter-reports/updated_sources/.github/workflows/maven-publish.yml @@ -0,0 +1,39 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path +--- +name: "Maven: Publish Packages to GitHub" + +on: # yamllint disable-line rule:truthy + workflow_dispatch: +# Release trigger does not work because the release job uses GITHUB_TOKEN +# release: +# types: [created] + +env: + JAVA_VERSION: "11" + JAVA_DISTRIBUTION: "corretto" + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK ${{ env.JAVA_VERSION }} + uses: actions/setup-java@v3 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRIBUTION }} + cache: "maven" + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + + - name: Build with Maven + run: mvn -B -e -ntp package + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -Pgithub-publish -DskipTests + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/megalinter-reports/updated_sources/.github/workflows/maven-release.yml b/megalinter-reports/updated_sources/.github/workflows/maven-release.yml new file mode 100644 index 0000000000..e889f3325c --- /dev/null +++ b/megalinter-reports/updated_sources/.github/workflows/maven-release.yml @@ -0,0 +1,170 @@ +# This is a release workflow that leverages the maven release plugin specified in +# the pom.xml to perform a release and create a tag of that release version. +--- +name: "Maven: Release" + +on: # yamllint disable-line rule:truthy + workflow_dispatch: + inputs: + release_type: + description: "Choose the release type" + required: true + default: "release" + type: choice + options: + - release + - milestone + - patch + release_suffix: + description: "Add a suffix to the release version (-M1)" + required: false + default: "" + +env: + JAVA_VERSION: "11" + JAVA_DISTRIBUTION: "corretto" + MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true" + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - name: Check release is using correct branch + if: ${{ github.event.inputs.release_type == 'release' && github.ref_name != 'master' }} + run: | + echo "Release is not using the correct branch, please target 'master'" + exit 1 + - name: Check milestone release type is using correct branch + if: ${{ github.event.inputs.release_type == 'milestone' && github.ref_name != 'master' }} + run: | + echo "Milestone release is not using the correct branch, please target 'master'" + exit 1 + - name: Check milestone has release suffix + if: ${{ github.event.inputs.release_type == 'milestone' && github.event.inputs.release_suffix == '' }} + run: | + echo "Milestone release is missing a release suffix, i.e. -M1" + exit 1 + - name: Check suffix is not specified for a release or patch + if: ${{ github.event.inputs.release_type != 'milestone' && github.event.inputs.release_suffix != '' }} + run: | + echo "Suffix should only be specified for milestone releases" + exit 1 + - name: Check patch release type is using correct branch + if: ${{ github.event.inputs.release_type == 'patch' && !startsWith(github.ref_name, 'patch/') }} + run: | + echo "Patch release is not using the correct branch, please target a branch that starts with 'patch/'" + exit 1 + + release: + needs: verify + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - name: Checkout repo + uses: actions/checkout@v3.3.0 + + - name: Set up JDK ${{ env.JAVA_VERSION }} + uses: actions/setup-java@v3 + with: + java-version: ${{ env.JAVA_VERSION }} + cache: "maven" + distribution: ${{ env.JAVA_DISTRIBUTION }} + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + + - name: Configure Git user + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + + - name: Get the version + run: echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | grep -v '\[.*' | awk -F- '{print ""$1"${{ github.event.inputs.release_suffix }}"}')" >> "$GITHUB_ENV" + + - name: Branch that release + run: git switch -c release/${{ env.RELEASE_VERSION }} + + - name: Dry run a release with maven + run: | + mvn -B -V -e -ntp release:prepare -DdryRun -DreleaseVersion=${{ env.RELEASE_VERSION }} + mvn -B -V -e -ntp release:clean + + - name: Release that version + run: | + mvn -V -B -e versions:set -DnewVersion=${{ env.RELEASE_VERSION }} -DprocessAllModules -DgenerateBackupPoms=false + mvn -V -B -e versions:set-scm-tag -DnewTag=${{ env.RELEASE_VERSION }} -DgenerateBackupPoms=false + git commit -am "[github_actions](${{ github.actor }}) release ${{ env.RELEASE_VERSION }}" + git tag -a ${{ env.RELEASE_VERSION }} -m "${{ env.RELEASE_VERSION }}" + git push origin release/${{ env.RELEASE_VERSION }} + git push origin ${{ env.RELEASE_VERSION }} + + - name: Build release artifacts + run: mvn -B -V -e -ntp "-Dstyle.color=always" package + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.RELEASE_VERSION }} + release_name: ${{ env.RELEASE_VERSION }} + draft: false + prerelease: false + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -Pgithub-publish -DskipTests + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Delete branch + continue-on-error: true + if: ${{ github.event.inputs.release_type == 'patch' && startsWith(github.ref_name, 'patch/') }} + run: git push origin :${{ github.ref_name }} + + snapshot-bump: + if: ${{ github.event.inputs.release_type == 'release' && github.ref_name == 'master' }} + needs: release + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout repo + uses: actions/checkout@v3.3.0 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRIBUTION }} + cache: "maven" + + - name: Configure Git user + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + + - name: Get the version and set the name of the branch + run: | + NEXT_DEV_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | grep -v '\[.*' | awk -F. '{print ""$1"."$2+1"."$3""}') + echo "NEXT_DEV_VERSION=${NEXT_DEV_VERSION}" >> "$GITHUB_ENV" + echo "PR_BRANCH=action/${NEXT_DEV_VERSION}" >> "$GITHUB_ENV" + + - name: Create a branch + run: git switch -c ${{ env.PR_BRANCH }} + + - name: Set the next snapshot version + run: | + mvn -B -V -e -ntp versions:set -DnewVersion=${{ env.NEXT_DEV_VERSION }} + mvn -B -V -e -ntp versions:commit + git add . + git commit -m "[github-actions](${{ github.actor }}) next development iteration" + git push -u origin ${{ env.PR_BRANCH }} + + - name: Create pull request + run: gh pr create -B master -H ${{ env.PR_BRANCH }} --title 'next development iteration ${{ env.NEXT_DEV_VERSION }}' --body 'Created by GitHub Action' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/megalinter-reports/updated_sources/.github/workflows/maven-version.yml b/megalinter-reports/updated_sources/.github/workflows/maven-version.yml new file mode 100644 index 0000000000..6c693c5432 --- /dev/null +++ b/megalinter-reports/updated_sources/.github/workflows/maven-version.yml @@ -0,0 +1,66 @@ +# Action to manually set the next development version +--- +name: "Maven: Set Next Development Version" + +on: # yamllint disable-line rule:truthy + workflow_dispatch: + inputs: + next_version: + description: "Set the next development version" + required: true + default: "" + +env: + JAVA_VERSION: "11" + JAVA_DISTRIBUTION: "corretto" + MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true" + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - name: Check release ends with snapshot + if: ${{ !endsWith(github.event.inputs.next_version, '-SNAPSHOT') }} + run: | + echo "Invalid input: next development version ${{ github.event.inputs.next_version }} does not end with '-SNAPSHOT'" + exit 1 + snapshot-bump: + needs: verify + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout repo + uses: actions/checkout@v3.3.0 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRIBUTION }} + cache: "maven" + + - name: Configure Git user + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + + - name: Set the name of the branch + run: echo "PR_BRANCH=action/${{ github.event.inputs.next_version }}" >> "$GITHUB_ENV" + + - name: Create a branch + run: git switch -c ${{ env.PR_BRANCH }} + + - name: Set the next snapshot version + run: | + mvn -B -V -e -ntp versions:set -DnewVersion=${{ github.event.inputs.next_version }} + mvn -B -V -e -ntp versions:commit + git add . + git commit -m "[github-actions](${{ github.actor }}) next development iteration" + git push -u origin ${{ env.PR_BRANCH }} + + - name: Create pull request + run: gh pr create -B master -H ${{ env.PR_BRANCH }} --title 'next development iteration ${{ github.event.inputs.next_version }}' --body 'Created by GitHub Action' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/megalinter-reports/updated_sources/contrib/docker/docker-compose.yml b/megalinter-reports/updated_sources/contrib/docker/docker-compose.yml new file mode 100644 index 0000000000..713d16f826 --- /dev/null +++ b/megalinter-reports/updated_sources/contrib/docker/docker-compose.yml @@ -0,0 +1,40 @@ +--- +version: "2" + +services: + emissary-worker-1: + image: emissary + command: server -a 2 -m cluster -p 8001 + ports: + - "8001:8001" + network_mode: host + volumes: + - input:/opt/emissary/target/data + - output-1:/opt/emissary/localoutput + + emissary-worker-2: + image: emissary + command: server -a 2 -m cluster -p 9001 + ports: + - "9001:9001" + network_mode: host + volumes: + - input:/opt/emissary/target/data + - output-2:/opt/emissary/localoutput + + emissary-feeder: + image: emissary + command: feed -p 7001 -i /opt/emissary/target/data/InputData --eatPrefix /opt/emissary/target/data/InputData + ports: + - "7001:7001" + network_mode: host + depends_on: + - emissary-worker-1 + - emissary-worker-2 + volumes: + - input:/opt/emissary/target/data + +volumes: + input: + output-1: + output-2: diff --git a/megalinter-reports/updated_sources/contrib/elasticsearch/filebeat.agents.docker.yml b/megalinter-reports/updated_sources/contrib/elasticsearch/filebeat.agents.docker.yml new file mode 100644 index 0000000000..bf233eacc6 --- /dev/null +++ b/megalinter-reports/updated_sources/contrib/elasticsearch/filebeat.agents.docker.yml @@ -0,0 +1,19 @@ +--- +filebeat.inputs: + - type: log + paths: /var/log/emissary/*.json + json.keys_under_root: true + json.overwrite_keys: true + +output.elasticsearch: + index: "emissary-test-%{[agent.version]}-%{+yyyy.MM.dd}" + hosts: "https://elasticsearch:9200" + username: "elastic" + password: "${ESPASSWORD}" + ssl.verification_mode: none + ssl.certificate: "/etc/tls/http_ca.crt" + ssl.key: "/etc/tls/http.key.pem" + +setup.template: + name: "emissary-test" + pattern: "emissary-test-*"