diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ccdf3d9c..1458929e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,6 @@ variables: MKDOCS_COMPOSE_FILE: containers/mkdocs/docker-compose.mkdocs.yml APP_COMPOSE_FILE: containers/app/docker-compose.yml CI_TRIGGER_TASK_NAME: null - # just run pre-commit hooks on the files that changed, but don't fix them PRE_COMMIT_AUTO_FIX: 0 @@ -322,12 +321,8 @@ chown-non-root-artifacts: script: - echo "Creating artifacts directory" - mkdir -p ${CI_PROJECT_DIR}/.artifacts - - echo "Change owner of artifacts directory to 1000:1000" - - chown -R 1000:1000 ${CI_PROJECT_DIR}/.artifacts - - echo "Change ownership of dbt docs requirements" - - chown -R 1000:1000 ${CI_PROJECT_DIR}/${DBT_PROJECT_DIR_NAME} - - echo "Change ownership of mkdocs requirements" - - chown -R 1000:1000 ${CI_PROJECT_DIR}/docs && chown 1000:1000 ${CI_PROJECT_DIR}/mkdocs.yml + - echo "Change ownership of ${CI_PROJECT_DIR} to 1000:1000" + - chown -R 1000:1000 ${CI_PROJECT_DIR} rules: - if: $CI_COMMIT_REF_NAME == "main" && $CI_PIPELINE_SOURCE == "push" when: always @@ -339,6 +334,7 @@ chown-non-root-artifacts: artifacts: paths: - .artifacts + - ${CI_PROJECT_DIR}/${DBT_PROJECT_DIR_NAME} tags: - somenergia-et @@ -354,7 +350,6 @@ generate-dbt-docs: DBT_DOCS_ARTIFACT_DIR: ${CI_PROJECT_DIR}/${DBT_PROJECT_DIR_NAME}/target image: ${SOM_HARBOR_DADES_URL}/${SOM_PROJECT_NAME}-dbt-docs:latest script: - - if [ $CI_PIPELINE_DEBUG_FLAG==true ]; then sleep 1h; fi - cd ${CI_PROJECT_DIR}/${DBT_PROJECT_DIR_NAME} - dbt deps --target ${DBT_TARGET_NAME} - dbt docs generate --target ${DBT_TARGET_NAME}