Last active
          September 14, 2023 13:30 
        
      - 
      
 - 
        
Save jdoiwork/1203c93cc85aaa03ccb7fe6b3d70535e to your computer and use it in GitHub Desktop.  
    gitlab ci/cd flake8
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | default: | |
| image: python:3.9 | |
| stages: | |
| - lint | |
| - test | |
| - deploy | |
| # before_script: | |
| # - pip install flake8 | |
| flake8: | |
| stage: lint | |
| script: | |
| - python --version | |
| - pip install flake8 | |
| - flake8 src/ | |
| only: | |
| - merge_requests | |
| test: | |
| stage: test | |
| script: | |
| - echo python manage.py test | |
| only: | |
| - merge_requests | |
| deploy: | |
| stage: deploy | |
| script: | |
| - echo "It's a good day to deploy" | |
| only: | |
| - merge_requests | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | concurrent = 1 | |
| check_interval = 0 | |
| [session_server] | |
| session_timeout = 1800 | |
| [[runners]] | |
| name = "runner1" | |
| url = "http://gitlab/" | |
| clone_url = "http://172.19.0.2/" | |
| token = "6mrN1Las8Qe_RkJLsUM5" | |
| executor = "docker" | |
| [runners.custom_build_dir] | |
| [runners.cache] | |
| [runners.cache.s3] | |
| [runners.cache.gcs] | |
| [runners.cache.azure] | |
| [runners.docker] | |
| tls_verify = false | |
| image = "python:3.9" | |
| privileged = false | |
| disable_entrypoint_overwrite = false | |
| oom_kill_disable = false | |
| disable_cache = false | |
| volumes = ["/cache"] | |
| shm_size = 0 | |
| network_mode = "host" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | version: "3.9" | |
| services: | |
| gitlab: | |
| image: gitlab/gitlab-ce:latest | |
| hostname: 'gitlab' | |
| ports: | |
| - "80:80" | |
| expose: | |
| - "80" | |
| volumes: | |
| - './srv/gitlab/config:/etc/gitlab' | |
| - './srv/gitlab/logs:/var/log/gitlab' | |
| - './srv/gitlab/data:/var/opt/gitlab' | |
| networks: | |
| - 'default' | |
| gitlab-runner: | |
| image: gitlab/gitlab-runner:latest | |
| volumes: | |
| - './srv/gitlab-runner/config:/etc/gitlab-runner' | |
| - '/var/run/docker.sock:/var/run/docker.sock' | |
| # networks: | |
| # mynet: | |
| # ipv4_address: 172.20.0.3 | |
| depends_on: | |
| - gitlab | |
| networks: | |
| - 'default' | |
| networks: | |
| default: | |
| driver: 'bridge' | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment