infranet/.gitlab-ci.yml

30 lines
899 B
YAML
Raw Normal View History

2022-03-29 18:37:28 +01:00
# before_script:
# - ...
2022-03-28 08:35:45 +01:00
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."
2022-03-29 18:37:28 +01:00
# unit-test-job: # This job runs in the test stage.
# stage: test
# script:
# - echo "Running unit tests..."
# - python3 -munittest discover
# - echo "Testing complete"
2022-03-28 08:35:45 +01:00
2022-03-29 18:37:28 +01:00
# 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."