-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into rm-balsamic-qc
# Conflicts: # cg_hermes/config/balsamic_qc.py
- Loading branch information
Showing
17 changed files
with
4,180 additions
and
2,165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 5.1.0 | ||
current_version = 5.1.2 | ||
commit = True | ||
tag = True | ||
tag_name = {new_version} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,44 @@ | ||
## Description | ||
*This PR adds/fixes ...* | ||
|
||
### Added | ||
|
||
- | ||
|
||
### Changed | ||
|
||
- | ||
|
||
### Fixed | ||
|
||
- | ||
|
||
## Testing | ||
|
||
### How to prepare for test | ||
- [ ] ssh to hasta.scilifelab.se | ||
- [ ] Use stage: `us` | ||
- [ ] Paxa the environment: `paxa` | ||
- [ ] Install on stage (example for hasta): | ||
`bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_hermes -t hermes -b [THIS-BRANCH-NAME]` | ||
|
||
- [ ] ssh to Hasta | ||
- [ ] Test your branch with | ||
|
||
```bash | ||
hermes-test-deploy <branch-name> | ||
hermes-test <command here> | ||
``` | ||
|
||
### How to test | ||
- [ ] Do ... | ||
- [ ] login to ... | ||
- [ ] do ... | ||
|
||
### Expected test outcome | ||
- [ ] Check that ... | ||
### Expected test result | ||
- [ ] check that ... | ||
- [ ] Take a screenshot and attach or copy/paste the output. | ||
|
||
## Review | ||
- [ ] Tests executed by | ||
- [ ] code approved by | ||
- [ ] tests executed by | ||
- [ ] "Merge and deploy" approved by | ||
Thanks for filling in who performed the code review and the test! | ||
|
||
### This [version](https://semver.org/) is a | ||
This [version](https://semver.org/) is a: | ||
- [ ] **MAJOR** - when you make incompatible API changes | ||
- [ ] **MINOR** - when you add functionality in a backwards compatible manner | ||
- [ ] **PATCH** - when you make backwards compatible bug fixes or documentation/instructions | ||
|
||
## Implementation Plan | ||
- [ ] Document in ... | ||
- [ ] Deploy this branch | ||
- [ ] Inform to ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build and publish docker image on push | ||
|
||
on: [push] | ||
|
||
jobs: | ||
docker-image-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Extract branch name and remove illegal chars | ||
id: get_branch_name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")" | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./ | ||
file: ./Dockerfile | ||
push: true | ||
tags: "clinicalgenomics/hermes:${{steps.get_branch_name.outputs.branch}}, clinicalgenomics/hermes:latest" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build and publish image on new release event | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
docker-image-release_push: | ||
# Push to Docker Hub when a new release is created | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check Out Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./ | ||
file: ./Dockerfile | ||
push: true | ||
tags: "clinicalgenomics/hermes:${{github.event.release.tag_name}}, clinicalgenomics/hermes:latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,21 @@ | ||
# Steps | ||
# Deployment guide | ||
This includes instructions for deploying Hermes in the Clinical Genomics :hospital: setting. | ||
|
||
When all tests done and successful and PR is approved by codeowners, follow these steps: | ||
## Steps | ||
When all tests are done and successful and the PR is approved by codeowners, follow these steps: | ||
|
||
1. Select "Squash and merge" to merge branch into default branch (master/main). | ||
|
||
|
||
2. A prompt for writing merge commit message will pop up. | ||
|
||
|
||
3. Find the title of the pull request already pre-filled in the merge commit title, or copy and paste | ||
the title if not. | ||
|
||
|
||
4. Append version increment value `( major | minor | patch )` to specify what kind of release is to be created. | ||
|
||
|
||
5. Fill in markdown formatted changelog in merge commit comment details: | ||
|
||
` ### Added ` | ||
### Deploy feature branch for testing | ||
To deploy your feature branch to test it, run | ||
1. `hermes-test-deploy <branch_name>` | ||
2. `hermes-test --help` or the command you want to test. | ||
|
||
` ### Changed ` | ||
This will pull the latest image tagged with your branch from Dockerhub and make it available with `hermes-test`. Note that it is not necessary to paxa the environment to do this. | ||
|
||
` ### Fixed ` | ||
|
||
6. Review the details once again and merge the branch into master. | ||
|
||
|
||
7. Wait for GitHub actions to process the event, bump version, create release, publish to Dockerhub and PyPi. | ||
|
||
|
||
8. Deploy master to stage: | ||
1. Log in to appropriate server `ssh <server.scilifelab.se>` | ||
2. `us` | ||
3. Request stage environment `paxa` and follow instructions | ||
4. ```shell | ||
bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_hermes -t hermes -b main | ||
``` | ||
5. Make sure that installation was successful | ||
|
||
|
||
9. Deploy master to production | ||
1. Log in to appropriate server `ssh <server.scilifelab.se>` | ||
2. `up` | ||
3. ```shell | ||
bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-prod.sh -e P_hermes -t hermes -b main | ||
``` | ||
4. Make sure that installation was successful | ||
|
||
|
||
11. Take a screenshot or copy log text and post as a comment on the PR. Screenshot should include environment and that it succeeded. | ||
|
||
### Deploy to stage and production | ||
1. Select "Squash and merge" to merge branch into default branch (master/main). | ||
2. Append version increment value `( major | minor | patch )` in the commit message to specify what kind of release is to be created. | ||
3. Review the details and merge the branch into master. | ||
4. Deploy the latest version to stage and production with `hermes-deploy`. | ||
5. Take a screenshot or copy log text and post as a comment on the PR. Screenshot should include environment and that it succeeded. | ||
6. Great job :whale2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM docker.io/library/python:3.12-slim-bullseye | ||
|
||
WORKDIR /app | ||
COPY . /app/ | ||
|
||
RUN pip install --no-cache-dir --ignore-installed poetry \ | ||
&& poetry config virtualenvs.create false \ | ||
&& poetry install --no-cache --only main | ||
|
||
ENTRYPOINT ["hermes"] |
Oops, something went wrong.