Commit b78a58b7 authored by Patrizia Barria's avatar Patrizia Barria
Browse files

Edit .gitlab-ci.yml.bkp

parent 27acf9de
Loading
Loading
Loading
Loading
Loading

.gitlab-ci.yml

0 → 100644
+14 −0
Original line number Diff line number Diff line
stages:
  - dockerize

dockerize_job:
  stage: dockerize
  tags:
    - john.smith-docker-registry-runner
  only:
  - main
  script:
  - docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
  - docker build -t "${CI_REGISTRY_IMAGE}/my-web-app-img:latest" .
  - docker push "${CI_REGISTRY_IMAGE}/my-web-app-img:latest"
  when: manual
 No newline at end of file

.gitlab-ci.yml.bkp

deleted100644 → 0
+0 −45
Original line number Diff line number Diff line
stages:
- build  # section name of the CI pipeline
- test   # other section executed AFTER 'build'
- deploy # other section AFTER 'build'

variables:
  GLOBAL_VAR_FOR_CI: unexpected text

build_job:
  stage: build   # section where to run the job
  tags:
    - patrizia.barria-docker-runner  # who is running the job
  script:
    - echo "Building the application..."
    - python -m py_compile program.py
    - echo "Building complete."

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

test_job_2:
  stage: test  # section where to run the job
  tags:
    - patrizia.barria-docker-runner  # who is running the job
  script:
    - echo "Running more tests in group 2..."
    - 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:
    - patrizia.barria-docker-runner  # who is running the job
  script:
    - echo "Installing the program..."
    - sleep 5
    - echo "Program deployed"
  when: always
 No newline at end of file