cici-tools 0.17.0__tar.gz → 0.18.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.gitlab-ci.yml +1 -1
- {cici_tools-0.17.0/cici_tools.egg-info → cici_tools-0.18.0}/PKG-INFO +1 -1
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/_version.py +3 -3
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/config/project/serializers.py +11 -6
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/providers/gitlab/serializers.py +11 -1
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/providers/gitlab/yaml_style.py +12 -3
- {cici_tools-0.17.0 → cici_tools-0.18.0/cici_tools.egg-info}/PKG-INFO +1 -1
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici_tools.egg-info/SOURCES.txt +2 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/pyproject.toml +1 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/requirements.txt +1 -1
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/helm/helm-cm-push.yml +3 -4
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/helm/helm-docs.yml +2 -3
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/helm/helm-lint.yml +2 -1
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-development-trivy.yml +2 -3
- {cici_tools-0.17.0/tests/fixtures/gitlab/targets-dir → cici_tools-0.18.0/tests/fixtures/gitlab/job-variables}/opentofu-module-build.yml +4 -10
- {cici_tools-0.17.0/tests/fixtures/gitlab/targets-dir → cici_tools-0.18.0/tests/fixtures/gitlab/job-variables}/opentofu-production-trivy.yml +2 -3
- {cici_tools-0.17.0/tests/fixtures/gitlab/targets-dir → cici_tools-0.18.0/tests/fixtures/gitlab/job-variables}/opentofu-staging-trivy.yml +2 -3
- {cici_tools-0.17.0/tests/fixtures/gitlab/targets-dir → cici_tools-0.18.0/tests/fixtures/gitlab/job-variables}/opentofu-trivy.yml +2 -3
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-docker-multiarch-amd64.yml +5 -8
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-docker-multiarch-arm32v6.yml +5 -8
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-docker-multiarch-arm32v7.yml +5 -8
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-docker-multiarch-arm64v8.yml +5 -8
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-docker-multiarch-i386.yml +5 -8
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-docker-multiarch.yml +5 -8
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-docker.yml +3 -5
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-trivy.yml +6 -5
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-development-trivy.yml +2 -3
- {cici_tools-0.17.0/tests/fixtures/gitlab/job-variables → cici_tools-0.18.0/tests/fixtures/gitlab/targets-dir}/opentofu-module-build.yml +4 -10
- {cici_tools-0.17.0/tests/fixtures/gitlab/job-variables → cici_tools-0.18.0/tests/fixtures/gitlab/targets-dir}/opentofu-production-trivy.yml +2 -3
- {cici_tools-0.17.0/tests/fixtures/gitlab/job-variables → cici_tools-0.18.0/tests/fixtures/gitlab/targets-dir}/opentofu-staging-trivy.yml +2 -3
- {cici_tools-0.17.0/tests/fixtures/gitlab/job-variables → cici_tools-0.18.0/tests/fixtures/gitlab/targets-dir}/opentofu-trivy.yml +2 -3
- cici_tools-0.18.0/tests/test_precommit_hook_injection.py +47 -0
- cici_tools-0.18.0/tests/test_yaml_style.py +96 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.cici/README.md.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.cici/config.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.dockerignore +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.gitignore +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.licenserc.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.pre-commit-config.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.pre-commit-hooks.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.prettierignore +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.prettierrc.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/.secrets.baseline +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/Dockerfile +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/LICENSE +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/MANIFEST.in +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/NOTICE +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/README.md +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/__init__.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/__main__.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/cli/__init__.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/cli/bundle.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/cli/readme.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/cli/schema.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/cli/update.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/config/__init__.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/config/project/__init__.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/config/project/models.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/config/user.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/constants.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/exceptions.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/main.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/paths.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/providers/__init__.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/providers/gitlab/__init__.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/providers/gitlab/constants.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/providers/gitlab/models.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/providers/gitlab/normalizers.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/providers/gitlab/utils.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/py.typed +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/schema/LICENSE.gitlab +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/schema/__init__.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/schema/gitlab-ci.json +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/templates/README.md.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/templates/__init__.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/templates/brief.md.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/templates/description.md.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/templates/group-list.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/templates/groups.md.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/templates/target-list.md.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/templates/target-table.md.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/templates/targets.md.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/templates/variable-list.md.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/templates/variables.md.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici/utils.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici-bundle.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici-readme.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici-update.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici_tools.egg-info/dependency_links.txt +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici_tools.egg-info/entry_points.txt +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici_tools.egg-info/requires.txt +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/cici_tools.egg-info/top_level.txt +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/docs/bundle.md +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/docs/config-file.md +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/docs/getting-started.md +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/docs/gitlab-includes.md +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/docs/index.md +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/docs/install.md +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/docs/readme.md +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/docs/style.css +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/docs/update.md +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/makefile +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/mkdocs.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/scripts/gen-api-doc.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/setup.cfg +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/extends/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/extends/simple-job.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/helm/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/.cici/config.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-development-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-development-auto-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-development-destroy.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-development-plan.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-development-validate.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-fmt.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-module-release.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-production-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-production-auto-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-production-destroy.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-production-plan.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-production-validate.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-staging-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-staging-auto-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-staging-destroy.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-staging-plan.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-staging-validate.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/job-variables/opentofu-validate.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/library-validator/.cici/README.md.j2 +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/library-validator/.cici/config.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/library-validator/README.md +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/list-anchors/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/list-anchors/install.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/nested-extends/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/nested-extends/simple-job.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/reports/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/reports/reports-container-scanning.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/reports/reports-coverage.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/reports/reports-junit.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/reports/reports-terraform.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/.cici/config.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-docker-multiarch-manifest.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-hadolint.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/simple/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/simple/simple-job.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/stages/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/stages/simple-job.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/config.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-development-apply.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-development-auto-apply.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-development-destroy.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-development-plan.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-development-validate.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-fmt.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-module-build.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-module-release.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-production-apply.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-production-auto-apply.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-production-destroy.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-production-plan.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-production-trivy.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-production-validate.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-staging-apply.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-staging-auto-apply.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-staging-destroy.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-staging-plan.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-staging-trivy.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-staging-validate.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-trivy.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/opentofu-validate.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/.cici/targets/tofu-development-trivy.yaml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-development-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-development-auto-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-development-destroy.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-development-plan.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-development-validate.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-fmt.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-module-release.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-production-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-production-auto-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-production-destroy.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-production-plan.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-production-validate.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-staging-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-staging-auto-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-staging-destroy.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-staging-plan.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-staging-validate.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/targets-dir/opentofu-validate.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/terraform/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/terraform/terraform-fmt.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/terraform/terraform-production-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/terraform/terraform-production-plan.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/terraform/terraform-staging-apply.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/terraform/terraform-staging-destroy.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/variables/.cici/.gitlab-ci.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/variables/simple-job.yml +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/test_build.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/test_cli.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/test_expand_job_extends.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/test_import.py +0 -0
- {cici_tools-0.17.0 → cici_tools-0.18.0}/tests/test_resolve_targets.py +0 -0
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.
|
|
32
|
-
__version_tuple__ = version_tuple = (0,
|
|
31
|
+
__version__ = version = '0.18.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 18, 0)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g36384f791'
|
|
@@ -148,14 +148,19 @@ def loads(
|
|
|
148
148
|
# verify targets exists even if empty
|
|
149
149
|
data.setdefault("targets", [])
|
|
150
150
|
|
|
151
|
-
# Inject precommit/gitlab
|
|
151
|
+
# Inject precommit/gitlab include references into each target
|
|
152
|
+
for target in data["targets"]:
|
|
153
|
+
name = target["name"]
|
|
152
154
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
# if precommit hook exists in .pre-commit-hooks.yml, attach a pre-commit hook reference
|
|
156
|
+
# Injected object must match PreCommitHookTarget schema to keep msgspec happy
|
|
157
|
+
if name in precommit_hooks:
|
|
158
|
+
target["precommit_hook"] = {"name": name}
|
|
159
|
+
else:
|
|
160
|
+
# Remove key entirely when no hook exists so msgspec can apply
|
|
161
|
+
target.pop("precommit_hook", None)
|
|
155
162
|
|
|
156
|
-
|
|
157
|
-
target["precommit_hook"] = {"name": target["name"]}
|
|
158
|
-
target["gitlab_include"] = {"name": target["name"]}
|
|
163
|
+
target["gitlab_include"] = {"name": name}
|
|
159
164
|
|
|
160
165
|
# Debug to test injection
|
|
161
166
|
# print("After injection:", data["targets"])
|
|
@@ -327,13 +327,23 @@ def dump(
|
|
|
327
327
|
data = unpack_jobs(data)
|
|
328
328
|
data = style_scalars(data)
|
|
329
329
|
|
|
330
|
+
# DEBUG
|
|
331
|
+
# job = data.get("opentofu-trivy") or {}
|
|
332
|
+
# script = job.get("script") or []
|
|
333
|
+
# if script:
|
|
334
|
+
# print("\n[DUMP DEBUG] opentofu-trivy script[0] type:", type(script[0]))
|
|
335
|
+
# print("[DUMP DEBUG] script[0] repr:", repr(str(script[0])))
|
|
336
|
+
# print("[DUMP DEBUG] contains \\n\\n?:", "\n\n" in str(script[0]))
|
|
337
|
+
# print("[DUMP DEBUG] contains \\n?:", "\n" in str(script[0]))
|
|
338
|
+
# END DEBUG
|
|
339
|
+
|
|
330
340
|
# user round trip mode to preserve ruamel scalar styles (FoldedScalarString etc)
|
|
331
341
|
yaml = ruamel.yaml.YAML(typ="rt")
|
|
332
342
|
yaml.default_flow_style = False
|
|
333
343
|
yaml.explicit_start = False
|
|
334
344
|
yaml.preserve_quotes = True # respect the quotes set in style_scalars()
|
|
335
345
|
yaml.indent(mapping=2, sequence=4, offset=2)
|
|
336
|
-
yaml.width =
|
|
346
|
+
yaml.width = 120 # prevent unwanted line wrapping
|
|
337
347
|
# makes sure ruamel.yml to always emit double quoted strings """"
|
|
338
348
|
yaml.representer.add_representer(DoubleQuotedScalarString, always_double_quoted)
|
|
339
349
|
|
|
@@ -54,9 +54,18 @@ def make_scalar_string(line: str, quote: bool = False):
|
|
|
54
54
|
|
|
55
55
|
return FoldedScalarString(wrap_if_long(unindented))
|
|
56
56
|
|
|
57
|
-
#
|
|
57
|
+
# Folding long lines logic (like a script that is super long so that it does not do anything weird in the folding process)
|
|
58
58
|
if unindented.startswith(("docker ", "helm ", "tar ", "curl ")):
|
|
59
|
-
|
|
59
|
+
command_string = unindented.strip()
|
|
60
|
+
|
|
61
|
+
folded_scalar = FoldedScalarString(command_string)
|
|
62
|
+
|
|
63
|
+
if " | " in command_string:
|
|
64
|
+
pipe_position = command_string.index(" | ")
|
|
65
|
+
# mypy does not like fold_pos however it solves an issue that breaks the .gitlab-ci.yaml
|
|
66
|
+
folded_scalar.fold_pos = [pipe_position] # type: ignore[attr-defined]
|
|
67
|
+
|
|
68
|
+
return folded_scalar
|
|
60
69
|
|
|
61
70
|
# Multi-command sequences get folded
|
|
62
71
|
if any(sym in unindented for sym in ("&&", ";", "\\")):
|
|
@@ -339,7 +348,7 @@ def style_scalars(
|
|
|
339
348
|
"on_success",
|
|
340
349
|
"on_failure",
|
|
341
350
|
"manual",
|
|
342
|
-
"cobertura", #
|
|
351
|
+
"cobertura", # coverage format
|
|
343
352
|
"sigstore",
|
|
344
353
|
}
|
|
345
354
|
if stripped in UNQUOTED_KEYWORDS:
|
|
@@ -83,7 +83,9 @@ tests/test_build.py
|
|
|
83
83
|
tests/test_cli.py
|
|
84
84
|
tests/test_expand_job_extends.py
|
|
85
85
|
tests/test_import.py
|
|
86
|
+
tests/test_precommit_hook_injection.py
|
|
86
87
|
tests/test_resolve_targets.py
|
|
88
|
+
tests/test_yaml_style.py
|
|
87
89
|
tests/fixtures/gitlab/extends/simple-job.yml
|
|
88
90
|
tests/fixtures/gitlab/extends/.cici/.gitlab-ci.yml
|
|
89
91
|
tests/fixtures/gitlab/helm/helm-cm-push.yml
|
|
@@ -30,7 +30,8 @@ helm-cm-push:
|
|
|
30
30
|
before_script:
|
|
31
31
|
- apk add --no-cache curl
|
|
32
32
|
- >-
|
|
33
|
-
curl -sS -o - https://get.helm.sh/helm-v3.8.0-linux-amd64.tar.gz
|
|
33
|
+
curl -sS -o - https://get.helm.sh/helm-v3.8.0-linux-amd64.tar.gz
|
|
34
|
+
| tar --strip-components 1 -xzf - linux-amd64/helm
|
|
34
35
|
- install helm /usr/local/bin/
|
|
35
36
|
- rm -f helm
|
|
36
37
|
- >-
|
|
@@ -40,8 +41,6 @@ helm-cm-push:
|
|
|
40
41
|
- >-
|
|
41
42
|
helm plugin install https://github.com/chartmuseum/helm-push
|
|
42
43
|
- >-
|
|
43
|
-
helm cm-push --version "$HELM_CHART_VERSION" --app-version "$HELM_CHART_VERSION" "$HELM_CHART_PATH"
|
|
44
|
-
|
|
45
|
-
"$HELM_REPOSITORY_URL"
|
|
44
|
+
helm cm-push --version "$HELM_CHART_VERSION" --app-version "$HELM_CHART_VERSION" "$HELM_CHART_PATH" "$HELM_REPOSITORY_URL"
|
|
46
45
|
rules:
|
|
47
46
|
- if: $CI_COMMIT_TAG
|
|
@@ -27,9 +27,8 @@ helm-docs:
|
|
|
27
27
|
before_script:
|
|
28
28
|
- apk add --no-cache curl
|
|
29
29
|
- >-
|
|
30
|
-
curl -sSL -o - https://github.com/norwoodj/helm-docs/releases/download/v1.7.0/helm-docs_1.7.0_Linux_x86_64.tar.gz
|
|
31
|
-
|
|
32
|
-
xzf - helm-docs
|
|
30
|
+
curl -sSL -o - https://github.com/norwoodj/helm-docs/releases/download/v1.7.0/helm-docs_1.7.0_Linux_x86_64.tar.gz
|
|
31
|
+
| tar xzf - helm-docs
|
|
33
32
|
- install helm-docs /usr/local/bin/
|
|
34
33
|
- rm -f helm-docs
|
|
35
34
|
- helm-docs --version
|
|
@@ -27,7 +27,8 @@ helm-lint:
|
|
|
27
27
|
before_script:
|
|
28
28
|
- apk add --no-cache curl
|
|
29
29
|
- >-
|
|
30
|
-
curl -sS -o - https://get.helm.sh/helm-v3.8.0-linux-amd64.tar.gz
|
|
30
|
+
curl -sS -o - https://get.helm.sh/helm-v3.8.0-linux-amd64.tar.gz
|
|
31
|
+
| tar --strip-components 1 -xzf - linux-amd64/helm
|
|
31
32
|
- install helm /usr/local/bin/
|
|
32
33
|
- rm -f helm
|
|
33
34
|
- >-
|
|
@@ -47,9 +47,8 @@ opentofu-development-trivy:
|
|
|
47
47
|
- cd "${OPENTOFU_ROOT}"
|
|
48
48
|
script:
|
|
49
49
|
- >-
|
|
50
|
-
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
-
|
|
52
|
-
/usr/local/bin/ -xzf - trivy
|
|
50
|
+
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
+
| tar -C /usr/local/bin/ -xzf - trivy
|
|
53
52
|
- trivy config "${OPENTOFU_ROOT}/plan.json"
|
|
54
53
|
cache:
|
|
55
54
|
key: $OPENTOFU_STATE_NAME
|
|
@@ -41,17 +41,11 @@ opentofu-module-build:
|
|
|
41
41
|
script:
|
|
42
42
|
- OPENTOFU_MODULE_NAME=$(echo "${OPENTOFU_MODULE_NAME}" | tr " _" -)
|
|
43
43
|
- >-
|
|
44
|
-
tar -vczf /tmp/${OPENTOFU_MODULE_NAME}-${OPENTOFU_MODULE_SYSTEM}-${OPENTOFU_MODULE_VERSION}.tgz -C
|
|
45
|
-
|
|
46
|
-
${OPENTOFU_MODULE_DIR} --exclude=./.git .
|
|
44
|
+
tar -vczf /tmp/${OPENTOFU_MODULE_NAME}-${OPENTOFU_MODULE_SYSTEM}-${OPENTOFU_MODULE_VERSION}.tgz -C ${OPENTOFU_MODULE_DIR}
|
|
45
|
+
--exclude=./.git .
|
|
47
46
|
- >-
|
|
48
|
-
curl --fail-with-body --location --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file
|
|
49
|
-
|
|
50
|
-
/tmp/${OPENTOFU_MODULE_NAME}-${OPENTOFU_MODULE_SYSTEM}-${OPENTOFU_MODULE_VERSION}.tgz
|
|
51
|
-
|
|
52
|
-
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/terraform/modules/${OPENTOFU_MODULE_NAME}/${OPENTOFU_MODULE_SYSTEM}/
|
|
53
|
-
|
|
54
|
-
${OPENTOFU_MODULE_VERSION}/file
|
|
47
|
+
curl --fail-with-body --location --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file /tmp/${OPENTOFU_MODULE_NAME}-${OPENTOFU_MODULE_SYSTEM}-${OPENTOFU_MODULE_VERSION}.tgz
|
|
48
|
+
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/terraform/modules/${OPENTOFU_MODULE_NAME}/${OPENTOFU_MODULE_SYSTEM}/${OPENTOFU_MODULE_VERSION}/file
|
|
55
49
|
cache: {}
|
|
56
50
|
dependencies: []
|
|
57
51
|
rules:
|
|
@@ -47,9 +47,8 @@ opentofu-production-trivy:
|
|
|
47
47
|
- cd "${OPENTOFU_ROOT}"
|
|
48
48
|
script:
|
|
49
49
|
- >-
|
|
50
|
-
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
-
|
|
52
|
-
/usr/local/bin/ -xzf - trivy
|
|
50
|
+
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
+
| tar -C /usr/local/bin/ -xzf - trivy
|
|
53
52
|
- trivy config "${OPENTOFU_ROOT}/plan.json"
|
|
54
53
|
cache:
|
|
55
54
|
key: $OPENTOFU_STATE_NAME
|
|
@@ -47,9 +47,8 @@ opentofu-staging-trivy:
|
|
|
47
47
|
- cd "${OPENTOFU_ROOT}"
|
|
48
48
|
script:
|
|
49
49
|
- >-
|
|
50
|
-
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
-
|
|
52
|
-
/usr/local/bin/ -xzf - trivy
|
|
50
|
+
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
+
| tar -C /usr/local/bin/ -xzf - trivy
|
|
53
52
|
- trivy config "${OPENTOFU_ROOT}/plan.json"
|
|
54
53
|
cache:
|
|
55
54
|
key: $OPENTOFU_STATE_NAME
|
|
@@ -46,9 +46,8 @@ opentofu-trivy:
|
|
|
46
46
|
- cd "${OPENTOFU_ROOT}"
|
|
47
47
|
script:
|
|
48
48
|
- >-
|
|
49
|
-
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
50
|
-
|
|
51
|
-
/usr/local/bin/ -xzf - trivy
|
|
49
|
+
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
50
|
+
| tar -C /usr/local/bin/ -xzf - trivy
|
|
52
51
|
- trivy config .
|
|
53
52
|
cache:
|
|
54
53
|
key: $OPENTOFU_STATE_NAME
|
|
@@ -106,14 +106,11 @@ container-docker-multiarch-amd64:
|
|
|
106
106
|
_CONTAINER_OPTS="$_CONTAINER_OPTS --tag ${CONTAINER_NAME}:latest-${CONTAINER_DOCKER_ARCH}"
|
|
107
107
|
fi
|
|
108
108
|
- >-
|
|
109
|
-
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
116
|
-
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}' "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
109
|
+
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg "CONTAINER_DOCKER_MACHINE_ARCH=$CONTAINER_DOCKER_MACHINE_ARCH"
|
|
110
|
+
--build-arg "CONTAINER_VERSION=$CONTAINER_VERSION" --file "${CONTAINER_DOCKERFILE}" --platform "$CONTAINER_DOCKER_PLATFORM"
|
|
111
|
+
--progress plain --push --tag "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
112
|
+
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}'
|
|
113
|
+
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
117
114
|
- cosign sign --yes "$COSIGN_IMAGE_DIGEST"
|
|
118
115
|
- mkdir -p dist/container/arch
|
|
119
116
|
- touch "dist/container/arch/${CONTAINER_DOCKER_ARCH}"
|
|
@@ -106,14 +106,11 @@ container-docker-multiarch-arm32v6:
|
|
|
106
106
|
_CONTAINER_OPTS="$_CONTAINER_OPTS --tag ${CONTAINER_NAME}:latest-${CONTAINER_DOCKER_ARCH}"
|
|
107
107
|
fi
|
|
108
108
|
- >-
|
|
109
|
-
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
116
|
-
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}' "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
109
|
+
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg "CONTAINER_DOCKER_MACHINE_ARCH=$CONTAINER_DOCKER_MACHINE_ARCH"
|
|
110
|
+
--build-arg "CONTAINER_VERSION=$CONTAINER_VERSION" --file "${CONTAINER_DOCKERFILE}" --platform "$CONTAINER_DOCKER_PLATFORM"
|
|
111
|
+
--progress plain --push --tag "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
112
|
+
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}'
|
|
113
|
+
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
117
114
|
- cosign sign --yes "$COSIGN_IMAGE_DIGEST"
|
|
118
115
|
- mkdir -p dist/container/arch
|
|
119
116
|
- touch "dist/container/arch/${CONTAINER_DOCKER_ARCH}"
|
|
@@ -106,14 +106,11 @@ container-docker-multiarch-arm32v7:
|
|
|
106
106
|
_CONTAINER_OPTS="$_CONTAINER_OPTS --tag ${CONTAINER_NAME}:latest-${CONTAINER_DOCKER_ARCH}"
|
|
107
107
|
fi
|
|
108
108
|
- >-
|
|
109
|
-
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
116
|
-
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}' "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
109
|
+
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg "CONTAINER_DOCKER_MACHINE_ARCH=$CONTAINER_DOCKER_MACHINE_ARCH"
|
|
110
|
+
--build-arg "CONTAINER_VERSION=$CONTAINER_VERSION" --file "${CONTAINER_DOCKERFILE}" --platform "$CONTAINER_DOCKER_PLATFORM"
|
|
111
|
+
--progress plain --push --tag "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
112
|
+
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}'
|
|
113
|
+
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
117
114
|
- cosign sign --yes "$COSIGN_IMAGE_DIGEST"
|
|
118
115
|
- mkdir -p dist/container/arch
|
|
119
116
|
- touch "dist/container/arch/${CONTAINER_DOCKER_ARCH}"
|
|
@@ -106,14 +106,11 @@ container-docker-multiarch-arm64v8:
|
|
|
106
106
|
_CONTAINER_OPTS="$_CONTAINER_OPTS --tag ${CONTAINER_NAME}:latest-${CONTAINER_DOCKER_ARCH}"
|
|
107
107
|
fi
|
|
108
108
|
- >-
|
|
109
|
-
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
116
|
-
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}' "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
109
|
+
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg "CONTAINER_DOCKER_MACHINE_ARCH=$CONTAINER_DOCKER_MACHINE_ARCH"
|
|
110
|
+
--build-arg "CONTAINER_VERSION=$CONTAINER_VERSION" --file "${CONTAINER_DOCKERFILE}" --platform "$CONTAINER_DOCKER_PLATFORM"
|
|
111
|
+
--progress plain --push --tag "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
112
|
+
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}'
|
|
113
|
+
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
117
114
|
- cosign sign --yes "$COSIGN_IMAGE_DIGEST"
|
|
118
115
|
- mkdir -p dist/container/arch
|
|
119
116
|
- touch "dist/container/arch/${CONTAINER_DOCKER_ARCH}"
|
|
@@ -106,14 +106,11 @@ container-docker-multiarch-i386:
|
|
|
106
106
|
_CONTAINER_OPTS="$_CONTAINER_OPTS --tag ${CONTAINER_NAME}:latest-${CONTAINER_DOCKER_ARCH}"
|
|
107
107
|
fi
|
|
108
108
|
- >-
|
|
109
|
-
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
116
|
-
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}' "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
109
|
+
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg "CONTAINER_DOCKER_MACHINE_ARCH=$CONTAINER_DOCKER_MACHINE_ARCH"
|
|
110
|
+
--build-arg "CONTAINER_VERSION=$CONTAINER_VERSION" --file "${CONTAINER_DOCKERFILE}" --platform "$CONTAINER_DOCKER_PLATFORM"
|
|
111
|
+
--progress plain --push --tag "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
112
|
+
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}'
|
|
113
|
+
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
117
114
|
- cosign sign --yes "$COSIGN_IMAGE_DIGEST"
|
|
118
115
|
- mkdir -p dist/container/arch
|
|
119
116
|
- touch "dist/container/arch/${CONTAINER_DOCKER_ARCH}"
|
|
@@ -103,14 +103,11 @@ container-docker-multiarch:
|
|
|
103
103
|
_CONTAINER_OPTS="$_CONTAINER_OPTS --tag ${CONTAINER_NAME}:latest-${CONTAINER_DOCKER_ARCH}"
|
|
104
104
|
fi
|
|
105
105
|
- >-
|
|
106
|
-
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
113
|
-
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}' "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
106
|
+
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg "CONTAINER_DOCKER_MACHINE_ARCH=$CONTAINER_DOCKER_MACHINE_ARCH"
|
|
107
|
+
--build-arg "CONTAINER_VERSION=$CONTAINER_VERSION" --file "${CONTAINER_DOCKERFILE}" --platform "$CONTAINER_DOCKER_PLATFORM"
|
|
108
|
+
--progress plain --push --tag "${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
109
|
+
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}'
|
|
110
|
+
"${CONTAINER_IMAGE}-${CONTAINER_DOCKER_ARCH}")"
|
|
114
111
|
- cosign sign --yes "$COSIGN_IMAGE_DIGEST"
|
|
115
112
|
- mkdir -p dist/container/arch
|
|
116
113
|
- touch "dist/container/arch/${CONTAINER_DOCKER_ARCH}"
|
{cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-docker.yml
RENAMED
|
@@ -103,11 +103,9 @@ container-docker:
|
|
|
103
103
|
_CONTAINER_OPTS="$_CONTAINER_OPTS --tag ${CONTAINER_NAME}:latest"
|
|
104
104
|
fi
|
|
105
105
|
- >-
|
|
106
|
-
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg "CONTAINER_PROXY=$CONTAINER_PROXY"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"${CONTAINER_IMAGE}" $_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
106
|
+
docker buildx build --build-arg "CONTAINER_NAME=$CONTAINER_NAME" --build-arg "CONTAINER_PROXY=$CONTAINER_PROXY" --build-arg
|
|
107
|
+
"CONTAINER_VERSION=$CONTAINER_VERSION" --file "${CONTAINER_DOCKERFILE}" --progress plain --push --tag "${CONTAINER_IMAGE}"
|
|
108
|
+
$_CONTAINER_OPTS "${CONTAINER_CONTEXT}"
|
|
111
109
|
- COSIGN_IMAGE_DIGEST="$(docker inspect --format='{{index .RepoDigests 0}}' "$CONTAINER_IMAGE")"
|
|
112
110
|
- cosign sign --yes "$COSIGN_IMAGE_DIGEST"
|
|
113
111
|
id_tokens:
|
{cici_tools-0.17.0 → cici_tools-0.18.0}/tests/fixtures/gitlab/service-key/container-trivy.yml
RENAMED
|
@@ -97,15 +97,16 @@ container-trivy:
|
|
|
97
97
|
echo "$CI_DEPENDENCY_PROXY_PASSWORD" | docker login "$CI_SERVER_HOST" -u "$CI_DEPENDENCY_PROXY_USER" --password-stdin
|
|
98
98
|
- apk add --no-cache curl
|
|
99
99
|
- >-
|
|
100
|
-
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
101
|
-
|
|
102
|
-
-C /usr/local/bin/
|
|
100
|
+
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
101
|
+
| tar -xzf - -C /usr/local/bin/
|
|
103
102
|
- >-
|
|
104
103
|
docker pull "${CONTAINER_IMAGE}"
|
|
105
104
|
- trivy image "${CONTAINER_IMAGE}" --format json --no-progress -o "${CI_JOB_NAME_SLUG}.json"
|
|
106
105
|
- trivy convert "${CI_JOB_NAME_SLUG}.json"
|
|
107
|
-
- trivy convert "${CI_JOB_NAME_SLUG}.json" --format template --template "@/usr/local/bin/contrib/gitlab.tpl" -o
|
|
108
|
-
|
|
106
|
+
- trivy convert "${CI_JOB_NAME_SLUG}.json" --format template --template "@/usr/local/bin/contrib/gitlab.tpl" -o
|
|
107
|
+
"${CI_JOB_NAME_SLUG}-gitlab.json"
|
|
108
|
+
- trivy convert "${CI_JOB_NAME_SLUG}.json" --format template --template "@/usr/local/bin/contrib/html.tpl" -o
|
|
109
|
+
"${CI_JOB_NAME_SLUG}.html"
|
|
109
110
|
artifacts:
|
|
110
111
|
paths:
|
|
111
112
|
- ${CI_JOB_NAME_SLUG}.json
|
|
@@ -47,9 +47,8 @@ opentofu-development-trivy:
|
|
|
47
47
|
- cd "${OPENTOFU_ROOT}"
|
|
48
48
|
script:
|
|
49
49
|
- >-
|
|
50
|
-
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
-
|
|
52
|
-
/usr/local/bin/ -xzf - trivy
|
|
50
|
+
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
+
| tar -C /usr/local/bin/ -xzf - trivy
|
|
53
52
|
- trivy config "${OPENTOFU_ROOT}/plan.json"
|
|
54
53
|
cache:
|
|
55
54
|
key: $OPENTOFU_STATE_NAME
|
|
@@ -41,17 +41,11 @@ opentofu-module-build:
|
|
|
41
41
|
script:
|
|
42
42
|
- OPENTOFU_MODULE_NAME=$(echo "${OPENTOFU_MODULE_NAME}" | tr " _" -)
|
|
43
43
|
- >-
|
|
44
|
-
tar -vczf /tmp/${OPENTOFU_MODULE_NAME}-${OPENTOFU_MODULE_SYSTEM}-${OPENTOFU_MODULE_VERSION}.tgz -C
|
|
45
|
-
|
|
46
|
-
${OPENTOFU_MODULE_DIR} --exclude=./.git .
|
|
44
|
+
tar -vczf /tmp/${OPENTOFU_MODULE_NAME}-${OPENTOFU_MODULE_SYSTEM}-${OPENTOFU_MODULE_VERSION}.tgz -C ${OPENTOFU_MODULE_DIR}
|
|
45
|
+
--exclude=./.git .
|
|
47
46
|
- >-
|
|
48
|
-
curl --fail-with-body --location --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file
|
|
49
|
-
|
|
50
|
-
/tmp/${OPENTOFU_MODULE_NAME}-${OPENTOFU_MODULE_SYSTEM}-${OPENTOFU_MODULE_VERSION}.tgz
|
|
51
|
-
|
|
52
|
-
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/terraform/modules/${OPENTOFU_MODULE_NAME}/${OPENTOFU_MODULE_SYSTEM}/
|
|
53
|
-
|
|
54
|
-
${OPENTOFU_MODULE_VERSION}/file
|
|
47
|
+
curl --fail-with-body --location --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file /tmp/${OPENTOFU_MODULE_NAME}-${OPENTOFU_MODULE_SYSTEM}-${OPENTOFU_MODULE_VERSION}.tgz
|
|
48
|
+
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/terraform/modules/${OPENTOFU_MODULE_NAME}/${OPENTOFU_MODULE_SYSTEM}/${OPENTOFU_MODULE_VERSION}/file
|
|
55
49
|
cache: {}
|
|
56
50
|
dependencies: []
|
|
57
51
|
rules:
|
|
@@ -47,9 +47,8 @@ opentofu-production-trivy:
|
|
|
47
47
|
- cd "${OPENTOFU_ROOT}"
|
|
48
48
|
script:
|
|
49
49
|
- >-
|
|
50
|
-
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
-
|
|
52
|
-
/usr/local/bin/ -xzf - trivy
|
|
50
|
+
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
+
| tar -C /usr/local/bin/ -xzf - trivy
|
|
53
52
|
- trivy config "${OPENTOFU_ROOT}/plan.json"
|
|
54
53
|
cache:
|
|
55
54
|
key: $OPENTOFU_STATE_NAME
|
|
@@ -47,9 +47,8 @@ opentofu-staging-trivy:
|
|
|
47
47
|
- cd "${OPENTOFU_ROOT}"
|
|
48
48
|
script:
|
|
49
49
|
- >-
|
|
50
|
-
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
-
|
|
52
|
-
/usr/local/bin/ -xzf - trivy
|
|
50
|
+
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
51
|
+
| tar -C /usr/local/bin/ -xzf - trivy
|
|
53
52
|
- trivy config "${OPENTOFU_ROOT}/plan.json"
|
|
54
53
|
cache:
|
|
55
54
|
key: $OPENTOFU_STATE_NAME
|
|
@@ -46,9 +46,8 @@ opentofu-trivy:
|
|
|
46
46
|
- cd "${OPENTOFU_ROOT}"
|
|
47
47
|
script:
|
|
48
48
|
- >-
|
|
49
|
-
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
50
|
-
|
|
51
|
-
/usr/local/bin/ -xzf - trivy
|
|
49
|
+
curl -sSL https://github.com/aquasecurity/trivy/releases/download/v0.49.1/trivy_0.49.1_Linux-64bit.tar.gz
|
|
50
|
+
| tar -C /usr/local/bin/ -xzf - trivy
|
|
52
51
|
- trivy config .
|
|
53
52
|
cache:
|
|
54
53
|
key: $OPENTOFU_STATE_NAME
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: UL Research Institutes
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import pytest
|
|
5
|
+
|
|
6
|
+
from cici.config.project.serializers import loads
|
|
7
|
+
|
|
8
|
+
CONFIG_YAML = """
|
|
9
|
+
name: test-pipeline
|
|
10
|
+
targets:
|
|
11
|
+
- name: A
|
|
12
|
+
- name: B
|
|
13
|
+
- name: C
|
|
14
|
+
- name: D
|
|
15
|
+
"""
|
|
16
|
+
# Only some targets have hooks
|
|
17
|
+
PRECOMMIT_HOOKS = {"A": {}, "C": {}} # type: ignore[var-annotated]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _target_by_name(file_obj, name: str):
|
|
21
|
+
for t in file_obj.targets:
|
|
22
|
+
if t.name == name:
|
|
23
|
+
return t
|
|
24
|
+
raise AssertionError(f"Target not found: {name}")
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.mark.parametrize(
|
|
28
|
+
"target_name, expected_has_hook",
|
|
29
|
+
[
|
|
30
|
+
("A", True),
|
|
31
|
+
("B", False),
|
|
32
|
+
("C", True),
|
|
33
|
+
("D", False),
|
|
34
|
+
],
|
|
35
|
+
)
|
|
36
|
+
def test_precommit_hook_injection_is_name_based(
|
|
37
|
+
target_name: str,
|
|
38
|
+
expected_has_hook: bool,
|
|
39
|
+
):
|
|
40
|
+
file_obj = loads(
|
|
41
|
+
CONFIG_YAML,
|
|
42
|
+
gitlab_ci_jobs={}, # irrelevant for this test
|
|
43
|
+
precommit_hooks=PRECOMMIT_HOOKS,
|
|
44
|
+
)
|
|
45
|
+
target = _target_by_name(file_obj, target_name)
|
|
46
|
+
# dict-or-None version
|
|
47
|
+
assert (target.precommit_hook is not None) == expected_has_hook
|