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

Lagoon gh deployment v6 #1625

Closed
wants to merge 3 commits into from
Closed

Lagoon gh deployment v6 #1625

wants to merge 3 commits into from

Conversation

rasben
Copy link
Contributor

@rasben rasben commented Oct 3, 2024

Link to issue

Please add a link to the issue being addressed by this change.

Description

Please include a short description of the suggested change and the reasoning behind the approach you have chosen.

Screenshot of the result

If your change affects the user interface you should include a screenshot of the result with the pull request.

Additional comments or questions

If you have any further comments or questions for the reviewer them please add them here.

rasben added 3 commits October 2, 2024 13:02
We can use `.lagoon.yml` to set up a GH deployment,
that we can use to listen for in GH actions.
This is an alternative to us spending a lot of GH minutes
just waiting for the site to become available.

By using bash traps, we can also send back error codes
when `drush deploy` (or other stuff) goes wrong.
This means we have to remove the `set -e`, but we
get around that by calling exit in the catcher.

Ontop of that, also setting up `concurrency` rules to
`ci-tests`, so if a second push is made, we cancel the
old and unrelated workflow.

With this set up, a new GH Action can be created, if you
need a link to the environment:

```
on:
  deployment_status

jobs:
  tests:
    if: github.event.deployment_status.state == 'success'
    runs-on: ubuntu-latest
    steps:
      - run: echo "$URL"
        env:
          URL: ${{ github.event.deployment_status.target_url }}
```
@rasben rasben closed this Oct 3, 2024
@rasben rasben deleted the lagoon-gh-deployment-v6 branch October 3, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants