diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 262107e..3c70f04 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,13 +12,19 @@ variables: ARTIFACTORY_REPO: "https://repo.cdek.ru/artifactory/erp-cms" build_tag: + image: docker-proxy.cdek.ru/php:8.2-alpine stage: build tags: - docker only: - tags before_script: + - export COREPACK_NPM_REGISTRY="https://repo.cdek.ru/repository/cdek-npm" - export RELEASE_VERSION=$(echo "${CI_COMMIT_TAG}" | sed 's/v//') + - sed -i 's/dl-cdn.alpinelinux.org/repo.cdek.ru\/repository/g' /etc/apk/repositories + - apk add nodejs-current yarn composer + - corepack enable + - corepack install -g --cache-only .yarn/corepack.tgz script: - sed -i "s/\(Version:\)\( *\).*/\1\2${RELEASE_VERSION}/" cdek.php - sed -i "s/\(Stable tag:\)\( *\).*/\1\2${RELEASE_VERSION}/" readme.txt @@ -34,6 +40,7 @@ build_tag: - cdek.zip build_custom: + image: docker-proxy.cdek.ru/php:8.2-alpine rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH when: always @@ -46,6 +53,7 @@ build_custom: paths: - cdek.zip before_script: + - !reference [build_tag, before_script] - export RELEASE_VERSION="${CI_COMMIT_REF_NAME}#${CI_COMMIT_SHORT_SHA}" script: - !reference [build_tag, script] @@ -63,7 +71,6 @@ upload: - export RELEASE_VERSION=$(echo "${CI_COMMIT_TAG}" | sed 's/v//') - export ARCHIVE_VERSION=$(echo "${RELEASE_VERSION}" | sed 's/\./_/g') script: - - zip -r cdek.zip cdek - curl -u "${ARTIFACTORY_LOGIN}":"${ARTIFACTORY_PASS}" --upload-file cdek.zip "${ARTIFACTORY_REPO}/$CI_PROJECT_NAME/$CI_COMMIT_BRANCH/wordpress_${ARCHIVE_VERSION}.zip" release: @@ -85,6 +92,7 @@ release: deploy_staging: stage: deploy + image: docker-proxy.cdek.ru/alpine script: - rsync -avz -e "ssh -o StrictHostKeyChecking=no" --delete ./cdek.zip ${DEPLOY_USERNAME}@${DEPLOY_NODE}:${DEPLOY_DEST_DIR}/plugins - ssh ${DEPLOY_USERNAME}@${DEPLOY_NODE} "cd ${DEPLOY_DEST_DIR}/core && docker compose restart app" @@ -101,6 +109,7 @@ deploy_staging: name: dev2 url: https://wordpress-cms.dev2.cdek.ru before_script: + - sed -i 's/dl-cdn.alpinelinux.org/repo.cdek.ru\/repository/g' /etc/apk/repositories - test -r ~/.ssh || mkdir -p ~/.ssh - 'command -v ssh-agent >/dev/null || ( apk update && apk add openssh-client )' - 'command -v rsync >/dev/null || ( apk update && apk add rsync )' @@ -108,5 +117,3 @@ deploy_staging: - chmod 600 ~/.ssh/id_rsa - eval $(ssh-agent -s) - ssh-add ~/.ssh/id_rsa - - apk add curl zip - - zip -r cdek.zip cdek diff --git a/.yarn/corepack.tgz b/.yarn/corepack.tgz new file mode 100644 index 0000000..dfc0c64 Binary files /dev/null and b/.yarn/corepack.tgz differ diff --git a/package.json b/package.json index 6fde634..af90112 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ }, "volta": { "node": "20.13.1", - "yarn": "4.2.2" + "yarn": "4.3.1" }, - "packageManager": "yarn@4.2.2" + "packageManager": "yarn@4.3.1" }