Skip to content

Commit

Permalink
Merge branch 'main' into dev/multi-platform-images
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix authored Jun 10, 2024
2 parents d5cae30 + ef523c2 commit 0a83116
Show file tree
Hide file tree
Showing 273 changed files with 3,423 additions and 2,535 deletions.
11 changes: 9 additions & 2 deletions .automation/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,11 @@ def build_dockerfile(
)
docker_from += [dockerfile_item]
# ARG
elif dockerfile_item.startswith("ARG"):
elif dockerfile_item.startswith("ARG") or (
len(dockerfile_item.splitlines()) > 1
and dockerfile_item.splitlines()[0].startswith("# renovate: ")
and dockerfile_item.splitlines()[1].startswith("ARG")
):
docker_arg += [dockerfile_item]
# COPY
elif dockerfile_item.startswith("COPY"):
Expand Down Expand Up @@ -423,7 +427,10 @@ def build_dockerfile(
docker_arg_top = []
docker_arg_main = []
for docker_arg_item in docker_arg:
match = re.match(r"ARG\s+([a-zA-Z_][a-zA-Z0-9_]*)\s*=?\s*", docker_arg_item)
match = re.match(
r"(?:# renovate: .*\n)?ARG\s+([a-zA-Z_][a-zA-Z0-9_]*)\s*=?\s*",
docker_arg_item,
)
arg_name = match.group(1)
if arg_name in all_from_instructions:
docker_arg_top += [docker_arg_item]
Expand Down
110 changes: 73 additions & 37 deletions .automation/generated/linter-helps.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .automation/generated/linter-links-previews.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@
"image": null,
"title": "PHP: Hypertext Preprocessor"
},
"php-cs-fixer": {
"description": "PHP Coding Standards Fixer",
"image": null,
"title": "PHP Coding Standards Fixer"
},
"phpcs": {
"description": "PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards. - squizlabs/PHP_CodeSniffer",
"image": "https://avatars2.githubusercontent.com/u/997547?s=400&v=4",
Expand Down
53 changes: 27 additions & 26 deletions .automation/generated/linter-versions.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"actionlint": "1.7.1",
"ansible-lint": "24.2.3",
"ansible-lint": "24.6.0",
"arm-ttk": "0.0.0",
"bandit": "1.7.8",
"bash-exec": "5.2.21",
"bicep_linter": "0.27.1",
"bicep_linter": "0.28.1",
"black": "24.4.2",
"cfn-lint": "0.87.4",
"cfn-lint": "0.87.5",
"checkmake": "0.2.0",
"checkov": "3.2.120",
"checkov": "3.2.130",
"checkstyle": "10.17.0",
"chktex": "1.7.8",
"clang-format": "17.0.5",
Expand All @@ -18,14 +18,14 @@
"coffeelint": "5.2.11",
"cpplint": "1.6.1",
"csharpier": "0.28.2",
"cspell": "8.8.3",
"cspell": "8.8.4",
"dartanalyzer": "0.0.0",
"detekt": "1.23.6",
"devskim": "1.0.33",
"djlint": "1.34.1",
"dockerfilelint": "1.8.0",
"dotenv-linter": "3.3.0",
"dotnet-format": "8.0.105",
"dotnet-format": "8.0.106",
"dustilock": "1.2.0",
"editorconfig-checker": "3.0.1",
"eslint": "8.57.0",
Expand All @@ -34,7 +34,7 @@
"gherkin-lint": "0.0.0",
"git_diff": "2.43.4",
"gitleaks": "8.18.2",
"golangci-lint": "1.59.0",
"golangci-lint": "1.59.1",
"goodcheck": "3.1.0",
"graphql-schema-linter": "3.0.1",
"grype": "0.78.0",
Expand All @@ -45,7 +45,7 @@
"jscpd": "4.0.4",
"jsonlint": "14.0.3",
"kics": "2.0.1",
"ktlint": "1.2.1",
"ktlint": "1.3.0",
"kubeconform": "0.6.6",
"kubescape": "2.9.0",
"kubeval": "0.16.1",
Expand All @@ -62,28 +62,29 @@
"npm-package-json-lint": "7.1.0",
"perlcritic": "1.152",
"php": "7.4.26",
"php-cs-fixer": "3.58.1",
"phpcs": "3.10.1",
"phplint": "9.3.1",
"phpstan": "1.11.3",
"pmd": "7.1.0",
"phpstan": "1.11.4",
"pmd": "7.2.0",
"powershell": "7.4.2",
"powershell_formatter": "7.4.2",
"prettier": "3.2.5",
"prettier": "3.3.1",
"proselint": "0.14.0",
"protolint": "0.49.7",
"protolint": "0.49.8",
"psalm": "Psalm.5.24.0@",
"puppet-lint": "4.2.4",
"pylint": "3.2.2",
"pyright": "1.1.365",
"pylint": "3.2.3",
"pyright": "1.1.366",
"raku": "2020.10",
"remark-lint": "14.0.2",
"revive": "1.3.7",
"roslynator": "0.8.8.0",
"roslynator": "0.8.9.0",
"rst-lint": "1.4.0",
"rstcheck": "6.2.1",
"rstfmt": "0.0.14",
"rubocop": "1.64.1",
"ruff": "0.4.7",
"ruff": "0.4.8",
"scalafix": "0.12.1",
"scss-lint": "0.60.0",
"secretlint": "8.2.4",
Expand All @@ -95,26 +96,26 @@
"shellcheck": "0.10.0",
"shfmt": "3.8.0",
"snakefmt": "0.10.2",
"snakemake": "8.12.0",
"snakemake": "8.13.0",
"spectral": "6.11.1",
"sql-lint": "1.0.0",
"sqlfluff": "3.0.7",
"standard": "17.1.0",
"stylelint": "16.6.1",
"swiftlint": "0.54.0",
"swiftlint": "0.55.1",
"syft": "1.5.0",
"tekton-lint": "1.1.0",
"terraform-fmt": "1.8.4",
"terragrunt": "0.58.12",
"terraform-fmt": "1.8.5",
"terragrunt": "0.58.14",
"terrascan": "1.18.11",
"tflint": "0.51.0",
"trivy": "0.51.4",
"trivy-sbom": "0.51.4",
"trufflehog": "3.77.0",
"tflint": "0.51.1",
"trivy": "0.52.0",
"trivy-sbom": "0.52.0",
"trufflehog": "3.78.0",
"ts-standard": "12.0.2",
"tsqllint": "1.15.3.0",
"v8r": "3.0.0",
"vale": "3.4.2",
"v8r": "3.1.0",
"vale": "3.5.0",
"xmllint": "21108",
"yamllint": "1.35.1"
}
16 changes: 16 additions & 0 deletions .automation/test/php/reports/ERROR-PHP_PHPCSFIXER.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Results of php-cs-fixer linter (version 3.58.1)
See documentation on https://megalinter.io/latest/descriptors/php_php_cs_fixer/
-----------------------------------------------

