Skip to content

Commit

Permalink
feat(ci): move python linting to gitlab and make it run at anytime (#…
Browse files Browse the repository at this point in the history
…24741)

* feat(ci): move python linting to gitlab and make it run at anytime

* use circleci image

* Remove bashrc source
  • Loading branch information
chouetz authored Apr 17, 2024
1 parent da31a5a commit c8b5066
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
17 changes: 0 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,20 +175,6 @@ jobs:
#SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".
command: shellcheck --severity=info -e SC2059 -e SC2028 --shell=bash ./cmd/**/*.sh ./omnibus/package-scripts/*/*

python_linting:
<<: *job_template
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: setting env vars for click
command: |
echo 'export LC_ALL="C.UTF-8"' >> $BASH_ENV
echo 'export LANG="C.UTF-8"' >> $BASH_ENV
- run:
name: lint python files
command: inv -e linter.python

component_linting:
<<: *job_template
steps:
Expand Down Expand Up @@ -283,9 +269,6 @@ workflows:
- shell_linting:
requires:
- dependencies
- python_linting:
requires:
- dependencies
- component_linting:
requires:
- dependencies
Expand Down
8 changes: 8 additions & 0 deletions .gitlab/source_test/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ lint_flavor_heroku_linux-x64:
variables:
FLAVORS: '--flavors heroku'

lint_python:
stage: source_test
image: gcr.io/datadoghq/agent-circleci-runner:v31988376-bfbb3afb
tags: ["arch:amd64"]
needs: []
script:
- inv -e linter.python

# Exclude systemd because it cannot succeed on Centos 6: the image doesn't have the shared object required by
# https://github.com/coreos/go-systemd/blob/c8cc474ba8655dfbdb0ac7fcc09b7faf5b643caf/sdjournal/functions.go#L46
# This is OK because the test on systemd still runs on the debian image above
Expand Down

0 comments on commit c8b5066

Please sign in to comment.