# before_script: # - ... stages: # List of stages for jobs, and their order of execution - test - build build-job: # This job runs in the build stage, which runs first. stage: build script: - echo "Building the Docker image..." - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin - docker build -t $CI_REGISTRY_IMAGE . - docker push $CI_REGISTRY_IMAGE - echo "Build complete." # unit-test-job: # This job runs in the test stage. # stage: test # script: # - echo "Running unit tests..." # - python3 -munittest discover # - echo "Testing complete" # lint-test-job: # This job also runs in the test stage. # stage: test # It can run at the same time as unit-test-job (in parallel). # script: # - echo "Linting code..." # - pylint -j0 -v $(git ls-files '*.py') # - echo "No lint issues found."