Commit 21bc5620 authored by Patrizia Barria's avatar Patrizia Barria
Browse files

Update .gitlab-ci.yml file

parent 69535f89
Loading
Loading
Loading
Loading
Loading
+5 −14
Original line number Diff line number Diff line
stages:
- build  # section name of the CI pipeline
- run    
- test   # other section executed AFTER 'build'
- deploy # other section AFTER 'build'

@@ -10,43 +9,35 @@ variables:
build_job:
  stage: build   # section where to run the job
  tags:
    - git-run-ia2  # who is running the job
    - patrizia.barria-docker-runner  # who is running the job
  script:
    - echo "Building the application..."
    - python -m py_compile program.py
    - echo "Building complete."

run_job:
  stage: run    # section where to run the job
  tags:
    - git-run-ia2  # who is running the job
  script:
    - python program.py

test_job_1:
  stage: test  # section where to run the job
  tags:
    - git-run-ia2  # who is running the job
    - patrizia.barria-docker-runner  # who is running the job
  script:
    - echo "Running test group 1 ..."
    - python test_program.py
    - echo "Testing complete."
  allow_failure: true

test_job_2:
  stage: test  # section where to run the job
  tags:
    - git-run-ia2  # who is running the job
    - patrizia.barria-docker-runner  # who is running the job
  script:
    - echo "Running more tests in group 2..."
    - cat test_file.txt
    - sleep 5
    - echo "Testing complete."
  needs: [test_job_1]   # mark this step to be executed AFTER "test_job_1"

deploy_job:
  stage: deploy  # section where to run the job
  tags:
    - git-run-ia2  # who is running the job
    - patrizia.barria-docker-runner  # who is running the job
  script:
    - echo "Installing the program..."
    - sleep 5