❌ [ERROR] for workspace /tmp/lint
Linter raw log:
PHP CS Fixer 3.58.1 7th Gear by Fabien Potencier, Dariusz Ruminski and contributors.
PHP runtime: 8.3.7
Running analysis on 1 core sequentially.
You can enable parallel runner and speed up the analysis! Please see https://cs.symfony.com/doc/usage.html for more information.
Loaded config default from "/action/lib/.automation/.php-cs-fixer.dist.php".
Using cache file ".php-cs-fixer.cache".

Files that were not fixed due to errors reported during linting before fixing:
1) ./php_bad_1.php
2) ./php_bad_2.php
44 changes: 44 additions & 0 deletions .automation/test/yaml/bad/yml_bad_01.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#####################
#####################
## Azure Pipelines ##
#####################
#####################

# Error: 6:1 [trailing-spaces] trailing spaces
trigger: main
# Warning: 8:1 [document-start] missing document start "---"

pool:
vmImage: 'ubuntu-latest'
jobs:
- job: Build
# Error: trailing-spaces] trailing spaces

steps:
- task: UseNode@1
inputs:
versionSpec: 12.x
checkLatest: true
empty:
# Error: [indentation] wrong indentation: expected 2 but found 0

- job: Test
steps:

# Error: [empty-lines] too many blank lines (3 > 2)



- script: npm install
# Error: [indentation] wrong indentation: expected 4 but found 2
- script: npm test
- script: echo "Testing!"

# Error: [trailing-spaces] trailing spaces


