Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1136] Moved Installer publishing to GHA. #1142

Merged
merged 4 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -615,57 +615,6 @@ jobs:
# Use custom cache key for this workflow to make sure that caches from
# the main workflow are separated from this one.
DREVOPS_CI_DB_CACHE_BRANCH: drevops-dev-didi-ii

#-----------------------------------------------------------------------------
# Publish installer to install.drevops.com
# @todo Move this to GitHub Actions.
#-----------------------------------------------------------------------------
drevops-dev-deploy-installer:
<<: *runner_config
steps:
- checkout
- *step_process_codebase
- *step_setup_remote_docker
- *step_setup_docker_network
- add_ssh_keys:
fingerprints:
- "f6:b2:bb:a8:1d:9d:fb:03:c6:39:27:1e:71:bb:9a:9b"
- run:
name: Prepare installer.
command: |
cd .drevops/installer
composer install
sed -i "s/\"git-tag-ci\": \"dev\"/\"git-tag-ci\": \"${CIRCLE_TAG:-${CIRCLE_SHA1}}\"/g" box.json
composer build
mkdir -p /tmp/installer/docs
cp .build/install.phar /tmp/installer/docs/index.html
echo "install.drevops.com" > /tmp/installer/docs/CNAME
- run:
name: Configure SSH.
command: |
DEPLOY_DOCS_SSH_FINGERPRINT="f6:b2:bb:a8:1d:9d:fb:03:c6:39:27:1e:71:bb:9a:9b"
# Configure SSH to configure git and SSH to connect to remote servers for deployment.
[ "$(git config --global user.name)" == "" ] && git config --global user.name "Deployment robot"
[ "$(git config --global user.email)" == "" ] && git config --global user.email "[email protected]"
mkdir -p "${HOME}/.ssh/"
echo -e "Host *\n\tStrictHostKeyChecking no\n" > "${HOME}/.ssh/config"
DEPLOY_DOCS_SSH_FILE="${DEPLOY_DOCS_SSH_FINGERPRINT//:}"
DEPLOY_DOCS_SSH_FILE="${HOME}/.ssh/id_rsa_${DEPLOY_DOCS_SSH_FILE//\"}"
if [ -f "${DEPLOY_DOCS_SSH_FILE}" ]; then
echo "Found Deploy SSH key file ${DEPLOY_DOCS_SSH_FILE}"
ssh-add -D > /dev/null
ssh-add "${DEPLOY_DOCS_SSH_FILE}"
fi
- run:
name: Deploy installer
command: |
cd /tmp/installer
git init
git checkout -b main
git add -A
git commit -m "Automatically pushed from drevops/drevops"
git remote add origin [email protected]:drevops/installer.git
git push origin main --force
#=============================================================================
#;> DREVOPS_DEV

Expand Down Expand Up @@ -776,16 +725,6 @@ workflows:
tags:
only: /^[0-9]+(\.[0-9]+)+(-rc[0-9]+)?$/

# Publish DrevOps installer.
- drevops-dev-deploy-installer:
requires:
- drevops-dev-test
filters:
branches:
only: /^feature\/installer-update$/
tags:
only: /^[0-9]+(\.[0-9]+)+(-rc[0-9]+)?$/

# Test workflow to test DREVOPS_DB_DOCKER_IMAGE workflow for DB from file.
drevops-dev-didi-fi:
jobs:
Expand Down
6 changes: 5 additions & 1 deletion .drevops/installer/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.build
/.build
/.coverage-html
/.phpunit.cache
/cobertura.xml
/composer.lock
/vendor
/vendor-bin
35 changes: 21 additions & 14 deletions .drevops/installer/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "drevops/installer",
"type": "library",
"description": "Provides installer functionality.",
"description": "Provides DrevOps installer functionality.",
"license": "GPL-2.0-or-later",
"authors": [
{
Expand All @@ -17,16 +17,19 @@
"source": "https://github.com/drevops/drevops"
},
"require": {
"php": ">=8.2",
"symfony/console": "^6.3"
"php": ">=8.1",
"symfony/console": "^6.3 || ^7"
},
"require-dev": {
"phpunit/phpunit": "^10",
"bamarni/composer-bin-plugin": "^1.8",
"dealerdirect/phpcodesniffer-composer-installer": "^1",
"drupal/coder": "^8.3",
"mikey179/vfsstream": "^1.6",
"opis/closure": "^3.6",
"phpmd/phpmd": "^2.13",
"phpstan/phpstan": "^1.10",
"bamarni/composer-bin-plugin": "^1.8"
"phpunit/phpunit": "^10",
"rector/rector": "^0.19.0"
},
"autoload": {
"psr-4": {
Expand All @@ -43,24 +46,28 @@
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"bamarni/composer-bin-plugin": true
"bamarni/composer-bin-plugin": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"scripts": {
"lint": [
"phpcs",
"phpmd --exclude vendor,node_modules . text phpmd.xml || true",
"phpstan"
"phpstan",
"rector --dry-run"
],
"lint-fix": [
"rector --clear-cache",
"phpcbf"
],
"lint:fix": "phpcbf",
"test": "phpunit tests/phpunit/unit",
"test": "if [ \"${XDEBUG_MODE}\" = 'coverage' ]; then phpunit; else phpunit --no-coverage; fi",
"build": [
"@composer bin box require --dev humbug/box",
"box validate",
"box compile",
"ls -al .build/install.phar"
"box compile"
]
},
"bin": ["install"]
"bin": [
"install"
]
}
Loading