Newer
Older
- dev_pulling_repo
- dev_secrets_in_repo
- dev_linting_code
- dev_linting_docker
variables:
GITLAB_API: "https://labs.etsi.org/api/v4"
CI_JOB_TOKEN: $CI_JOB_TOKEN
#dev_pulling_repo:
# stage: dev_pulling_repo
# script:
# - git clone https://oauth2:${CI_JOB_TOKEN}@labs.etsi.org/rep/ocf/capif.git
# <<: *dev_common
- |
pip install trufflehog
trufflehog capif --exclude_paths capif/cicd/exclusions --max_depth=5
# needs: ["dev_pulling_repo"]
# define the process to do linting code: Sonarque, ruff?
- |
echo "###ruff checks###"
pip install ruff
# Download hadolint binary
wget https://github.com/hadolint/hadolint/releases/download/v2.8.0/hadolint-Linux-x86_64 -O hadolint
# Make it executable
chmod +x hadolint
# Move it to your binaries folder
sudo mv hadolint /usr/local/bin/
# Verify the installation
hadolint --version
#find . -name 'services/Dockerfile*' -exec hadolint --no-fail -f gitlab_codeclimate {} + > docker-lint.json
# - hadolint services/nginx/Dockerfile
# - hadolint services/register/Dockerfile
# artifacts:
# name: "$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG"
# when: always
# reports:
# codequality:
# - docker-lint.json
# interruptible: true
docker --version
# echo "myusername:mypassword" | docker login --username myusername --password-stdin