# Error: [indentation] wrong indentation: expected 4 but found 2
- script: npm test
# Error: [empty-lines] too many blank lines (1 > 0)


28 changes: 28 additions & 0 deletions .automation/test/yaml/bad/yml_bad_02.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#####################
#####################
## GitHub Actions ##
#####################
#####################

# Rule: document-start - Missing document start marker
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest # Rule: trailing-spaces - Trailing spaces are disallowed
steps:
- uses: actions/checkout@v2 # Rule: indentation - Expected 6 spaces but found 5
- name: Run a one-line script # Rule: syntax - Expected <block end>, but found '-'
# Rule: trailing-spaces - Trailing spaces are disallowed
run: echo Hello, world!
- name: Two-line script
run: |
echo Add other actions to build,
echo test
- name: Three-line script
run: |
echo Line 1
echo Line 2 # Rule: indentation - Expected 6 spaces but found 5
echo Line 3 # Rule: trailing-spaces - Trailing spaces are disallowed
# Rule: empty-lines - Too many blank lines (1 > 0)

26 changes: 26 additions & 0 deletions .automation/test/yaml/bad/yml_bad_03.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#####################
#####################
##### GitLab CI #####
#####################
#####################

# Rule: document-start - Missing document start marker
stages:
# Rule: wrong indentation: expected at least 1
- build
- test
build_job:
stage: build
script:
- echo "Building..." # Rule: trailing-spaces - Trailing spaces are disallowed
# Rule: syntax error: expected <block end>, but found '<block sequence start>' (syntax)
- echo "Build complete!" # Rule: empty-lines - Empty lines in a block avoided
test_job:
stage: test
script:
- echo "Testing..."
- # Rule: empty-values - Empty values should be avoided
- echo "Test complete!"
- echo "Another test"
# Rule: empty-lines - Too many blank lines (1 > 0)

40 changes: 40 additions & 0 deletions .automation/test/yaml/bad/yml_bad_04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
########################
########################
## Data Serialization ##
########################
########################

# Rule: document-start - Missing document start marker
# Rule: empty-lines - Too many blank lines (4 > 2)




data:
- id: 1
name: John Doe
- id: 2
name: Jane Smith
- id: 3
- &anchor
foo: bar
# Rule: anchors - found undeclared alias "unknown"
- <<: *unknown
extra: value
- &anchor Foo Bar
- &anchor [item 1, item 2]
- items:
- item1
- item2
name: Alice Johnson # Rule: indentation - Inconsistent indentation
address:
# Rule: trailing-spaces - Trailing spaces are disallowed
street: 123 Main St
city: Anytown
zip: 12345
state: CA
country: USA
garage: { key1: 4, key2: 8 }
phone:
# Rule: empty-lines - Too many blank lines (1 > 0)

23 changes: 23 additions & 0 deletions .automation/test/yaml/bad/yml_bad_05.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
##########################
##########################
## Kubernetes Manifests ##
##########################
##########################

# Rule: document-start - Missing document start marker
apiVersion: v1
kind: Pod
metadata:
name: mypod
spec:
containers:
- name: mycontainer # Rule: indentation - Inconsistent indentation
image: myimage
# Rule: trailing-spaces - Trailing spaces are disallowed
ports:
- containerPort: 80 # Rule: indentation - Inconsistent indentation
- containerPort: 443 # Rule: indentation - Inconsistent indentation
- name: mysidecar
image: sidecarimage
ports:
- containerPort: 8080
25 changes: 25 additions & 0 deletions .automation/test/yaml/bad/yml_bad_06.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#######################
#######################
## Ansible Playbooks ##
#######################
#######################

# Rule: document-start - Missing document start marker
- hosts: localhost
tasks:
- name: Install package
# Rule: trailing-spaces - Trailing spaces are disallowed
apt:
name: nginx
state: present
# syntax error: expected <block end>, but found '<block sequence start>' (syntax)
- name: Start service
service: # Rule: indentation - Inconsistent indentation
name: nginx # Rule: indentation - Inconsistent indentation
state: started # Rule: indentation - Inconsistent indentation
- hosts: all
tasks:
- name: Echo message
command: echo "Hello World"
# Rule: empty-lines - Too many blank lines (1 > 0)

Loading

0 comments on commit 0a83116

Please sign in to comment.