Skip to content

Commit

Permalink
Merge pull request #121 from ByteInternet/proper_deployer_dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
tdgroot authored Nov 4, 2024
2 parents 67fe730 + 5e843bf commit 22a915c
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 29 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
steps:
- name: Checkout hypernode-deploy
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Run general testsuite
if: ${{ matrix.testsuite == 'general' }}
run: MAGENTO_REPO=./magento2 ./runtests.sh general
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@ If you are looking to see how the internals of the deployment tool work or even

This project builds the `hypernode/deploy` container image, which can be found on [quay.io/hypernode/deploy](https://quay.io/hypernode/deploy).

## Updating deployer dependency

Deployer is an integral part of Hypernode Deploy.
The official packagist distribution (and the git tags) are just phar distributions with all the engine code stripped away.
To properly install Deployer as a dependency, we install a very simple fork, which has git tags based on the engine code.

Whenever a new Deployer version is released, here's the process:
- Sync the fork [ByteInternet/deployer](https://github.com/ByteInternet/deployer)
- Locate the commit for the release in the master branch.
- Usually this comes down to finding the commit that was pushed most recent to the release tag.
- Clone/update the fork locally.
- Run `git checkout <commit_sha>`
- Run `git tag v<version>`
- Run `git push --tags`

Finally, to utilize the new fork in Hypernode Deploy, you can simply change the deployer/deployer dependency in the `composer.json` file.

## Building and running a local image

If you don't want to use a pre-built image from https://quay.io/hypernode/deploy or if you are doing development on this project and you want to test out your changes, you can built an image locally and use that.
Expand Down
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"ext-pcntl": "*",
"ext-zlib": "*",
"composer-runtime-api": "^2",
"deployer/deployer": "dev-master#a3bab59 as v7.4.0",
"deployer/deployer": "v7.4.0",
"doctrine/annotations": "^1.6",
"guzzlehttp/guzzle": "^7.5",
"hypernode/api-client": "^0.4",
Expand Down Expand Up @@ -50,5 +50,11 @@
"phpro/grumphp-shim": true,
"php-http/discovery": true
}
},
"repositories": {
"deployer-fork": {
"type": "vcs",
"url": "https://github.com/ByteInternet/deployer"
}
}
}
62 changes: 36 additions & 26 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 22a915c

Please sign in to comment.