From 48000cc84ddc97c16cacae3e91cdb95eeef0207e Mon Sep 17 00:00:00 2001 From: Nicolas Gelot Date: Tue, 15 Jul 2025 18:01:29 +0200 Subject: [PATCH] chore: add publish job --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a588665..5ec654a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,15 @@ stages: - test + - build - performance - dast + - publish - deploy +variables: + APP_NAME: "snappymail" + APP_PATH: "html/themes/" + include: - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: main @@ -17,6 +23,22 @@ include: - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: main file: "populate-code-climate-default-config.yml" + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" +# ref: main + ref: dev/001-publish-app-in-pkg-registry + file: "nc-publish-app.yml" + +copy-theme-files: + stage: build + image: + name: alpine/git:v2.49.0 + entrypoint: [""] + script: + - mkdir -p dist/${APP_NAME} + - git archive ${CI_COMMIT_SHA} | tar -x -C dist/${APP_NAME} + artifacts: + paths: + - dist/ .deploy:nextcloud-app-by-checkout: script: @@ -28,8 +50,8 @@ include: - | ssh $SSH_USER@$DEPLOYMENT_HOST /bin/bash -s << EOT set -e - git clone --depth 1 $CI_REPOSITORY_URL --branch $CI_COMMIT_REF_NAME --single-branch /tmp/${CI_JOB_ID}/${APP_NAME}/snappymail - sudo rsync -avzh --chown www-data:www-data --delete --exclude '.git*' /tmp/${CI_JOB_ID}/${APP_NAME} ${DEPLOYMENT_PATH}${APP_PATH} + git clone --depth 1 $CI_REPOSITORY_URL --branch $CI_COMMIT_REF_NAME --single-branch /tmp/${CI_JOB_ID}/Murena/${APP_NAME} + sudo rsync -avzh --chown www-data:www-data --delete --exclude '.git*' /tmp/${CI_JOB_ID}/Murena ${DEPLOYMENT_PATH}${APP_PATH} EOT - echo "SUCCESS" > .job_status after_script: -- GitLab