From ca953007edaf4ab2f19ee0a3576180094cc71490 Mon Sep 17 00:00:00 2001 From: Sebastian Pisula <sebastian.pisula@gmail.com> Date: Mon, 10 Feb 2025 12:20:00 +0100 Subject: [PATCH 1/6] feature(core): gitlab changes --- gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 2b6a74d..3fc4274 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -18,9 +18,9 @@ variables: stages: - build + - tests - deploy - purge_cache - - tests .template: &prepare-assets tags: @@ -58,8 +58,10 @@ stages: - ls -al - ssh-keyscan -H -p $DEPLOY_PORT $DEPLOY_HOST >> ~/.ssh/known_hosts - export RSYNC_RSH="ssh -p $DEPLOY_PORT -v -i ~/.ssh/id_rsa_demo_fs" - - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=.distignore ${CI_PROJECT_DIR}/web/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR - - ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && mv frontend/dist/assets/ public/ && mv frontend/dist/index.html public/index.html && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console cache:clear && $RUN_AFTER_DEPLOY" + - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/backend/.distignore ${CI_PROJECT_DIR}/web/backend/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR + - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/frontend/.distignore ${CI_PROJECT_DIR}/web/frontend/dist/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR/public + + # - ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && mv frontend/dist/assets/ public/ && mv frontend/dist/index.html public/index.html && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console cache:clear && $RUN_AFTER_DEPLOY" after_script: - $DEPLOY_AFTER_SCRIPT -- GitLab From 2f6cb0e25bca5773b347893dcbe984fc0958169d Mon Sep 17 00:00:00 2001 From: Sebastian Pisula <sebastian.pisula@gmail.com> Date: Mon, 10 Feb 2025 12:23:09 +0100 Subject: [PATCH 2/6] feature(core): gitlab changes --- gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 3fc4274..472e011 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -58,8 +58,8 @@ stages: - ls -al - ssh-keyscan -H -p $DEPLOY_PORT $DEPLOY_HOST >> ~/.ssh/known_hosts - export RSYNC_RSH="ssh -p $DEPLOY_PORT -v -i ~/.ssh/id_rsa_demo_fs" - - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/backend/.distignore ${CI_PROJECT_DIR}/web/backend/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR - - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/frontend/.distignore ${CI_PROJECT_DIR}/web/frontend/dist/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR/public + #- rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/backend/.distignore ${CI_PROJECT_DIR}/web/backend/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR + #- rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/frontend/.distignore ${CI_PROJECT_DIR}/web/frontend/dist/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR/public # - ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && mv frontend/dist/assets/ public/ && mv frontend/dist/index.html public/index.html && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console cache:clear && $RUN_AFTER_DEPLOY" after_script: -- GitLab From 345f1dadf4d445f67e16c3793ace158b5747a0ab Mon Sep 17 00:00:00 2001 From: Sebastian Pisula <sebastian.pisula@gmail.com> Date: Mon, 10 Feb 2025 12:24:39 +0100 Subject: [PATCH 3/6] feature(core): gitlab changes --- gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 472e011..89ce95e 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -91,7 +91,7 @@ composer install: artifacts: name: "vendor" paths: - - web/vendor + - web/backend/vendor image: composer:latest tags: - vendor @@ -99,7 +99,7 @@ composer install: interruptible: true script: - php -v - - cd web + - cd web/backend - composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} - composer install --optimize-autoloader --no-dev --no-scripts -- GitLab From d5f9652a514102395de019798dc657dd8d3c3bec Mon Sep 17 00:00:00 2001 From: Sebastian Pisula <sebastian.pisula@gmail.com> Date: Mon, 10 Feb 2025 12:27:35 +0100 Subject: [PATCH 4/6] feature(core): gitlab changes --- gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 89ce95e..fce8679 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -58,7 +58,7 @@ stages: - ls -al - ssh-keyscan -H -p $DEPLOY_PORT $DEPLOY_HOST >> ~/.ssh/known_hosts - export RSYNC_RSH="ssh -p $DEPLOY_PORT -v -i ~/.ssh/id_rsa_demo_fs" - #- rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/backend/.distignore ${CI_PROJECT_DIR}/web/backend/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR + - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/backend/.distignore ${CI_PROJECT_DIR}/web/backend/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR #- rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/frontend/.distignore ${CI_PROJECT_DIR}/web/frontend/dist/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR/public # - ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && mv frontend/dist/assets/ public/ && mv frontend/dist/index.html public/index.html && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console cache:clear && $RUN_AFTER_DEPLOY" -- GitLab From f29b253562812fcc3708c8a11df910137519dc68 Mon Sep 17 00:00:00 2001 From: Sebastian Pisula <sebastian.pisula@gmail.com> Date: Mon, 10 Feb 2025 12:38:12 +0100 Subject: [PATCH 5/6] feature(core): gitlab changes --- gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gitlab-ci.yml b/gitlab-ci.yml index fce8679..ad9e690 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -59,8 +59,7 @@ stages: - ssh-keyscan -H -p $DEPLOY_PORT $DEPLOY_HOST >> ~/.ssh/known_hosts - export RSYNC_RSH="ssh -p $DEPLOY_PORT -v -i ~/.ssh/id_rsa_demo_fs" - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/backend/.distignore ${CI_PROJECT_DIR}/web/backend/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR - #- rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/frontend/.distignore ${CI_PROJECT_DIR}/web/frontend/dist/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR/public - + - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/frontend/.distignore ${CI_PROJECT_DIR}/web/frontend/dist/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR/public # - ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && mv frontend/dist/assets/ public/ && mv frontend/dist/index.html public/index.html && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console cache:clear && $RUN_AFTER_DEPLOY" after_script: - $DEPLOY_AFTER_SCRIPT -- GitLab From 3f556d3712257e16a1a34d40ccbbcb77469c6c01 Mon Sep 17 00:00:00 2001 From: Sebastian Pisula <sebastian.pisula@gmail.com> Date: Mon, 10 Feb 2025 12:42:19 +0100 Subject: [PATCH 6/6] feature(core): gitlab changes --- gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab-ci.yml b/gitlab-ci.yml index ad9e690..946bf0a 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -60,7 +60,7 @@ stages: - export RSYNC_RSH="ssh -p $DEPLOY_PORT -v -i ~/.ssh/id_rsa_demo_fs" - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/backend/.distignore ${CI_PROJECT_DIR}/web/backend/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/frontend/.distignore ${CI_PROJECT_DIR}/web/frontend/dist/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR/public - # - ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && mv frontend/dist/assets/ public/ && mv frontend/dist/index.html public/index.html && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console cache:clear && $RUN_AFTER_DEPLOY" + - ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console cache:clear && $RUN_AFTER_DEPLOY" after_script: - $DEPLOY_AFTER_SCRIPT -- GitLab