Commit c8e02a09 authored by Davide Ricci's avatar Davide Ricci
Browse files

Update .gitlab-ci.yml file

parent 117da85a
Loading
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -5,8 +5,8 @@ image: python:3.12
variables:
  PROJECT: "noctua"
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
  FORMAT_TARGETS: "$PROJECT" # For sed, autopep8, isort
  PYLINT_TARGETS: "$PROJECT" # For pylint
  FORMAT_TARGETS: "${PROJECT}" # For sed, autopep8, isort
  PYLINT_TARGETS: "${PROJECT}" # For pylint
  GIT_USER_EMAIL: "davide.ricci@inaf.it"
  GIT_USER_NAME: "Davide GitLab CI"
  FORMATTED_BRANCH_NAME: "validated"
@@ -19,10 +19,10 @@ cache:

stages:
  - setup_and_format 
  - lint # A stage for checks that don't modify code (like pylint)
  - lint # Does not modify code
  - auto_commit 

# Job 1: Install $PROJECT and its dependencies
# Job 1: Install ${PROJECT} and its dependencies
install_project:
  stage: setup_and_format 
  tags:
@@ -32,9 +32,9 @@ install_project:
    - ls -la
    - echo "Python version $(python -v)"
    - pip install --upgrade pip
    - echo "Installing project '$PROJECT' and its dependencies..."
    - echo "Installing project '${PROJECT}' and its dependencies..."
    - pip install -e .
    - echo "$PROJECT installation complete."
    - echo "${PROJECT} installation complete."
  artifacts:
    paths:
      # Pass the entire workspace. This includes the checked-out code
@@ -137,7 +137,6 @@ commit_formatted_code:
    - git config --global user.name "CI Bot"
  script:
    - echo "Pushing on ${FORMATTED_BRANCH_NAME} branch..."
  after_script:
    - git add .
    - MAIN_COMMIT_MSG=$(git log -1 --pretty=%B $CI_COMMIT_SHA)
    - | 
@@ -147,7 +146,7 @@ commit_formatted_code:
        - Job ID: $CI_JOB_ID
        - Pipeline ID: $CI_PIPELINE_ID"
    - git pull
    - git push https://davide.ricci:$GITLAB_TOKEN@www.ict.inaf.it/gitlab/davide.ricci/software-di-controllo.git $(FORMATTED_BRANCH_NAME)
    - git push https://davide.ricci:$GITLAB_TOKEN@www.ict.inaf.it/gitlab/davide.ricci/software-di-controllo.git ${FORMATTED_BRANCH_NAME}

#   before_script:
#     # Git and SSH setup (ensure SSH_DEPLOY_KEY CI/CD variable is set as File type)