From aad8a61cfcc7fee4cb6548dcadeb1d0e3375d5ea Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 5 Sep 2022 15:01:07 +0100 Subject: [PATCH 001/143] build: Improvements to the build Saves some time and re-organises Dockerfile Relies on some changes moving to the backend Dockerfile --- Dockerfile | 55 ++++++++++++++++++++++-------------------------------- 1 file changed, 22 insertions(+), 33 deletions(-) diff --git a/Dockerfile b/Dockerfile index 05503ff..348e15a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,50 +3,39 @@ ARG BE_IMAGE_TAG=latest FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG} ENV APP_ROOT /code -ENV APP_USER_ID 2000 -RUN useradd -c 'Container user' --user-group --uid ${APP_USER_ID} --home-dir ${APP_ROOT} -s /bin/bash frag -RUN apt-get update -y &&\ - apt-get install -y wget gnupg bzip2 &&\ - apt-get clean -# Install yarn (instead of npm) +# Install yarn RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - -RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list -RUN apt-get update -y && apt-get install -y yarn && apt-get clean +RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ + apt-get update -y && \ + apt-get install -y \ + yarn && \ + apt-get clean # Install nodejs -RUN wget -q https://nodejs.org/download/release/v12.22.11/node-v12.22.11-linux-x64.tar.gz &&\ - mkdir -p /usr/local/lib/nodejs &&\ - tar -xf node-v12.22.11-linux-x64.tar.gz -C /usr/local/lib/nodejs &&\ - rm node-v12.22.11-linux-x64.tar.gz +RUN wget -q https://nodejs.org/download/release/v12.22.11/node-v12.22.11-linux-x64.tar.gz && \ + mkdir -p /usr/local/lib/nodejs && \ + tar -xf node-v12.22.11-linux-x64.tar.gz -C /usr/local/lib/nodejs && \ + rm node-v12.22.11-linux-x64.tar.gz ENV PATH /usr/local/lib/nodejs/node-v12.22.11-linux-x64/bin:$PATH +ADD docker-entrypoint.sh ${APP_ROOT}/docker-entrypoint.sh +ADD LICENSE /LICENSE +ADD README.md /README.md +RUN chmod 755 ${APP_ROOT}/docker-entrypoint.sh + # Add in the frontend code # By default this is hosted on the xchem project's master branch # but it can be redirected with a couple of build-args. +# And then continue to build it. +WORKDIR ${APP_ROOT}/static ARG FE_NAMESPACE=xchem ARG FE_BRANCH=master -RUN git clone https://github.com/${FE_NAMESPACE}/fragalysis-frontend ${APP_ROOT}/frontend -RUN cd ${APP_ROOT}/frontend && git checkout ${FE_BRANCH} - -# Now build the code -RUN cd ${APP_ROOT}/frontend && yarn install -RUN cd ${APP_ROOT}/frontend && yarn run build - -ADD docker-entrypoint.sh ${APP_ROOT}/docker-entrypoint.sh - -# Symlink these -RUN mkdir ${APP_ROOT}/static -RUN ln -s ${APP_ROOT}/frontend/bundles/ ${APP_ROOT}/static/bundles - -RUN chmod 755 ${APP_ROOT}/docker-entrypoint.sh -RUN chmod 755 ${APP_ROOT}/makemigrations.sh -RUN chmod 755 ${APP_ROOT}/launch-stack.sh - -RUN chown -R ${APP_USER_ID} ${APP_ROOT} /run /var - -ADD LICENSE /LICENSE -ADD README.md /README.md +RUN git clone https://github.com/${FE_NAMESPACE}/fragalysis-frontend ${APP_ROOT}/frontend && \ + cd ${APP_ROOT}/frontend && git checkout ${FE_BRANCH} && \ + cd ${APP_ROOT}/frontend && yarn install && \ + cd ${APP_ROOT}/frontend && yarn run build && \ + ln -s ${APP_ROOT}/frontend/bundles/ ${APP_ROOT}/static/bundles WORKDIR ${APP_ROOT} CMD ["./docker-entrypoint.sh"] From c80b61bafdb5acd47f7de73556be02ac4f1061c6 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 15 Sep 2022 08:40:48 +0100 Subject: [PATCH 002/143] Switch to ENV for stack version --- .github/workflows/build-main.yaml | 21 ++++++++++----------- Dockerfile | 2 +- VERSION | 1 - 3 files changed, 11 insertions(+), 13 deletions(-) delete mode 100644 VERSION diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index fee4f10..3076a28 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -162,19 +162,19 @@ jobs: echo set-output name=STACK_NAMESPACE::${STACK_NAMESPACE} echo ::set-output name=STACK_NAMESPACE::${STACK_NAMESPACE} + # Set a version + STACK_VERSION="0.0.0" + if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then STACK_VERSION="${{ env.GITHUB_REF_SLUG }}"; + else STACK_VERSION="${{ github.ref_name }}.${{ github.run_number }}"; fi + echo set-output name=STACK_VERSION::${STACK_VERSION} + echo ::set-output name=STACK_VERSION::${STACK_VERSION} + # What image tag are we using? 'latest' (if not tagged) or a GitHub tag? TAG="latest" if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then TAG="${{ env.GITHUB_REF_SLUG }}"; fi echo set-output name=tag::${TAG} echo ::set-output name=tag::${TAG} - # Set a version - VERSION="0.0.0" - if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then VERSION="${{ env.GITHUB_REF_SLUG }}"; - else VERSION="${{ github.ref_name }}.${{ github.run_number }}"; fi - echo set-output name=version::${VERSION} - echo ::set-output name=version::${VERSION} - # Do we push, i.e. is DOCKERHUB_USERNAME defined? echo set-output name=push::${{ env.DOCKERHUB_USERNAME != '' }} echo ::set-output name=push::${{ env.DOCKERHUB_USERNAME != '' }} @@ -206,10 +206,8 @@ jobs: echo BE_IMAGE_TAG=${{ steps.vars.outputs.BE_IMAGE_TAG }} echo FE_NAMESPACE=${{ steps.vars.outputs.FE_NAMESPACE }} echo FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} - - name: Set VERSION file - run: | - echo VERSION="${{ steps.vars.outputs.version }}" - echo "${{ steps.vars.outputs.version }}" > VERSION + echo STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} + echo STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} - name: Build uses: docker/build-push-action@v2 with: @@ -220,6 +218,7 @@ jobs: FE_NAMESPACE=${{ steps.vars.outputs.FE_NAMESPACE }} FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} STACK_NAMESPACE: ${{ steps.vars.outputs.STACK_NAMESPACE }} + STACK_VERSION: ${{ steps.vars.outputs.STACK_VERSION }} - name: Test run: > docker-compose -f docker-compose.test.yml up diff --git a/Dockerfile b/Dockerfile index 9499b66..7b795e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,7 @@ ENV BE_IMAGE_TAG ${BE_IMAGE_TAG} ENV FE_NAMESPACE ${FE_NAMESPACE} ENV FE_BRANCH ${FE_BRANCH} ENV STACK_NAMESPACE ${STACK_NAMESPACE} +ENV STACK_VERSION ${STACK_VERSION} ENV APP_ROOT /code ENV APP_USER_ID 2000 @@ -66,7 +67,6 @@ RUN chmod 755 ${APP_ROOT}/launch-stack.sh # and is set by the corresponding GitHub Action COPY LICENSE /LICENSE COPY README.md /README.md -COPY VERSION /code/VERSION WORKDIR ${APP_ROOT} CMD ["./docker-entrypoint.sh"] diff --git a/VERSION b/VERSION deleted file mode 100644 index bd52db8..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.0.0 \ No newline at end of file From 4f39e03948cce42429caa3edeab5c251ccdfc0d4 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 15 Sep 2022 08:48:01 +0100 Subject: [PATCH 003/143] - Remover branch 403 from Actions --- .github/workflows/build-main.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 3076a28..e529af1 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -65,7 +65,6 @@ on: branches: - 'master' - 'main' - - '703' tags: - '**' # Build if triggered externally. From 35f553043ce6f96e095e403ff556008ae7acd163 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 15 Sep 2022 12:56:53 +0100 Subject: [PATCH 004/143] Attempt to fix STACK VERSION --- .github/workflows/build-main.yaml | 1 + Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index e529af1..3076a28 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -65,6 +65,7 @@ on: branches: - 'master' - 'main' + - '703' tags: - '**' # Build if triggered externally. diff --git a/Dockerfile b/Dockerfile index 7b795e5..7f341e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG} # Us ARG STACK_NAMESPACE=xchem +ARG STACK_VERSION=0.0.0 # Backend origin (a container) ARG BE_NAMESPACE=xchem ARG BE_IMAGE_TAG=latest From 2aa0c51d5bff5c2c7e650c1afff48a5978d881e6 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 15 Sep 2022 13:46:31 +0100 Subject: [PATCH 005/143] Another attempt at preserving the ENV --- Dockerfile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7f341e3..e4800eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,25 @@ ARG BE_NAMESPACE=xchem ARG BE_IMAGE_TAG=latest +ARG FE_NAMESPACE=xchem +ARG FE_BRANCH=master +ARG STACK_NAMESPACE=xchem +ARG STACK_VERSION=0.0.0 FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG} # We have to repeat the ARG assignments... # ARGs are reset during the FROM action +# See https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact # Us -ARG STACK_NAMESPACE=xchem -ARG STACK_VERSION=0.0.0 +ARG STACK_NAMESPACE +ARG STACK_VERSION # Backend origin (a container) -ARG BE_NAMESPACE=xchem -ARG BE_IMAGE_TAG=latest +ARG BE_NAMESPACE +ARG BE_IMAGE_TAG # By default this is hosted on the xchem project's master branch # but it can be redirected with a couple of build-args. -ARG FE_NAMESPACE=xchem -ARG FE_BRANCH=master +ARG FE_NAMESPACE +ARG FE_BRANCH # Set the container ENV to record the origin of the b/e and f/e ENV BE_NAMESPACE ${BE_NAMESPACE} From 87aa5402a122b9dac769e0a279cb45fc8a692a67 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 15 Sep 2022 14:04:47 +0100 Subject: [PATCH 006/143] Typo in variable assignment --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 3076a28..c2761ed 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -217,8 +217,8 @@ jobs: BE_IMAGE_TAG=${{ steps.vars.outputs.BE_IMAGE_TAG }} FE_NAMESPACE=${{ steps.vars.outputs.FE_NAMESPACE }} FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} - STACK_NAMESPACE: ${{ steps.vars.outputs.STACK_NAMESPACE }} - STACK_VERSION: ${{ steps.vars.outputs.STACK_VERSION }} + STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} + STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} - name: Test run: > docker-compose -f docker-compose.test.yml up From 52d10802c738360065d0217ca88d0b03e1e2cf7f Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 15 Sep 2022 14:23:57 +0100 Subject: [PATCH 007/143] Removed build on branch 703 --- .github/workflows/build-main.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index c2761ed..349ccd4 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -65,7 +65,6 @@ on: branches: - 'master' - 'main' - - '703' tags: - '**' # Build if triggered externally. From 60a38840f68022f452888af8e102b13079d4caf3 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 27 Sep 2022 10:22:06 +0100 Subject: [PATCH 008/143] Changed default env --- .github/workflows/build-main.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 349ccd4..9116088 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -10,7 +10,7 @@ name: build main # Every tag is deployed to staging and every production-grade tag # (of the form N.N.N) is deployed to production.defaults: # -# Actions also run on a schedule - the the container is built, tested, +# Actions also run on a schedule - the container is built, tested, # pushed and deployed (if the relevant secrets are set) based on # a defined schedule. # @@ -26,7 +26,7 @@ name: build main # # BE_IMAGE_TAG optional - default latest # BE_NAMESPACE optional - default xchem -# FE_BRANCH optional - default master +# FE_BRANCH optional - default production # FE_NAMESPACE optional - default xchem # STACK_NAMESPACE optional - default xchem # @@ -96,10 +96,10 @@ env: # For Jobs conditional on the presence of a secret see this Gist... # https://gist.github.com/jonico/24ffebee6d2fa2e679389fac8aef50a3 BE_IMAGE_TAG: latest - BE_NAMESPACE: xchem - FE_BRANCH: master - FE_NAMESPACE: xchem - STACK_NAMESPACE: xchem + BE_NAMESPACE: alanbchristie + FE_BRANCH: production + FE_NAMESPACE: alanbchristie + STACK_NAMESPACE: alanbchristie # Common slack notification variables. # Used in the rtCamp/action-slack-notify Action. SLACK_USERNAME: ActionBot From 894506d0c031e812495c6bef9702606fde8150ac Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 27 Sep 2022 11:37:12 +0100 Subject: [PATCH 009/143] Readme tweak --- README.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a64e9ce..cf5ab93 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,28 @@ -[![build main](https://github.com/xchem/fragalysis-stack/actions/workflows/build-main.yaml/badge.svg)](https://github.com/xchem/fragalysis-stack/actions/workflows/build-main.yaml) +[![build main](https://github.com/alanbchristie/fragalysis-stack/actions/workflows/build-main.yaml/badge.svg)](https://github.com/alanbchristie/fragalysis-stack/actions/workflows/build-main.yaml) [![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/xchem/fragalysis-stack) [![Version](http://img.shields.io/badge/version-0.0.1-blue.svg?style=flat)](https://github.com/xchem/fragalysis-stack) [![License](http://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat)](https://github.com/xchem/fragalysis-stack/blob/master/LICENSE.txt) # Fragalysis stack -Docker setup for building a Django, RDKit and Postgres stack with neo4j -Simply run docker-compose up +Docker setup for building a Django, RDKit and Postgres stack with neo4j. +There is no application code in the repository, it is a repository where the +stack application is *assembled* using environment variables that define the +origin of the [Backend] (container image) and [Frontend] (code). + +The "official" stack is built and deployed using GitHub Actions and is deployed +to production when tagged (with a production-grade tag). + +## Local development +A docker-compose file provides a convenient way of launching the stack locally. +The suitability of the various docker-compose files is the responsibility of +the developer. + +Check the compose file, adjust accordingly then: - + + docker-compose up + +--- + +[backend]: https://github.com/xchem/fragalysis-stack +[frontend]: https://github.com/xchem/fragalysis-frontend From 62178d0085c4b65b4f7ddf053271fdbc5c25a6ae Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 27 Sep 2022 11:48:00 +0100 Subject: [PATCH 010/143] Updated action (using 1.0.0 for b/e & f/e) README tweak --- .github/workflows/build-main.yaml | 13 +++++++++++-- README.md | 7 +++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 9116088..036852e 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -95,9 +95,18 @@ env: # # For Jobs conditional on the presence of a secret see this Gist... # https://gist.github.com/jonico/24ffebee6d2fa2e679389fac8aef50a3 - BE_IMAGE_TAG: latest + # + # New production stack builds should always result in a change to one + # or both of the Backend or Frontend tags. i.e. before we make a production + # release the author needs to change one or both of: - + # + # - BE_IMAGE_TAG + # - FE_BRANCH + # + # Commit the changes and then tag or make a release from the stack repository. + BE_IMAGE_TAG: 1.0.0 BE_NAMESPACE: alanbchristie - FE_BRANCH: production + FE_BRANCH: 1.0.0 FE_NAMESPACE: alanbchristie STACK_NAMESPACE: alanbchristie # Common slack notification variables. diff --git a/README.md b/README.md index cf5ab93..bcaebfe 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,13 @@ origin of the [Backend] (container image) and [Frontend] (code). The "official" stack is built and deployed using GitHub Actions and is deployed to production when tagged (with a production-grade tag). +When an official release is made you MUST make sure the default +backend and frontend variables are updated so the application is based on +the correct stable (tagged) backend and frontend code. Specifically: - + +- `BE_IMAGE_TAG` +- `FE_BRANCH` (called "branch" but should be a frontend tag) + ## Local development A docker-compose file provides a convenient way of launching the stack locally. The suitability of the various docker-compose files is the responsibility of From bf1bb6fd2f493d690e3eb80b546b44fa73954db3 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 27 Sep 2022 11:57:27 +0100 Subject: [PATCH 011/143] Experiment with f/e tag 3.0.0 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 036852e..bb61b1b 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -106,7 +106,7 @@ env: # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 1.0.0 BE_NAMESPACE: alanbchristie - FE_BRANCH: 1.0.0 + FE_BRANCH: 3.0.0 FE_NAMESPACE: alanbchristie STACK_NAMESPACE: alanbchristie # Common slack notification variables. From dbff6cba2878e813c88e04e54ab94c5fef6a3391 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 27 Sep 2022 12:02:35 +0100 Subject: [PATCH 012/143] Use of backend 2.0.0 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index bb61b1b..784a75b 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -104,7 +104,7 @@ env: # - FE_BRANCH # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 1.0.0 + BE_IMAGE_TAG: 2.0.0 BE_NAMESPACE: alanbchristie FE_BRANCH: 3.0.0 FE_NAMESPACE: alanbchristie From 29302d5cbe1731a98da05697b1bbedd00840813a Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 27 Sep 2022 14:46:31 +0100 Subject: [PATCH 013/143] Re-ordered workflow variables --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 784a75b..81d0de3 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -105,8 +105,8 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2.0.0 - BE_NAMESPACE: alanbchristie FE_BRANCH: 3.0.0 + BE_NAMESPACE: alanbchristie FE_NAMESPACE: alanbchristie STACK_NAMESPACE: alanbchristie # Common slack notification variables. From fedabad7c78f69e8e02ef6ea9c8092a5d622946c Mon Sep 17 00:00:00 2001 From: rsanchezgarc Date: Thu, 29 Sep 2022 23:56:56 +0200 Subject: [PATCH 014/143] Update changelog.md --- changelog.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 0fb31c4..119d0f7 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,38 @@ # Changelog (from 22/07/2021) + +## 29/09/2022 - version 2022.09.0 +Job launcher release +### Frontend ([PR #300 #302 #306-#312 #314-#320](https://github.com/xchem/fragalysis-frontend/pull/320)). +:heavy_plus_sign: New functionality: Job Launcher +:heavy_plus_sign: Improved performance +:heavy_plus_sign: Bug fixing: Layout, filters, snapshots + +### Backend ([PR #330 #331 #334 #336-#347](https://github.com/xchem/fragalysis-backend/pull/347)). +:heavy_plus_sign: New functionality: Job Launcher +:heavy_plus_sign: Improved container building + +### Resolved tickets. +[#917](https://github.com/m2ms/fragalysis-frontend/issues/917), [#862](https://github.com/m2ms/fragalysis-frontend/issues/862), [#936](https://github.com/m2ms/fragalysis-frontend/issues/936), [#859](https://github.com/m2ms/fragalysis-frontend/issues/859), [#959](https://github.com/m2ms/fragalysis-frontend/issues/959), [#960](https://github.com/m2ms/fragalysis-frontend/issues/960), [#870](https://github.com/m2ms/fragalysis-frontend/issues/870), [#949](https://github.com/m2ms/fragalysis-frontend/issues/949), [#932](https://github.com/m2ms/fragalysis-frontend/issues/932), [#867](https://github.com/m2ms/fragalysis-frontend/issues/867), [#933](https://github.com/m2ms/fragalysis-frontend/issues/933), [#934](https://github.com/m2ms/fragalysis-frontend/issues/934), [#906](https://github.com/m2ms/fragalysis-frontend/issues/906), [#878](https://github.com/m2ms/fragalysis-frontend/issues/978), [#911](https://github.com/m2ms/fragalysis-frontend/issues/911), [#991](https://github.com/m2ms/fragalysis-frontend/issues/991), [#703](https://github.com/m2ms/fragalysis-frontend/issues/703), [#875](https://github.com/m2ms/fragalysis-frontend/issues/875), [#868](https://github.com/m2ms/fragalysis-frontend/issues/868), [#942](https://github.com/m2ms/fragalysis-frontend/issues/942), + + + + + + + + + + + + + + + + + + + + ## 20/07/2022 - version 2.7.1. @@ -18,7 +52,7 @@ Quick fix ### Frontend ([PR #299](https://github.com/xchem/fragalysis-frontend/pull/299)). :heavy_plus_sign: Bug fixed: RHS F button crashing -### Backend ([PR #325,#327,#328,#329](https://github.com/xchem/fragalysis-backend/pull/314)). +### Backend ([PR #325,#327,#328,#329](https://github.com/xchem/fragalysis-backend/pull/329)). :heavy_plus_sign: Bug fixed: download sdf files :heavy_plus_sign: Crystal ids in the sdf files From 951dcb2747e5f1f9198b4b8262409f67ccf9b79e Mon Sep 17 00:00:00 2001 From: rsanchezgarc Date: Fri, 30 Sep 2022 00:11:43 +0200 Subject: [PATCH 015/143] Update changelog.md --- changelog.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 119d0f7..faa597a 100644 --- a/changelog.md +++ b/changelog.md @@ -12,7 +12,25 @@ Job launcher release :heavy_plus_sign: Improved container building ### Resolved tickets. -[#917](https://github.com/m2ms/fragalysis-frontend/issues/917), [#862](https://github.com/m2ms/fragalysis-frontend/issues/862), [#936](https://github.com/m2ms/fragalysis-frontend/issues/936), [#859](https://github.com/m2ms/fragalysis-frontend/issues/859), [#959](https://github.com/m2ms/fragalysis-frontend/issues/959), [#960](https://github.com/m2ms/fragalysis-frontend/issues/960), [#870](https://github.com/m2ms/fragalysis-frontend/issues/870), [#949](https://github.com/m2ms/fragalysis-frontend/issues/949), [#932](https://github.com/m2ms/fragalysis-frontend/issues/932), [#867](https://github.com/m2ms/fragalysis-frontend/issues/867), [#933](https://github.com/m2ms/fragalysis-frontend/issues/933), [#934](https://github.com/m2ms/fragalysis-frontend/issues/934), [#906](https://github.com/m2ms/fragalysis-frontend/issues/906), [#878](https://github.com/m2ms/fragalysis-frontend/issues/978), [#911](https://github.com/m2ms/fragalysis-frontend/issues/911), [#991](https://github.com/m2ms/fragalysis-frontend/issues/991), [#703](https://github.com/m2ms/fragalysis-frontend/issues/703), [#875](https://github.com/m2ms/fragalysis-frontend/issues/875), [#868](https://github.com/m2ms/fragalysis-frontend/issues/868), [#942](https://github.com/m2ms/fragalysis-frontend/issues/942), +[#917](https://github.com/m2ms/fragalysis-frontend/issues/917), [#862](https://github.com/m2ms/fragalysis-frontend/issues/862), [#936](https://github.com/m2ms/fragalysis-frontend/issues/936), [#859](https://github.com/m2ms/fragalysis-frontend/issues/859), [#959](https://github.com/m2ms/fragalysis-frontend/issues/959), [#960](https://github.com/m2ms/fragalysis-frontend/issues/960), [#870](https://github.com/m2ms/fragalysis-frontend/issues/870), [#949](https://github.com/m2ms/fragalysis-frontend/issues/949), [#932](https://github.com/m2ms/fragalysis-frontend/issues/932), [#867](https://github.com/m2ms/fragalysis-frontend/issues/867), [#933](https://github.com/m2ms/fragalysis-frontend/issues/933), [#934](https://github.com/m2ms/fragalysis-frontend/issues/934), [#906](https://github.com/m2ms/fragalysis-frontend/issues/906), [#878](https://github.com/m2ms/fragalysis-frontend/issues/978), [#911](https://github.com/m2ms/fragalysis-frontend/issues/911), [#991](https://github.com/m2ms/fragalysis-frontend/issues/991), [#703](https://github.com/m2ms/fragalysis-frontend/issues/703), [#875](https://github.com/m2ms/fragalysis-frontend/issues/875), [#868](https://github.com/m2ms/fragalysis-frontend/issues/868), [#942](https://github.com/m2ms/fragalysis-frontend/issues/942), [#887](https://github.com/m2ms/fragalysis-frontend/issues/887), [#966](https://github.com/m2ms/fragalysis-frontend/issues/966), [#889](https://github.com/m2ms/fragalysis-frontend/issues/889), [#939](https://github.com/m2ms/fragalysis-frontend/issues/939), [#926](https://github.com/m2ms/fragalysis-frontend/issues/926), [#796](https://github.com/m2ms/fragalysis-frontend/issues/796), [#869](https://github.com/m2ms/fragalysis-frontend/issues/869), [#885](https://github.com/m2ms/fragalysis-frontend/issues/885), [#883](https://github.com/m2ms/fragalysis-frontend/issues/883), [#904](https://github.com/m2ms/fragalysis-frontend/issues/904), [#958](https://github.com/m2ms/fragalysis-frontend/issues/958), [#946](https://github.com/m2ms/fragalysis-frontend/issues/946), [#973](https://github.com/m2ms/fragalysis-frontend/issues/973), [#957](https://github.com/m2ms/fragalysis-frontend/issues/957), [#947](https://github.com/m2ms/fragalysis-frontend/issues/947), [#969](https://github.com/m2ms/fragalysis-frontend/issues/969), [#864](https://github.com/m2ms/fragalysis-frontend/issues/864), [#873](https://github.com/m2ms/fragalysis-frontend/issues/873), + + + + + + + + + + + + + + + + + + From 939df7d394e16ec3b64ba7e4516fc9ed5a254d27 Mon Sep 17 00:00:00 2001 From: rsanchezgarc Date: Fri, 30 Sep 2022 00:15:53 +0200 Subject: [PATCH 016/143] Update changelog.md --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index faa597a..3fb19ce 100644 --- a/changelog.md +++ b/changelog.md @@ -12,7 +12,7 @@ Job launcher release :heavy_plus_sign: Improved container building ### Resolved tickets. -[#917](https://github.com/m2ms/fragalysis-frontend/issues/917), [#862](https://github.com/m2ms/fragalysis-frontend/issues/862), [#936](https://github.com/m2ms/fragalysis-frontend/issues/936), [#859](https://github.com/m2ms/fragalysis-frontend/issues/859), [#959](https://github.com/m2ms/fragalysis-frontend/issues/959), [#960](https://github.com/m2ms/fragalysis-frontend/issues/960), [#870](https://github.com/m2ms/fragalysis-frontend/issues/870), [#949](https://github.com/m2ms/fragalysis-frontend/issues/949), [#932](https://github.com/m2ms/fragalysis-frontend/issues/932), [#867](https://github.com/m2ms/fragalysis-frontend/issues/867), [#933](https://github.com/m2ms/fragalysis-frontend/issues/933), [#934](https://github.com/m2ms/fragalysis-frontend/issues/934), [#906](https://github.com/m2ms/fragalysis-frontend/issues/906), [#878](https://github.com/m2ms/fragalysis-frontend/issues/978), [#911](https://github.com/m2ms/fragalysis-frontend/issues/911), [#991](https://github.com/m2ms/fragalysis-frontend/issues/991), [#703](https://github.com/m2ms/fragalysis-frontend/issues/703), [#875](https://github.com/m2ms/fragalysis-frontend/issues/875), [#868](https://github.com/m2ms/fragalysis-frontend/issues/868), [#942](https://github.com/m2ms/fragalysis-frontend/issues/942), [#887](https://github.com/m2ms/fragalysis-frontend/issues/887), [#966](https://github.com/m2ms/fragalysis-frontend/issues/966), [#889](https://github.com/m2ms/fragalysis-frontend/issues/889), [#939](https://github.com/m2ms/fragalysis-frontend/issues/939), [#926](https://github.com/m2ms/fragalysis-frontend/issues/926), [#796](https://github.com/m2ms/fragalysis-frontend/issues/796), [#869](https://github.com/m2ms/fragalysis-frontend/issues/869), [#885](https://github.com/m2ms/fragalysis-frontend/issues/885), [#883](https://github.com/m2ms/fragalysis-frontend/issues/883), [#904](https://github.com/m2ms/fragalysis-frontend/issues/904), [#958](https://github.com/m2ms/fragalysis-frontend/issues/958), [#946](https://github.com/m2ms/fragalysis-frontend/issues/946), [#973](https://github.com/m2ms/fragalysis-frontend/issues/973), [#957](https://github.com/m2ms/fragalysis-frontend/issues/957), [#947](https://github.com/m2ms/fragalysis-frontend/issues/947), [#969](https://github.com/m2ms/fragalysis-frontend/issues/969), [#864](https://github.com/m2ms/fragalysis-frontend/issues/864), [#873](https://github.com/m2ms/fragalysis-frontend/issues/873), +[#917](https://github.com/m2ms/fragalysis-frontend/issues/917), [#862](https://github.com/m2ms/fragalysis-frontend/issues/862), [#936](https://github.com/m2ms/fragalysis-frontend/issues/936), [#859](https://github.com/m2ms/fragalysis-frontend/issues/859), [#959](https://github.com/m2ms/fragalysis-frontend/issues/959), [#960](https://github.com/m2ms/fragalysis-frontend/issues/960), [#870](https://github.com/m2ms/fragalysis-frontend/issues/870), [#949](https://github.com/m2ms/fragalysis-frontend/issues/949), [#932](https://github.com/m2ms/fragalysis-frontend/issues/932), [#867](https://github.com/m2ms/fragalysis-frontend/issues/867), [#933](https://github.com/m2ms/fragalysis-frontend/issues/933), [#934](https://github.com/m2ms/fragalysis-frontend/issues/934), [#906](https://github.com/m2ms/fragalysis-frontend/issues/906), [#878](https://github.com/m2ms/fragalysis-frontend/issues/978), [#911](https://github.com/m2ms/fragalysis-frontend/issues/911), [#991](https://github.com/m2ms/fragalysis-frontend/issues/991), [#703](https://github.com/m2ms/fragalysis-frontend/issues/703), [#875](https://github.com/m2ms/fragalysis-frontend/issues/875), [#868](https://github.com/m2ms/fragalysis-frontend/issues/868), [#942](https://github.com/m2ms/fragalysis-frontend/issues/942), [#887](https://github.com/m2ms/fragalysis-frontend/issues/887), [#966](https://github.com/m2ms/fragalysis-frontend/issues/966), [#889](https://github.com/m2ms/fragalysis-frontend/issues/889), [#939](https://github.com/m2ms/fragalysis-frontend/issues/939), [#926](https://github.com/m2ms/fragalysis-frontend/issues/926), [#796](https://github.com/m2ms/fragalysis-frontend/issues/796), [#869](https://github.com/m2ms/fragalysis-frontend/issues/869), [#885](https://github.com/m2ms/fragalysis-frontend/issues/885), [#883](https://github.com/m2ms/fragalysis-frontend/issues/883), [#904](https://github.com/m2ms/fragalysis-frontend/issues/904), [#958](https://github.com/m2ms/fragalysis-frontend/issues/958), [#946](https://github.com/m2ms/fragalysis-frontend/issues/946), [#973](https://github.com/m2ms/fragalysis-frontend/issues/973), [#957](https://github.com/m2ms/fragalysis-frontend/issues/957), [#947](https://github.com/m2ms/fragalysis-frontend/issues/947), [#969](https://github.com/m2ms/fragalysis-frontend/issues/969), [#864](https://github.com/m2ms/fragalysis-frontend/issues/864), [#873](https://github.com/m2ms/fragalysis-frontend/issues/873), ..... From b092810dbd1c42b751785a0b636353b2c9de4747 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 27 Oct 2022 11:23:08 +0100 Subject: [PATCH 017/143] Revert variable values --- .github/workflows/build-main.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 81d0de3..f8d0fc7 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -104,11 +104,11 @@ env: # - FE_BRANCH # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2.0.0 - FE_BRANCH: 3.0.0 - BE_NAMESPACE: alanbchristie - FE_NAMESPACE: alanbchristie - STACK_NAMESPACE: alanbchristie + BE_IMAGE_TAG: latest + FE_BRANCH: master + BE_NAMESPACE: xchem + FE_NAMESPACE: xchem + STACK_NAMESPACE: xchem # Common slack notification variables. # Used in the rtCamp/action-slack-notify Action. SLACK_USERNAME: ActionBot From 5a1ebf669cd0dce4b7ff3b7c413fbfc8baea2f6a Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 1 Nov 2022 16:29:54 +0000 Subject: [PATCH 018/143] Fix for 'stable'/production build --- .github/workflows/build-main.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index f8d0fc7..7d51817 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -75,7 +75,7 @@ on: description: The fragalysis-backend namespace (to pull from) required: false be_image_tag: - description: The fragalysis-backend image contaienr tag (to pull from) + description: The fragalysis-backend image container tag (to pull from) required: false fe_namespace: description: The fragalysis-frontend namespace (to clone from) @@ -104,8 +104,8 @@ env: # - FE_BRANCH # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: latest - FE_BRANCH: master + BE_IMAGE_TAG: stable + FE_BRANCH: production BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem @@ -253,9 +253,9 @@ jobs: SLACK_MESSAGE: Built image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} deploy-production: - # A fixed job that "deploys to the Fragalysis Staging" Kubernetes Namespace - # using a pre-defined AWX Job Template name - # and the awx/fragalysis-production environment. + # A fixed job that deploys to the Fragalysis Production Kubernetes Namespace. + # It uses a pre-defined AWX Job Template name + # and the awx/fragalysis-production environment (a separate cluster). needs: build if: | needs.build.outputs.push == 'true' && @@ -284,7 +284,7 @@ jobs: deploy-developer: # A "deploy to a developer's Fragalysis" Kubernetes Namespace # using an environment-defined AWX Job Template name - # and the awx/fragalysis-developer environment. + # and the awx/fragalysis-developer environment (a separate cluster). needs: build if: | needs.build.outputs.push == 'true' && From d18bfa7cadd2b74e72fea0d8b1d5d135874f94cd Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 1 Nov 2022 16:45:47 +0000 Subject: [PATCH 019/143] New stable build job --- .github/workflows/build-main.yaml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 7d51817..b639e64 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -24,7 +24,7 @@ name: build main # have the following GitHub 'Repository Secrets' defined # (i.e. via 'Settings -> Secrets'): - # -# BE_IMAGE_TAG optional - default latest +# BE_IMAGE_TAG optional - default stable # BE_NAMESPACE optional - default xchem # FE_BRANCH optional - default production # FE_NAMESPACE optional - default xchem @@ -216,7 +216,8 @@ jobs: echo FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} echo STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} echo STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} - - name: Build + - name: Build (BE_IMAGE_TAG) + if: steps.vars.outputs.production-tag == 'false' uses: docker/build-push-action@v2 with: tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} @@ -227,6 +228,18 @@ jobs: FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} + - name: Build (stable) + if: steps.vars.outputs.production-tag == 'true' + uses: docker/build-push-action@v2 + with: + tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} + build-args: | + BE_NAMESPACE=${{ steps.vars.outputs.BE_NAMESPACE }} + BE_IMAGE_TAG=stable + FE_NAMESPACE=${{ steps.vars.outputs.FE_NAMESPACE }} + FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} + STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} + STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} - name: Test run: > docker-compose -f docker-compose.test.yml up @@ -253,9 +266,9 @@ jobs: SLACK_MESSAGE: Built image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} deploy-production: - # A fixed job that deploys to the Fragalysis Production Kubernetes Namespace. - # It uses a pre-defined AWX Job Template name - # and the awx/fragalysis-production environment (a separate cluster). + # A fixed job that "deploys to the Fragalysis Staging" Kubernetes Namespace + # using a pre-defined AWX Job Template name + # and the awx/fragalysis-production environment. needs: build if: | needs.build.outputs.push == 'true' && @@ -284,7 +297,7 @@ jobs: deploy-developer: # A "deploy to a developer's Fragalysis" Kubernetes Namespace # using an environment-defined AWX Job Template name - # and the awx/fragalysis-developer environment (a separate cluster). + # and the awx/fragalysis-developer environment. needs: build if: | needs.build.outputs.push == 'true' && From d82a23a4b206037820fa4202237648fdebb539a1 Mon Sep 17 00:00:00 2001 From: rsanchezgarc Date: Thu, 3 Nov 2022 12:46:30 +0000 Subject: [PATCH 020/143] Update build-main.yaml --- .github/workflows/build-main.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index b639e64..1c475b2 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -104,8 +104,10 @@ env: # - FE_BRANCH # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: stable - FE_BRANCH: production + #BE_IMAGE_TAG: stable + #FE_BRANCH: production + BE_IMAGE_TAG: 2022.11.0 + FE_BRANCH: 2022.11.0 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 23ed2572d30cd647f32642e519374e684ed90df8 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 3 Nov 2022 14:36:28 +0000 Subject: [PATCH 021/143] Fix for tagged build --- .github/workflows/build-main.yaml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index b639e64..9e50600 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -84,7 +84,10 @@ on: description: The fragalysis-frontend branch (to clone from) required: false stack_namespace: - description: The fragalysis-stack namespace (to publish to) + description: The fragalysis-stack Docker Hub namespace (to publish to) + required: false + stack_image_tag: + description: The image tage to apply to the fragalysis-stack image required: false env: @@ -177,7 +180,7 @@ jobs: echo set-output name=STACK_VERSION::${STACK_VERSION} echo ::set-output name=STACK_VERSION::${STACK_VERSION} - # What image tag are we using? 'latest' (if not tagged) or a GitHub tag? + # What image tag are we creating? 'latest' (if not tagged) or a GitHub tag? TAG="latest" if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then TAG="${{ env.GITHUB_REF_SLUG }}"; fi echo set-output name=tag::${TAG} @@ -216,8 +219,8 @@ jobs: echo FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} echo STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} echo STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} - - name: Build (BE_IMAGE_TAG) - if: steps.vars.outputs.production-tag == 'false' + echo tag=${{ steps.vars.outputs.tag }} + - name: Build uses: docker/build-push-action@v2 with: tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} @@ -227,19 +230,7 @@ jobs: FE_NAMESPACE=${{ steps.vars.outputs.FE_NAMESPACE }} FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} - STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} - - name: Build (stable) - if: steps.vars.outputs.production-tag == 'true' - uses: docker/build-push-action@v2 - with: - tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} - build-args: | - BE_NAMESPACE=${{ steps.vars.outputs.BE_NAMESPACE }} - BE_IMAGE_TAG=stable - FE_NAMESPACE=${{ steps.vars.outputs.FE_NAMESPACE }} - FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} - STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} - STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} + STACK_VERSION=${{ steps.vars.outputs.tag }} - name: Test run: > docker-compose -f docker-compose.test.yml up From d9c60539803cdf49c8250c04e1ebae09eba4162b Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Wed, 23 Nov 2022 12:17:10 +0000 Subject: [PATCH 022/143] feat: Should now deploy to staging --- .github/workflows/build-main.yaml | 35 ++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 3d176bf..2cb4085 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -258,11 +258,40 @@ jobs: SLACK_TITLE: Build Complete SLACK_MESSAGE: Built image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} - deploy-production: + deploy-staging: # A fixed job that "deploys to the Fragalysis Staging" Kubernetes Namespace # using a pre-defined AWX Job Template name # and the awx/fragalysis-production environment. needs: build + if: | + needs.build.outputs.push == 'true' && + needs.build.outputs.deploy == 'true' && + needs.build.outputs.production-tag == 'false' + runs-on: ubuntu-latest + environment: awx/fragalysis-production + steps: + - name: Deploy staging + uses: informaticsmatters/trigger-awx-action@v1 + with: + template: Staging Fragalysis Stack (Version Change) + template-host: ${{ secrets.AWX_HOST }} + template-user: ${{ secrets.AWX_USER }} + template-user-password: ${{ secrets.AWX_USER_PASSWORD }} + template-var: stack_image_tag + template-var-value: ${{ needs.build.outputs.tag }} + - name: Notify staging deployment + if: steps.vars.outputs.notify == 'true' + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} + SLACK_TITLE: Deployment Complete (Staging) + SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} + + deploy-production: + # A fixed job that "deploys to the Fragalysis Production" Kubernetes Namespace + # using a pre-defined AWX Job Template name + # and the awx/fragalysis-production environment. + needs: build if: | needs.build.outputs.push == 'true' && needs.build.outputs.deploy == 'true' && @@ -284,8 +313,8 @@ jobs: uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} - SLACK_TITLE: Deployment Complete - SLACK_MESSAGE: Deployed to awx/fragalysis-production + SLACK_TITLE: Deployment Complete (Production) + SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} deploy-developer: # A "deploy to a developer's Fragalysis" Kubernetes Namespace From 32fe3bef9219c3700bbea67fcc4b159d39e4673e Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 24 Nov 2022 07:27:55 +0000 Subject: [PATCH 023/143] ci: All builds deploy to staging --- .github/workflows/build-main.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 2cb4085..1b37e89 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -262,11 +262,12 @@ jobs: # A fixed job that "deploys to the Fragalysis Staging" Kubernetes Namespace # using a pre-defined AWX Job Template name # and the awx/fragalysis-production environment. + # + # All builds, tagged or otherwise, are deployed to staging. needs: build if: | needs.build.outputs.push == 'true' && - needs.build.outputs.deploy == 'true' && - needs.build.outputs.production-tag == 'false' + needs.build.outputs.deploy == 'true' runs-on: ubuntu-latest environment: awx/fragalysis-production steps: @@ -291,6 +292,8 @@ jobs: # A fixed job that "deploys to the Fragalysis Production" Kubernetes Namespace # using a pre-defined AWX Job Template name # and the awx/fragalysis-production environment. + # + # Only builds for production-grade tags deployed. needs: build if: | needs.build.outputs.push == 'true' && From 9e297831cc403e3c655caaa57a57068e6e1046d4 Mon Sep 17 00:00:00 2001 From: rsanchezgarc Date: Fri, 16 Dec 2022 13:02:35 +0000 Subject: [PATCH 024/143] Update build-main.yaml release Ms 2022 08 18 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 1b37e89..169769f 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -109,8 +109,8 @@ env: # Commit the changes and then tag or make a release from the stack repository. #BE_IMAGE_TAG: stable #FE_BRANCH: production - BE_IMAGE_TAG: 2022.11.0 - FE_BRANCH: 2022.11.0 + BE_IMAGE_TAG: 2022.12.1 + FE_BRANCH: 2022.12.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 46e09f644e18397a9d9c7d046227715b720ff38c Mon Sep 17 00:00:00 2001 From: rsanchezgarc Date: Fri, 16 Dec 2022 13:22:56 +0000 Subject: [PATCH 025/143] Update changelog.md --- changelog.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/changelog.md b/changelog.md index 3fb19ce..919da23 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,19 @@ # Changelog (from 22/07/2021) + +## 16/12/2022 - version 2022.12.1 +Job launcher release +### Frontend ([PR #335](https://github.com/xchem/fragalysis-frontend/pull/320)). +:heavy_plus_sign: Job table shows running jobs, and autoreloads +:heavy_plus_sign: Improved snapshot loading + +### Backend ([PR #349-#361 #365 #367](https://github.com/xchem/fragalysis-backend/pull/347)). +:heavy_plus_sign: Bug fixing: backend timeout, error report + +### Resolved tickets. +[#977](https://github.com/m2ms/fragalysis-frontend/issues/917),[#996](https://github.com/m2ms/fragalysis-frontend/issues/996),[#979](https://github.com/m2ms/fragalysis-frontend/issues/979),[#1003](https://github.com/m2ms/fragalysis-frontend/issues/1003),[#1011](https://github.com/m2ms/fragalysis-frontend/issues/1011),[#935](https://github.com/m2ms/fragalysis-frontend/issues/935),[#995](https://github.com/m2ms/fragalysis-frontend/issues/995), + + ## 29/09/2022 - version 2022.09.0 Job launcher release ### Frontend ([PR #300 #302 #306-#312 #314-#320](https://github.com/xchem/fragalysis-frontend/pull/320)). From 9a55c7fc74d7917937e34d3d4b89364ab93b1a46 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 3 Apr 2023 12:05:38 +0200 Subject: [PATCH 026/143] Multistage build - relies on new fe and be images --- Dockerfile | 53 ++++++++++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/Dockerfile b/Dockerfile index 54c058f..c26c8c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,9 @@ ARG FE_NAMESPACE=xchem ARG FE_BRANCH=master ARG STACK_NAMESPACE=xchem ARG STACK_VERSION=0.0.0 -FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG} +# Start with the frontend container image. +# We simply copy +FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_BRANCH} AS frontend # We have to repeat the ARG assignments... # ARGs are reset during the FROM action @@ -21,6 +23,16 @@ ARG BE_IMAGE_TAG ARG FE_NAMESPACE ARG FE_BRANCH +FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG} + +# We have to repeat the ARG assignments... +ARG STACK_NAMESPACE +ARG STACK_VERSION +ARG BE_NAMESPACE +ARG BE_IMAGE_TAG +ARG FE_NAMESPACE +ARG FE_BRANCH + # Set the container ENV to record the origin of the b/e and f/e ENV BE_NAMESPACE ${BE_NAMESPACE} ENV BE_IMAGE_TAG ${BE_IMAGE_TAG} @@ -31,38 +43,17 @@ ENV STACK_VERSION ${STACK_VERSION} ENV APP_ROOT /code -# Install yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - -RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ - apt-get update -y && \ - apt-get install -y \ - yarn && \ - apt-get clean - -# Install nodejs -RUN wget -q https://nodejs.org/download/release/v12.22.11/node-v12.22.11-linux-x64.tar.gz && \ - mkdir -p /usr/local/lib/nodejs && \ - tar -xf node-v12.22.11-linux-x64.tar.gz -C /usr/local/lib/nodejs && \ - rm node-v12.22.11-linux-x64.tar.gz -ENV PATH /usr/local/lib/nodejs/node-v12.22.11-linux-x64/bin:$PATH +#ADD docker-entrypoint.sh ${APP_ROOT}/docker-entrypoint.sh +#ADD LICENSE /LICENSE +#ADD README.md /README.md +#RUN chmod 755 ${APP_ROOT}/docker-entrypoint.sh -ADD docker-entrypoint.sh ${APP_ROOT}/docker-entrypoint.sh -ADD LICENSE /LICENSE -ADD README.md /README.md -RUN chmod 755 ${APP_ROOT}/docker-entrypoint.sh - -# Add in the frontend code -# By default this is hosted on the xchem project's master branch -# but it can be redirected with a couple of build-args. -# And then continue to build it. +# Copy the frontend code from the frontend container +WORKDIR ${APP_ROOT}/frontend WORKDIR ${APP_ROOT}/static -ARG FE_NAMESPACE=xchem -ARG FE_BRANCH=master -RUN git clone https://github.com/${FE_NAMESPACE}/fragalysis-frontend ${APP_ROOT}/frontend && \ - cd ${APP_ROOT}/frontend && git checkout ${FE_BRANCH} && \ - cd ${APP_ROOT}/frontend && yarn install && \ - cd ${APP_ROOT}/frontend && yarn run build && \ - ln -s ${APP_ROOT}/frontend/bundles/ ${APP_ROOT}/static/bundles + +COPY --from=frontend /frontend ${APP_ROOT}/frontend +RUN ln -s ${APP_ROOT}/frontend/bundles/ ${APP_ROOT}/static/bundles WORKDIR ${APP_ROOT} CMD ["./docker-entrypoint.sh"] From 3adebba77b342bdd1a854a26bed0b99691f79ac3 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 16 May 2023 11:10:05 +0100 Subject: [PATCH 027/143] New BE/FE tags --- .github/workflows/build-main.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 169769f..3df2560 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -107,10 +107,8 @@ env: # - FE_BRANCH # # Commit the changes and then tag or make a release from the stack repository. - #BE_IMAGE_TAG: stable - #FE_BRANCH: production - BE_IMAGE_TAG: 2022.12.1 - FE_BRANCH: 2022.12.1 + BE_IMAGE_TAG: 2023.05.1 + FE_BRANCH: 2023.05.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 272fc5e10722a46726b909d7b614608445c97c5f Mon Sep 17 00:00:00 2001 From: rsanchezgarc Date: Tue, 16 May 2023 11:16:00 +0100 Subject: [PATCH 028/143] Update build-main.yaml --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 169769f..a3f97c7 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -5,7 +5,7 @@ name: build main # Here every commit is built, tagged as 'latest' and tested. # If a DOCKERHUB_USERNAME secret is defined the image is pushed. # If a TRIGGER_AWX secret is defined the image is deployed to Kubernetes. -# + # Actions also run if the repository is tagged. # Every tag is deployed to staging and every production-grade tag # (of the form N.N.N) is deployed to production.defaults: From a8d9ee47b7be708b081329a82f7412d8121dcc17 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 20 Jun 2023 13:54:48 +0100 Subject: [PATCH 029/143] Updated backend tag to bug-fix release 2023.06.1 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 95b00f2..961d534 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -107,7 +107,7 @@ env: # - FE_BRANCH # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2023.05.1 + BE_IMAGE_TAG: 2023.06.1 FE_BRANCH: 2023.05.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From b37388d2101a6525ee4339abd7b166ca6a134019 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 20 Jun 2023 14:12:16 +0100 Subject: [PATCH 030/143] Fixed version badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bcaebfe..9597eab 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![build main](https://github.com/alanbchristie/fragalysis-stack/actions/workflows/build-main.yaml/badge.svg)](https://github.com/alanbchristie/fragalysis-stack/actions/workflows/build-main.yaml) [![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/xchem/fragalysis-stack) -[![Version](http://img.shields.io/badge/version-0.0.1-blue.svg?style=flat)](https://github.com/xchem/fragalysis-stack) +![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/xchem/fragalysis-stack) [![License](http://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat)](https://github.com/xchem/fragalysis-stack/blob/master/LICENSE.txt) # Fragalysis stack From 91811a3893c26d1c43104ea1f0ad5ccea7e14da7 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Wed, 19 Jul 2023 09:48:14 +0100 Subject: [PATCH 031/143] Switch to BE 2023.07.1 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 961d534..9b66e14 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -107,7 +107,7 @@ env: # - FE_BRANCH # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2023.06.1 + BE_IMAGE_TAG: 2023.07.1 FE_BRANCH: 2023.05.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem @@ -291,7 +291,7 @@ jobs: # using a pre-defined AWX Job Template name # and the awx/fragalysis-production environment. # - # Only builds for production-grade tags deployed. + # Only builds triggered by production-grade tags are deployed to production. needs: build if: | needs.build.outputs.push == 'true' && From 1706888e49b13304463011048db422634dfafaa1 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 25 Jul 2023 07:37:09 +0100 Subject: [PATCH 032/143] Removed local docker-entrypoint (now expects backend's) --- Dockerfile | 1 - docker-entrypoint.sh | 3 --- 2 files changed, 4 deletions(-) delete mode 100644 docker-entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 54c058f..26b0211 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,7 +46,6 @@ RUN wget -q https://nodejs.org/download/release/v12.22.11/node-v12.22.11-linux-x rm node-v12.22.11-linux-x64.tar.gz ENV PATH /usr/local/lib/nodejs/node-v12.22.11-linux-x64/bin:$PATH -ADD docker-entrypoint.sh ${APP_ROOT}/docker-entrypoint.sh ADD LICENSE /LICENSE ADD README.md /README.md RUN chmod 755 ${APP_ROOT}/docker-entrypoint.sh diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh deleted file mode 100644 index d733620..0000000 --- a/docker-entrypoint.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -/code/launch-stack.sh From 83db0a81546ac8dd75173020c8460189674a95c9 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Wed, 26 Jul 2023 15:46:51 +0100 Subject: [PATCH 033/143] Removed experimental badge --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 9597eab..d1bcfd9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ [![build main](https://github.com/alanbchristie/fragalysis-stack/actions/workflows/build-main.yaml/badge.svg)](https://github.com/alanbchristie/fragalysis-stack/actions/workflows/build-main.yaml) -[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/xchem/fragalysis-stack) ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/xchem/fragalysis-stack) [![License](http://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat)](https://github.com/xchem/fragalysis-stack/blob/master/LICENSE.txt) From 069f9350fb79815bed43bfaa1d3abf33ea19ee5d Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 27 Jul 2023 07:45:16 +0100 Subject: [PATCH 034/143] build: dockerignore and better docker-compose --- .dockerignore | 1 + docker-compose.yml | 74 ++++++++++++++++++++++++++++++---------------- 2 files changed, 49 insertions(+), 26 deletions(-) diff --git a/.dockerignore b/.dockerignore index bb0224d..3eab569 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,2 @@ .github/ +.git/ diff --git a/docker-compose.yml b/docker-compose.yml index 344369f..ea28056 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,29 +1,25 @@ version: '3' services: + # The database database: image: postgres:12.2 + container_name: database volumes: - - ../django_data:/var/lib/postgresql/data + - ./data/postgresql/data:/var/lib/postgresql/data environment: POSTGRES_PASSWORD: fragalysis POSTGRES_DB: frag PGDATA: /var/lib/postgresql/data/pgdata ports: - "5432:5432" - cartridge: - image: informaticsmatters/rdkit_cartridge:Release_2017_09_1 - user: root - environment: - - POSTGRES_PASSWORD=password - volumes: - - ../cartridge_data:/var/lib/postgresql/data + + # The graph graph: - container_name: neo4j - image: neo4j - command: /bin/bash -c "sleep 1000" + image: neo4j:4.4.2 + container_name: graph ports: -# Comment these two out in produciton + # These are not used in production - "7474:7474" - "7687:7687" ulimits: @@ -31,26 +27,52 @@ services: soft: 40000 hard: 40000 volumes: - - ../neo4j/data:/data - - ../neo4j/logs:/logs + - ./data/neo4j/data:/data + - ./data/neo4j/logs:/logs environment: - NEO4J_AUTH=none - NEO4J_dbms_memory_pagecache_size=4G - web: - image: xchem/fragalysis-stack:latest + + stack: + image: ${STACK_NAMESPACE:-xchem}/fragalysis-stack:${STACK_TAG:-latest} + container_name: stack + build: + context: . + dockerfile: Dockerfile command: /bin/bash /code/launch-stack.sh volumes: - - ../logs:/code/logs/ - - ../media:/code/media/ + - ./data/logs:/code/logs/ + - ./data/media:/code/media/ + - .:/code/ environment: - POSTGRESQL_DATABASE: frag POSTGRESQL_USER: postgres - POSTGRESQL_PASSWORD: fragalysis - POSTGRESQL_HOST: database - POSTGRESQL_PORT: 5432 + # Celery tasks need to run synchronously + CELERY_TASK_ALWAYS_EAGER: 'True' + # Error reporting and default/root log-level + FRAGALYSIS_BACKEND_SENTRY_DNS: ${FRAGALYSIS_BACKEND_SENTRY_DNS} + LOGGING_FRAMEWORK_ROOT_LEVEL: ${LOGGING_FRAMEWORK_ROOT_LEVEL:-INFO} + # Keycloak configuration + OIDC_KEYCLOAK_REALM: ${OIDC_KEYCLOAK_REALM} + OIDC_RP_CLIENT_ID: ${OIDC_RP_CLIENT_ID:-fragalysis-local} + OIDC_RP_CLIENT_SECRET: ${OIDC_RP_CLIENT_SECRET} + OIDC_AS_CLIENT_ID: ${OIDC_AS_CLIENT_ID:-account-server-api} + OIDC_DM_CLIENT_ID: ${OIDC_DM_CLIENT_ID:-data-manager-api} + OIDC_RENEW_ID_TOKEN_EXPIRY_MINUTES: '210' + # Squonk configuration + SQUONK2_VERIFY_CERTIFICATES: 'No' + SQUONK2_UNIT_BILLING_DAY: 3 + SQUONK2_PRODUCT_FLAVOUR: BRONZE + SQUONK2_SLUG: fs-local + SQUONK2_ORG_OWNER: ${SQUONK2_ORG_OWNER} + SQUONK2_ORG_OWNER_PASSWORD: ${SQUONK2_ORG_OWNER_PASSWORD} + SQUONK2_ORG_UUID: ${SQUONK2_ORG_UUID} + SQUONK2_UI_URL: ${SQUONK2_UI_URL} + SQUONK2_DMAPI_URL: ${SQUONK2_DMAPI_URL} + SQUONK2_ASAPI_URL: ${SQUONK2_ASAPI_URL} ports: - - "80:80" + - "8080:80" depends_on: - - database - - graph - - cartridge + database: + condition: service_healthy + graph: + condition: service_healthy From e2780fbce0f90d3e4d155b54cc4b8e366c50f160 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 27 Jul 2023 09:47:06 +0100 Subject: [PATCH 035/143] FE_BRANCH becomes FE_IMAGE_TAG --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c26c8c4..371c73b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ ARG BE_NAMESPACE=xchem ARG BE_IMAGE_TAG=latest ARG FE_NAMESPACE=xchem -ARG FE_BRANCH=master +ARG FE_IMAGE_TAG=master ARG STACK_NAMESPACE=xchem ARG STACK_VERSION=0.0.0 # Start with the frontend container image. # We simply copy -FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_BRANCH} AS frontend +FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_IMAGE_TAG} AS frontend # We have to repeat the ARG assignments... # ARGs are reset during the FROM action @@ -21,7 +21,7 @@ ARG BE_IMAGE_TAG # By default this is hosted on the xchem project's master branch # but it can be redirected with a couple of build-args. ARG FE_NAMESPACE -ARG FE_BRANCH +ARG FE_IMAGE_TAG FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG} @@ -31,13 +31,13 @@ ARG STACK_VERSION ARG BE_NAMESPACE ARG BE_IMAGE_TAG ARG FE_NAMESPACE -ARG FE_BRANCH +ARG FE_IMAGE_TAG # Set the container ENV to record the origin of the b/e and f/e ENV BE_NAMESPACE ${BE_NAMESPACE} ENV BE_IMAGE_TAG ${BE_IMAGE_TAG} ENV FE_NAMESPACE ${FE_NAMESPACE} -ENV FE_BRANCH ${FE_BRANCH} +ENV FE_IMAGE_TAG ${FE_IMAGE_TAG} ENV STACK_NAMESPACE ${STACK_NAMESPACE} ENV STACK_VERSION ${STACK_VERSION} From a9391d66eccc380b35f2a86215559f0e79762cbf Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 27 Jul 2023 09:51:13 +0100 Subject: [PATCH 036/143] Removed commented-out code --- Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 371c73b..06e205d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,11 +43,6 @@ ENV STACK_VERSION ${STACK_VERSION} ENV APP_ROOT /code -#ADD docker-entrypoint.sh ${APP_ROOT}/docker-entrypoint.sh -#ADD LICENSE /LICENSE -#ADD README.md /README.md -#RUN chmod 755 ${APP_ROOT}/docker-entrypoint.sh - # Copy the frontend code from the frontend container WORKDIR ${APP_ROOT}/frontend WORKDIR ${APP_ROOT}/static From dd47852b6fac79e0cfa0e57865b0abf3509ee4ce Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 27 Jul 2023 09:56:48 +0100 Subject: [PATCH 037/143] docs: Minor doc improvements in the dockerfile --- Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 06e205d..9ad6657 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,9 @@ ARG FE_NAMESPACE=xchem ARG FE_IMAGE_TAG=master ARG STACK_NAMESPACE=xchem ARG STACK_VERSION=0.0.0 -# Start with the frontend container image. -# We simply copy +# Start with the frontend container image AS 'frontend'. +# We simply copy the contents of it's '/frontend' directory +# into the Backend image that we also pull in. FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_IMAGE_TAG} AS frontend # We have to repeat the ARG assignments... @@ -15,14 +16,15 @@ FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_IMAGE_TAG} AS frontend # Us ARG STACK_NAMESPACE ARG STACK_VERSION -# Backend origin (a container) +# Backend image identity ARG BE_NAMESPACE ARG BE_IMAGE_TAG -# By default this is hosted on the xchem project's master branch -# but it can be redirected with a couple of build-args. +# Frontend image identity ARG FE_NAMESPACE ARG FE_IMAGE_TAG +# Get the backend image +# (we'll copy the pre-compiled forntend into it) FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG} # We have to repeat the ARG assignments... @@ -34,6 +36,7 @@ ARG FE_NAMESPACE ARG FE_IMAGE_TAG # Set the container ENV to record the origin of the b/e and f/e +# (for diagnostic purposes) ENV BE_NAMESPACE ${BE_NAMESPACE} ENV BE_IMAGE_TAG ${BE_IMAGE_TAG} ENV FE_NAMESPACE ${FE_NAMESPACE} From d8ac27182ebdf06927368736554cbcb31712672e Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 27 Jul 2023 10:01:04 +0100 Subject: [PATCH 038/143] ci: Action now uses FE_IMAGE_TAG --- .github/workflows/build-main.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 9b66e14..792cf54 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -26,7 +26,7 @@ name: build main # # BE_IMAGE_TAG optional - default stable # BE_NAMESPACE optional - default xchem -# FE_BRANCH optional - default production +# FE_IMAGE_TAG optional - default stable # FE_NAMESPACE optional - default xchem # STACK_NAMESPACE optional - default xchem # @@ -80,8 +80,8 @@ on: fe_namespace: description: The fragalysis-frontend namespace (to clone from) required: false - fe_branch: - description: The fragalysis-frontend branch (to clone from) + fe_image_tag: + description: The fragalysis-frontend image container tag (to pull from) required: false stack_namespace: description: The fragalysis-stack Docker Hub namespace (to publish to) @@ -104,11 +104,11 @@ env: # release the author needs to change one or both of: - # # - BE_IMAGE_TAG - # - FE_BRANCH + # - FE_IMAGE_TAG # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.07.1 - FE_BRANCH: 2023.05.1 + FE_IMAGE_TAG: 2023.05.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem @@ -159,12 +159,12 @@ jobs: echo set-output name=FE_NAMESPACE::${FE_NAMESPACE} echo ::set-output name=FE_NAMESPACE::${FE_NAMESPACE} - # FE_BRANCH - FE_BRANCH="${{ env.FE_BRANCH }}" - if [ -n "${{ github.event.inputs.fe_branch }}" ]; then FE_BRANCH="${{ github.event.inputs.fe_branch }}"; - elif [ -n "${{ secrets.FE_BRANCH }}" ]; then FE_BRANCH="${{ secrets.FE_BRANCH }}"; fi - echo set-output name=FE_BRANCH::${FE_BRANCH} - echo ::set-output name=FE_BRANCH::${FE_BRANCH} + # FE_IMAGE_TAG + FE_IMAGE_TAG="${{ env.FE_IMAGE_TAG }}" + if [ -n "${{ github.event.inputs.fe_image_tag }}" ]; then FE_IMAGE_TAG="${{ github.event.inputs.fe_image_tag }}"; + elif [ -n "${{ secrets.FE_IMAGE_TAG }}" ]; then FE_IMAGE_TAG="${{ secrets.FE_IMAGE_TAG }}"; fi + echo set-output name=FE_IMAGE_TAG::${FE_IMAGE_TAG} + echo ::set-output name=FE_IMAGE_TAG::${FE_IMAGE_TAG} # STACK_NAMESPACE STACK_NAMESPACE="${{ env.STACK_NAMESPACE }}" @@ -216,7 +216,7 @@ jobs: echo BE_NAMESPACE=${{ steps.vars.outputs.BE_NAMESPACE }} echo BE_IMAGE_TAG=${{ steps.vars.outputs.BE_IMAGE_TAG }} echo FE_NAMESPACE=${{ steps.vars.outputs.FE_NAMESPACE }} - echo FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} + echo FE_IMAGE_TAG=${{ steps.vars.outputs.FE_IMAGE_TAG }} echo STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} echo STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} echo tag=${{ steps.vars.outputs.tag }} @@ -228,7 +228,7 @@ jobs: BE_NAMESPACE=${{ steps.vars.outputs.BE_NAMESPACE }} BE_IMAGE_TAG=${{ steps.vars.outputs.BE_IMAGE_TAG }} FE_NAMESPACE=${{ steps.vars.outputs.FE_NAMESPACE }} - FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} + FE_IMAGE_TAG=${{ steps.vars.outputs.FE_IMAGE_TAG }} STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} STACK_VERSION=${{ steps.vars.outputs.tag }} - name: Test From 7afef05848cdb73cbdf76cf513b7a95b37e47128 Mon Sep 17 00:00:00 2001 From: rsanchezgarc Date: Thu, 3 Aug 2023 12:16:25 +0100 Subject: [PATCH 039/143] Update build-main.yaml --- .github/workflows/build-main.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 9b66e14..7b0395b 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -106,6 +106,7 @@ env: # - BE_IMAGE_TAG # - FE_BRANCH # + # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.07.1 FE_BRANCH: 2023.05.1 From 64622f976d80cbc71c8ba2d0d69c425b23b8524d Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Thu, 3 Aug 2023 13:36:18 +0100 Subject: [PATCH 040/143] Update README.md Information on how to push a new release --- README.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1bcfd9..fd05bd3 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ the correct stable (tagged) backend and frontend code. Specifically: - - `BE_IMAGE_TAG` - `FE_BRANCH` (called "branch" but should be a frontend tag) +[More information on pushing to production](README.md#pushing-a-release-to-production) + ## Local development A docker-compose file provides a convenient way of launching the stack locally. The suitability of the various docker-compose files is the responsibility of @@ -28,7 +30,35 @@ Check the compose file, adjust accordingly then: - docker-compose up +## Pushing a release to production + +1. Create new releases for the [Frontend] and [Backend]. + + * [Create a new release for the frontend](https://github.com/xchem/fragalysis-frontend/releases/new) + * Create a new tag with the format: `YYYY.MM.#` where: + * `YYYY` is the current year + * `MM` is the current month + * `#` is the patch number (positive integer) + * Choose a target: `staging` or `production` + * Title the release + * Describe the release + * [Create a new release for the backend](https://github.com/xchem/fragalysis-backend/releases/new) + * Same as the frontend + + 2. Update [build-main.yaml](.github/workflows/build-main.yaml) with the new tags + * Change `FE_BRANCH` to the desired Frontend tag + * Change `BE_IMAGE_TAG` to the desired Backend tag + * Commit the changes to a new branch and start a pull request + * Wait for review and approval + * Wait for the [GitHub action](https://github.com/xchem/fragalysis-stack/actions) to complete (~10-20mins) + +> N.B. you can get the current Frontend, Backend, and Stack tags from the bottom of the Fragalysis menu + +3. Create a new release for [fragalysis-stack](https://github.com/xchem/fragalysis-stack/releases/new) + * Use the same tag convention as for the Frontend and Backend. + * Tags do not need to agree across the three repositories! + --- -[backend]: https://github.com/xchem/fragalysis-stack +[backend]: https://github.com/xchem/fragalysis-backend [frontend]: https://github.com/xchem/fragalysis-frontend From 0747c62dd467aa6af923e0c97e77936f6eed5ad5 Mon Sep 17 00:00:00 2001 From: Warren Thompson Date: Fri, 4 Aug 2023 14:32:42 +0100 Subject: [PATCH 041/143] Red release - update build-main.yaml --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 7b0395b..fb690c0 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -109,7 +109,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.07.1 - FE_BRANCH: 2023.05.1 + FE_BRANCH: 2023.08.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 56bbc2727fff2e3d1c9ad6e43e64d93b88e1c27a Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:16:26 +0100 Subject: [PATCH 042/143] Promote FE 2023.08.2 to production 2023.08.2 includes changes for #1106 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index fb690c0..5ee08f7 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -109,7 +109,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.07.1 - FE_BRANCH: 2023.08.1 + FE_BRANCH: 2023.08.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 7fe3190845b14b959cf99a9da1ea874a9d4f9f26 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Wed, 9 Aug 2023 13:02:34 +0100 Subject: [PATCH 043/143] Update F/E to 2023.08.3 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 5ee08f7..98933d7 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -109,7 +109,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.07.1 - FE_BRANCH: 2023.08.2 + FE_BRANCH: 2023.08.3 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 928152cdfaa966f0eaa465482ac0f9be4f2a6691 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:55:10 +0100 Subject: [PATCH 044/143] Update F/E tag to 2023.08.4 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 98933d7..2e735e2 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -109,7 +109,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.07.1 - FE_BRANCH: 2023.08.3 + FE_BRANCH: 2023.08.4 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 058c3ff769063536e3514dcb22fb68d19d14bc9e Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 10 Aug 2023 16:34:37 +0100 Subject: [PATCH 045/143] ci: Fixes notification to post-deploy --- .github/workflows/build-main.yaml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 2e735e2..e54d54e 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -249,13 +249,6 @@ jobs: - name: Push if: steps.vars.outputs.push == 'true' run: docker push ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} - - name: Notify build - if: steps.vars.outputs.notify == 'true' - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} - SLACK_TITLE: Build Complete - SLACK_MESSAGE: Built image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} deploy-staging: # A fixed job that "deploys to the Fragalysis Staging" Kubernetes Namespace @@ -280,12 +273,15 @@ jobs: template-var: stack_image_tag template-var-value: ${{ needs.build.outputs.tag }} - name: Notify staging deployment - if: steps.vars.outputs.notify == 'true' + if: needs.build.outputs.notify == 'true' uses: rtCamp/action-slack-notify@v2 env: + SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} - SLACK_TITLE: Deployment Complete (Staging) + SLACK_TITLE: STAGING Deployment Complete SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} + SLACK_FOOTER: '' + MSG_MINIMAL: actions url,commit deploy-production: # A fixed job that "deploys to the Fragalysis Production" Kubernetes Namespace @@ -311,12 +307,15 @@ jobs: template-var: stack_image_tag template-var-value: ${{ needs.build.outputs.tag }} - name: Notify production deployment - if: steps.vars.outputs.notify == 'true' + if: needs.build.outputs.notify == 'true' uses: rtCamp/action-slack-notify@v2 env: + SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} - SLACK_TITLE: Deployment Complete (Production) + SLACK_TITLE: PRODUCTION Deployment Complete SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} + SLACK_FOOTER: '' + MSG_MINIMAL: actions url,commit deploy-developer: # A "deploy to a developer's Fragalysis" Kubernetes Namespace From 8610a7870a1558424275231d26944be3580ea5e6 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Fri, 11 Aug 2023 10:57:22 +0100 Subject: [PATCH 046/143] ci: Separate staging/production notification --- .github/workflows/build-main.yaml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index e54d54e..93ec7c5 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -205,9 +205,13 @@ jobs: echo set-output name=production-tag::${HAS_PRODUCTION_TAG} echo ::set-output name=production-tag::${HAS_PRODUCTION_TAG} - # Do we send Slack notifications, i.e. is SLACK_NOTIFY_WEBHOOK defined? - echo set-output name=notify::${{ env.SLACK_NOTIFY_WEBHOOK != '' }} - echo ::set-output name=notify::${{ env.SLACK_NOTIFY_WEBHOOK != '' }} + # Do we send Slack notifications about staging, i.e. is SLACK_NOTIFY_STAGING_WEBHOOK defined? + echo set-output name=notify-staging::${{ env.SLACK_NOTIFY_STAGING_WEBHOOK != '' }} + echo ::set-output name=notify-staging::${{ env.SLACK_NOTIFY_STAGING_WEBHOOK != '' }} + + # Do we send Slack notifications about production, i.e. is SLACK_NOTIFY_PRODUCTION_WEBHOOK defined? + echo set-output name=notify-production::${{ env.SLACK_NOTIFY_PRODUCTION_WEBHOOK != '' }} + echo ::set-output name=notify-production::${{ env.SLACK_NOTIFY_PRODUCTION_WEBHOOK != '' }} - name: Checkout uses: actions/checkout@v2 @@ -273,15 +277,15 @@ jobs: template-var: stack_image_tag template-var-value: ${{ needs.build.outputs.tag }} - name: Notify staging deployment - if: needs.build.outputs.notify == 'true' + if: needs.build.outputs.notify-staging == 'true' uses: rtCamp/action-slack-notify@v2 env: SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} - SLACK_TITLE: STAGING Deployment Complete + SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_STAGING_WEBHOOK }} + SLACK_TITLE: There's a new STAGING deployment SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} SLACK_FOOTER: '' - MSG_MINIMAL: actions url,commit + MSG_MINIMAL: true deploy-production: # A fixed job that "deploys to the Fragalysis Production" Kubernetes Namespace @@ -307,15 +311,15 @@ jobs: template-var: stack_image_tag template-var-value: ${{ needs.build.outputs.tag }} - name: Notify production deployment - if: needs.build.outputs.notify == 'true' + if: needs.build.outputs.notify-production == 'true' uses: rtCamp/action-slack-notify@v2 env: SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} - SLACK_TITLE: PRODUCTION Deployment Complete + SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_PRODUCTION_WEBHOOK }} + SLACK_TITLE: There's a new PRODUCTION deployment SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} SLACK_FOOTER: '' - MSG_MINIMAL: actions url,commit + MSG_MINIMAL: true deploy-developer: # A "deploy to a developer's Fragalysis" Kubernetes Namespace From d5ac5bcc416291c8bd6f71d31288644da244e921 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Fri, 11 Aug 2023 11:58:49 +0100 Subject: [PATCH 047/143] ci: Possible fix for missing webhooks --- .github/workflows/build-main.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 93ec7c5..f54108b 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -130,7 +130,7 @@ jobs: version: ${{ steps.vars.outputs.version }} steps: - name: Inject slug/short variables - uses: rlespinasse/github-slug-action@v3.x + uses: rlespinasse/github-slug-action@v4 - name: Initialise workflow variables id: vars env: @@ -138,6 +138,8 @@ jobs: SLACK_NOTIFY_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} TRIGGER_AWX: ${{ secrets.TRIGGER_AWX }} TRIGGER_DEVELOPER_AWX: ${{ secrets.TRIGGER_DEVELOPER_AWX }} + SLACK_NOTIFY_STAGING_WEBHOOK: ${{ secrets.SLACK_NOTIFY_STAGING_WEBHOOK }} + SLACK_NOTIFY_PRODUCTION_WEBHOOK: ${{ secrets.SLACK_NOTIFY_PRODUCTION_WEBHOOK }} run: | # BE_NAMESPACE BE_NAMESPACE="${{ env.BE_NAMESPACE }}" @@ -214,7 +216,7 @@ jobs: echo ::set-output name=notify-production::${{ env.SLACK_NOTIFY_PRODUCTION_WEBHOOK != '' }} - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Display build args run: | @@ -226,7 +228,7 @@ jobs: echo STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} echo tag=${{ steps.vars.outputs.tag }} - name: Build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} build-args: | From 814915b546f3768dbbfe3b411db07b831cb7f475 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Fri, 11 Aug 2023 12:01:37 +0100 Subject: [PATCH 048/143] ci: Doc tweak --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index f54108b..76c54ee 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -42,7 +42,8 @@ name: build main # 'awx/fragalysis-developer'. # You should not set this and TRIGGER_AWX. # -# SLACK_NOTIFY_WEBHOOK optional - required for Slack notifications +# SLACK_NOTIFY_STAGING_WEBHOOK optional - required for Slack notifications +# SLACK_NOTIFY_PRODUCTION_WEBHOOK optional - required for Slack notifications # # ----------- # Environment (GitHub Environments) @@ -135,7 +136,6 @@ jobs: id: vars env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - SLACK_NOTIFY_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} TRIGGER_AWX: ${{ secrets.TRIGGER_AWX }} TRIGGER_DEVELOPER_AWX: ${{ secrets.TRIGGER_DEVELOPER_AWX }} SLACK_NOTIFY_STAGING_WEBHOOK: ${{ secrets.SLACK_NOTIFY_STAGING_WEBHOOK }} From 723fa195edb2b24ca8dc453d3c86948e56d5de6b Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Fri, 11 Aug 2023 12:27:37 +0100 Subject: [PATCH 049/143] ci: Adds pre-deployment notification --- .github/workflows/build-main.yaml | 32 +++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 76c54ee..66c3c9a 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -269,6 +269,16 @@ jobs: runs-on: ubuntu-latest environment: awx/fragalysis-production steps: + - name: Notify staging deployment started + if: needs.build.outputs.notify-staging == 'true' + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 + SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_STAGING_WEBHOOK }} + SLACK_TITLE: A new STAGING deployment has started + SLACK_MESSAGE: Deploying image ${{ needs.build.outputs.tag }} + SLACK_FOOTER: '' + MSG_MINIMAL: true - name: Deploy staging uses: informaticsmatters/trigger-awx-action@v1 with: @@ -278,14 +288,14 @@ jobs: template-user-password: ${{ secrets.AWX_USER_PASSWORD }} template-var: stack_image_tag template-var-value: ${{ needs.build.outputs.tag }} - - name: Notify staging deployment + - name: Notify staging deployment complete if: needs.build.outputs.notify-staging == 'true' uses: rtCamp/action-slack-notify@v2 env: SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_STAGING_WEBHOOK }} - SLACK_TITLE: There's a new STAGING deployment - SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} + SLACK_TITLE: A new STAGING deployment is ready + SLACK_MESSAGE: Deployed image ${{ needs.build.outputs.tag }} SLACK_FOOTER: '' MSG_MINIMAL: true @@ -303,6 +313,16 @@ jobs: runs-on: ubuntu-latest environment: awx/fragalysis-production steps: + - name: Notify production deployment started + if: needs.build.outputs.notify-production == 'true' + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 + SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_PRODUCTION_WEBHOOK }} + SLACK_TITLE: A new PRODUCTION deployment has started + SLACK_MESSAGE: Deploying image ${{ needs.build.outputs.tag }} + SLACK_FOOTER: '' + MSG_MINIMAL: true - name: Deploy production uses: informaticsmatters/trigger-awx-action@v1 with: @@ -312,14 +332,14 @@ jobs: template-user-password: ${{ secrets.AWX_USER_PASSWORD }} template-var: stack_image_tag template-var-value: ${{ needs.build.outputs.tag }} - - name: Notify production deployment + - name: Notify production deployment complete if: needs.build.outputs.notify-production == 'true' uses: rtCamp/action-slack-notify@v2 env: SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_PRODUCTION_WEBHOOK }} - SLACK_TITLE: There's a new PRODUCTION deployment - SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} + SLACK_TITLE: A new PRODUCTION deployment is ready + SLACK_MESSAGE: Deployed image ${{ needs.build.outputs.tag }} SLACK_FOOTER: '' MSG_MINIMAL: true From b93bad01aa10463189e293854b7af7dc26b27b5a Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 14 Aug 2023 15:27:34 +0100 Subject: [PATCH 050/143] ci: An attempt to fix slack notifications --- .github/workflows/build-main.yaml | 34 +++++++++++++------------------ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 66c3c9a..34278c0 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -138,8 +138,6 @@ jobs: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} TRIGGER_AWX: ${{ secrets.TRIGGER_AWX }} TRIGGER_DEVELOPER_AWX: ${{ secrets.TRIGGER_DEVELOPER_AWX }} - SLACK_NOTIFY_STAGING_WEBHOOK: ${{ secrets.SLACK_NOTIFY_STAGING_WEBHOOK }} - SLACK_NOTIFY_PRODUCTION_WEBHOOK: ${{ secrets.SLACK_NOTIFY_PRODUCTION_WEBHOOK }} run: | # BE_NAMESPACE BE_NAMESPACE="${{ env.BE_NAMESPACE }}" @@ -207,14 +205,6 @@ jobs: echo set-output name=production-tag::${HAS_PRODUCTION_TAG} echo ::set-output name=production-tag::${HAS_PRODUCTION_TAG} - # Do we send Slack notifications about staging, i.e. is SLACK_NOTIFY_STAGING_WEBHOOK defined? - echo set-output name=notify-staging::${{ env.SLACK_NOTIFY_STAGING_WEBHOOK != '' }} - echo ::set-output name=notify-staging::${{ env.SLACK_NOTIFY_STAGING_WEBHOOK != '' }} - - # Do we send Slack notifications about production, i.e. is SLACK_NOTIFY_PRODUCTION_WEBHOOK defined? - echo set-output name=notify-production::${{ env.SLACK_NOTIFY_PRODUCTION_WEBHOOK != '' }} - echo ::set-output name=notify-production::${{ env.SLACK_NOTIFY_PRODUCTION_WEBHOOK != '' }} - - name: Checkout uses: actions/checkout@v3 @@ -268,14 +258,16 @@ jobs: needs.build.outputs.deploy == 'true' runs-on: ubuntu-latest environment: awx/fragalysis-production + env: + slack_notify_staging_webhook: ${{ secrets.SLACK_NOTIFY_STAGING_WEBHOOK }} steps: - name: Notify staging deployment started - if: needs.build.outputs.notify-staging == 'true' + if: ${{ env.slack_notify_staging_webhook != '' }} uses: rtCamp/action-slack-notify@v2 env: SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_STAGING_WEBHOOK }} - SLACK_TITLE: A new STAGING deployment has started + SLACK_WEBHOOK: ${{ env.slack_notify_staging_webhook }} + SLACK_TITLE: A new STAGING deployment has begun SLACK_MESSAGE: Deploying image ${{ needs.build.outputs.tag }} SLACK_FOOTER: '' MSG_MINIMAL: true @@ -289,11 +281,11 @@ jobs: template-var: stack_image_tag template-var-value: ${{ needs.build.outputs.tag }} - name: Notify staging deployment complete - if: needs.build.outputs.notify-staging == 'true' + if: ${{ env.slack_notify_staging_webhook != '' }} uses: rtCamp/action-slack-notify@v2 env: SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_STAGING_WEBHOOK }} + SLACK_WEBHOOK: ${{ env.slack_notify_staging_webhook }} SLACK_TITLE: A new STAGING deployment is ready SLACK_MESSAGE: Deployed image ${{ needs.build.outputs.tag }} SLACK_FOOTER: '' @@ -312,14 +304,16 @@ jobs: needs.build.outputs.production-tag == 'true' runs-on: ubuntu-latest environment: awx/fragalysis-production + env: + slack_notify_production_webhook: ${{ secrets.SLACK_NOTIFY_PRODUCTION_WEBHOOK }} steps: - name: Notify production deployment started - if: needs.build.outputs.notify-production == 'true' + if: ${{ env.slack_notify_production_webhook != '' }} uses: rtCamp/action-slack-notify@v2 env: SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_PRODUCTION_WEBHOOK }} - SLACK_TITLE: A new PRODUCTION deployment has started + SLACK_WEBHOOK: ${{ env.slack_notify_production_webhook }} + SLACK_TITLE: A new PRODUCTION deployment has begun SLACK_MESSAGE: Deploying image ${{ needs.build.outputs.tag }} SLACK_FOOTER: '' MSG_MINIMAL: true @@ -333,11 +327,11 @@ jobs: template-var: stack_image_tag template-var-value: ${{ needs.build.outputs.tag }} - name: Notify production deployment complete - if: needs.build.outputs.notify-production == 'true' + if: ${{ env.slack_notify_production_webhook != '' }} uses: rtCamp/action-slack-notify@v2 env: SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_PRODUCTION_WEBHOOK }} + SLACK_WEBHOOK: ${{ env.slack_notify_production_webhook }} SLACK_TITLE: A new PRODUCTION deployment is ready SLACK_MESSAGE: Deployed image ${{ needs.build.outputs.tag }} SLACK_FOOTER: '' From d2e7989dae15e795a444e7aaa01dd9828e29d169 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 14 Aug 2023 16:53:43 +0100 Subject: [PATCH 051/143] An attempt to fix CI action build warnings --- .github/workflows/build-main.yaml | 87 ++++++++++++------------------- 1 file changed, 34 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 34278c0..3ed2cda 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -1,20 +1,13 @@ --- name: build main -# Actions that take place after every commit the master/main branch. -# Here every commit is built, tagged as 'latest' and tested. +# Actions that take place after a workflow trigger on the master/main branch. # If a DOCKERHUB_USERNAME secret is defined the image is pushed. # If a TRIGGER_AWX secret is defined the image is deployed to Kubernetes. # Actions also run if the repository is tagged. # Every tag is deployed to staging and every production-grade tag -# (of the form N.N.N) is deployed to production.defaults: -# -# Actions also run on a schedule - the container is built, tested, -# pushed and deployed (if the relevant secrets are set) based on -# a defined schedule. -# -# Actions also run on external trigger (workflow-dispatch). +# (of the form N.N.N) is deployed to production. # --------------- # Control secrets @@ -63,9 +56,6 @@ name: build main on: push: - branches: - - 'master' - - 'main' tags: - '**' # Build if triggered externally. @@ -88,7 +78,7 @@ on: description: The fragalysis-stack Docker Hub namespace (to publish to) required: false stack_image_tag: - description: The image tage to apply to the fragalysis-stack image + description: The image tag to apply to the fragalysis-stack image required: false env: @@ -114,18 +104,14 @@ env: BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem - # Common slack notification variables. - # Used in the rtCamp/action-slack-notify Action. - SLACK_USERNAME: ActionBot - SLACK_ICON: https://github.com/InformaticsMatters/dls-fragalysis-stack-kubernetes/raw/master/icons/094-robot-face-3-512.png?size=48 jobs: build: runs-on: ubuntu-latest outputs: deploy: ${{ steps.vars.outputs.deploy }} - deploy-developer: ${{ steps.vars.outputs.deploy-developer }} - production-tag: ${{ steps.vars.outputs.production-tag }} + deploy_developer: ${{ steps.vars.outputs.deploy_developer }} + production_tag: ${{ steps.vars.outputs.production_tag }} push: ${{ steps.vars.outputs.push }} tag: ${{ steps.vars.outputs.tag }} version: ${{ steps.vars.outputs.version }} @@ -143,67 +129,67 @@ jobs: BE_NAMESPACE="${{ env.BE_NAMESPACE }}" if [ -n "${{ github.event.inputs.be_namespace }}" ]; then BE_NAMESPACE="${{ github.event.inputs.be_namespace }}"; elif [ -n "${{ secrets.BE_NAMESPACE }}" ]; then BE_NAMESPACE="${{ secrets.BE_NAMESPACE }}"; fi - echo set-output name=BE_NAMESPACE::${BE_NAMESPACE} - echo ::set-output name=BE_NAMESPACE::${BE_NAMESPACE} + echo BE_NAMESPACE=${BE_NAMESPACE} + echo "BE_NAMESPACE=${BE_NAMESPACE}" >> $GITHUB_OUTPUT # BE_IMAGE_TAG BE_IMAGE_TAG="${{ env.BE_IMAGE_TAG }}" if [ -n "${{ github.event.inputs.be_image_tag }}" ]; then BE_IMAGE_TAG="${{ github.event.inputs.be_image_tag }}"; elif [ -n "${{ secrets.BE_IMAGE_TAG }}" ]; then BE_IMAGE_TAG="${{ secrets.BE_IMAGE_TAG }}"; fi - echo set-output name=BE_IMAGE_TAG::${BE_IMAGE_TAG} - echo ::set-output name=BE_IMAGE_TAG::${BE_IMAGE_TAG} + echo BE_IMAGE_TAG=${BE_IMAGE_TAG} + echo "BE_IMAGE_TAG=${BE_IMAGE_TAG}" >> $GITHUB_OUTPUT # FE_NAMESPACE FE_NAMESPACE="${{ env.FE_NAMESPACE }}" if [ -n "${{ github.event.inputs.fe_namespace }}" ]; then FE_NAMESPACE="${{ github.event.inputs.fe_namespace }}"; elif [ -n "${{ secrets.FE_NAMESPACE }}" ]; then FE_NAMESPACE="${{ secrets.FE_NAMESPACE }}"; fi - echo set-output name=FE_NAMESPACE::${FE_NAMESPACE} - echo ::set-output name=FE_NAMESPACE::${FE_NAMESPACE} + echo FE_NAMESPACE=${FE_NAMESPACE} + echo "FE_NAMESPACE=${FE_NAMESPACE}" >> $GITHUB_OUTPUT # FE_BRANCH FE_BRANCH="${{ env.FE_BRANCH }}" if [ -n "${{ github.event.inputs.fe_branch }}" ]; then FE_BRANCH="${{ github.event.inputs.fe_branch }}"; elif [ -n "${{ secrets.FE_BRANCH }}" ]; then FE_BRANCH="${{ secrets.FE_BRANCH }}"; fi - echo set-output name=FE_BRANCH::${FE_BRANCH} - echo ::set-output name=FE_BRANCH::${FE_BRANCH} + echo FE_BRANCH=${FE_BRANCH} + echo "FE_BRANCH=${FE_BRANCH}" >> $GITHUB_OUTPUT # STACK_NAMESPACE STACK_NAMESPACE="${{ env.STACK_NAMESPACE }}" if [ -n "${{ github.event.inputs.stack_namespace }}" ]; then STACK_NAMESPACE="${{ github.event.inputs.stack_namespace }}"; elif [ -n "${{ secrets.STACK_NAMESPACE }}" ]; then STACK_NAMESPACE="${{ secrets.STACK_NAMESPACE }}"; fi - echo set-output name=STACK_NAMESPACE::${STACK_NAMESPACE} - echo ::set-output name=STACK_NAMESPACE::${STACK_NAMESPACE} + echo STACK_NAMESPACE=${STACK_NAMESPACE} + echo "STACK_NAMESPACE=${STACK_NAMESPACE}" >> $GITHUB_OUTPUT # Set a version STACK_VERSION="0.0.0" if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then STACK_VERSION="${{ env.GITHUB_REF_SLUG }}"; else STACK_VERSION="${{ github.ref_name }}.${{ github.run_number }}"; fi - echo set-output name=STACK_VERSION::${STACK_VERSION} - echo ::set-output name=STACK_VERSION::${STACK_VERSION} + echo STACK_VERSION=${STACK_VERSION} + echo "STACK_VERSION=${STACK_VERSION}" >> $GITHUB_OUTPUT # What image tag are we creating? 'latest' (if not tagged) or a GitHub tag? TAG="latest" if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then TAG="${{ env.GITHUB_REF_SLUG }}"; fi - echo set-output name=tag::${TAG} - echo ::set-output name=tag::${TAG} + echo tag=${TAG} + echo "tag=${TAG}" >> $GITHUB_OUTPUT # Do we push, i.e. is DOCKERHUB_USERNAME defined? - echo set-output name=push::${{ env.DOCKERHUB_USERNAME != '' }} - echo ::set-output name=push::${{ env.DOCKERHUB_USERNAME != '' }} + echo push=${{ env.DOCKERHUB_USERNAME != '' }} + echo "push=${{ env.DOCKERHUB_USERNAME != '' }}" >> $GITHUB_OUTPUT # Do we deploy official images, i.e. is TRIGGER_AWX 'yes'? - echo set-output name=deploy::${{ env.TRIGGER_AWX == 'yes' }} - echo ::set-output name=deploy::${{ env.TRIGGER_AWX == 'yes' }} + echo deploy=${{ env.TRIGGER_AWX == 'yes' }} + echo "deploy=${{ env.TRIGGER_AWX == 'yes' }}" >> $GITHUB_OUTPUT # Do we deploy developer images, i.e. is TRIGGER_DEVELOPER_AWX 'yes'? - echo set-output name=deploy-developer::${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }} - echo ::set-output name=deploy-developer::${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }} + echo deploy_developer=${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }} + echo "deploy_developer=${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }}" >> $GITHUB_OUTPUT # Do we deploy to production, i.e. is there a TAG of the form N.N.N? HAS_PRODUCTION_TAG=false if [[ ${{ env.GITHUB_REF_SLUG }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then HAS_PRODUCTION_TAG=true; fi - echo set-output name=production-tag::${HAS_PRODUCTION_TAG} - echo ::set-output name=production-tag::${HAS_PRODUCTION_TAG} + echo production_tag=${HAS_PRODUCTION_TAG} + echo "production_tag=${HAS_PRODUCTION_TAG}" >> $GITHUB_OUTPUT - name: Checkout uses: actions/checkout@v3 @@ -216,7 +202,6 @@ jobs: echo FE_BRANCH=${{ steps.vars.outputs.FE_BRANCH }} echo STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} echo STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} - echo tag=${{ steps.vars.outputs.tag }} - name: Build uses: docker/build-push-action@v4 with: @@ -238,7 +223,7 @@ jobs: STACK_TAG: ${{ steps.vars.outputs.tag }} - name: Login to DockerHub if: steps.vars.outputs.push == 'true' - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -265,10 +250,9 @@ jobs: if: ${{ env.slack_notify_staging_webhook != '' }} uses: rtCamp/action-slack-notify@v2 env: - SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 SLACK_WEBHOOK: ${{ env.slack_notify_staging_webhook }} SLACK_TITLE: A new STAGING deployment has begun - SLACK_MESSAGE: Deploying image ${{ needs.build.outputs.tag }} + SLACK_MESSAGE: Image tag is "${{ needs.build.outputs.tag }}"" SLACK_FOOTER: '' MSG_MINIMAL: true - name: Deploy staging @@ -284,10 +268,9 @@ jobs: if: ${{ env.slack_notify_staging_webhook != '' }} uses: rtCamp/action-slack-notify@v2 env: - SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 SLACK_WEBHOOK: ${{ env.slack_notify_staging_webhook }} SLACK_TITLE: A new STAGING deployment is ready - SLACK_MESSAGE: Deployed image ${{ needs.build.outputs.tag }} + SLACK_MESSAGE: Image tag is "${{ needs.build.outputs.tag }}" SLACK_FOOTER: '' MSG_MINIMAL: true @@ -301,7 +284,7 @@ jobs: if: | needs.build.outputs.push == 'true' && needs.build.outputs.deploy == 'true' && - needs.build.outputs.production-tag == 'true' + needs.build.outputs.production_tag == 'true' runs-on: ubuntu-latest environment: awx/fragalysis-production env: @@ -311,10 +294,9 @@ jobs: if: ${{ env.slack_notify_production_webhook != '' }} uses: rtCamp/action-slack-notify@v2 env: - SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 SLACK_WEBHOOK: ${{ env.slack_notify_production_webhook }} SLACK_TITLE: A new PRODUCTION deployment has begun - SLACK_MESSAGE: Deploying image ${{ needs.build.outputs.tag }} + SLACK_MESSAGE: Image tag is "${{ needs.build.outputs.tag }}" SLACK_FOOTER: '' MSG_MINIMAL: true - name: Deploy production @@ -330,10 +312,9 @@ jobs: if: ${{ env.slack_notify_production_webhook != '' }} uses: rtCamp/action-slack-notify@v2 env: - SLACK_ICON: https://avatars.githubusercontent.com/u/43742164?s=32&v=4 SLACK_WEBHOOK: ${{ env.slack_notify_production_webhook }} SLACK_TITLE: A new PRODUCTION deployment is ready - SLACK_MESSAGE: Deployed image ${{ needs.build.outputs.tag }} + SLACK_MESSAGE: Image tag is "${{ needs.build.outputs.tag }}" SLACK_FOOTER: '' MSG_MINIMAL: true @@ -344,7 +325,7 @@ jobs: needs: build if: | needs.build.outputs.push == 'true' && - needs.build.outputs.deploy-developer == 'true' + needs.build.outputs.deploy_developer == 'true' runs-on: ubuntu-latest environment: awx/fragalysis-developer steps: From 501d04571d70d8085a5ac5621f9d6286d07c73bf Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Wed, 16 Aug 2023 14:47:04 +0100 Subject: [PATCH 052/143] f/e --> 2023.08.5, b/e --> 2023.08.1 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 3ed2cda..a270e5e 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2023.07.1 - FE_BRANCH: 2023.08.4 + BE_IMAGE_TAG: 2023.08.1 + FE_BRANCH: 2023.08.5 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 230d72f7a511cabdb23a7a231456a44706378d28 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Thu, 24 Aug 2023 12:52:23 +0100 Subject: [PATCH 053/143] f/e --> 2023.08.6 F/E release: 2023.08.6: MS 2023-06-15 #1107 #1109 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index a270e5e..5b0df34 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.08.1 - FE_BRANCH: 2023.08.5 + FE_BRANCH: 2023.08.6 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From e782fc5db4bf33a10ac286b3ab6e8720c1d5f375 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Fri, 25 Aug 2023 09:37:09 +0100 Subject: [PATCH 054/143] f/e --> 2023.08.7 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 5b0df34..978ca95 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.08.1 - FE_BRANCH: 2023.08.6 + FE_BRANCH: 2023.08.7 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 0ae12b788d7e25db19d20b398260a327a90cec26 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 11 Sep 2023 11:33:19 +0200 Subject: [PATCH 055/143] feat: Inherits faster build from m2ms issue 1045 --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9ad6657..4a473b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,9 @@ ARG FE_IMAGE_TAG=master ARG STACK_NAMESPACE=xchem ARG STACK_VERSION=0.0.0 # Start with the frontend container image AS 'frontend'. -# We simply copy the contents of it's '/frontend' directory -# into the Backend image that we also pull in. -FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_IMAGE_TAG} AS frontend +# As part of the build we will copy the contents of its '/frontend' directory +# into the backend image that we also pull in. +FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_IMAGE_TAG} AS frontend # We have to repeat the ARG assignments... # ARGs are reset during the FROM action From 839eb3f123655815d94e6986928ffe530086ba02 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 11 Sep 2023 11:35:27 +0200 Subject: [PATCH 056/143] docs: Adds comment to Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 4a473b8..a5b4fe1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,4 +54,5 @@ COPY --from=frontend /frontend ${APP_ROOT}/frontend RUN ln -s ${APP_ROOT}/frontend/bundles/ ${APP_ROOT}/static/bundles WORKDIR ${APP_ROOT} +# The entrypoint is a responsibility of the backend image CMD ["./docker-entrypoint.sh"] From 61532fcaaeab90871c0e233ca88775fc244e8098 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 11 Sep 2023 11:38:39 +0200 Subject: [PATCH 057/143] docs: Adss comment about entrypoint file --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index a5b4fe1..7bf718b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,4 +55,5 @@ RUN ln -s ${APP_ROOT}/frontend/bundles/ ${APP_ROOT}/static/bundles WORKDIR ${APP_ROOT} # The entrypoint is a responsibility of the backend image + CMD ["./docker-entrypoint.sh"] From 50825a2b41c547ef4982220c3c925a013dc9f6f0 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 11 Sep 2023 11:45:09 +0200 Subject: [PATCH 058/143] refactor: Stack image (inclu fe & be) now called fragalysis2 --- .github/workflows/build-main.yaml | 8 ++++---- Dockerfile | 6 +++--- docker-compose.dev.yml | 2 +- docker-compose.test.yml | 2 +- docker-compose.yml | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 792cf54..a92aa65 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -223,7 +223,7 @@ jobs: - name: Build uses: docker/build-push-action@v2 with: - tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} + tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis2-stack:${{ steps.vars.outputs.tag }} build-args: | BE_NAMESPACE=${{ steps.vars.outputs.BE_NAMESPACE }} BE_IMAGE_TAG=${{ steps.vars.outputs.BE_IMAGE_TAG }} @@ -247,7 +247,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push if: steps.vars.outputs.push == 'true' - run: docker push ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} + run: docker push ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis2-stack:${{ steps.vars.outputs.tag }} - name: Notify build if: steps.vars.outputs.notify == 'true' uses: rtCamp/action-slack-notify@v2 @@ -272,7 +272,7 @@ jobs: - name: Deploy staging uses: informaticsmatters/trigger-awx-action@v1 with: - template: Staging Fragalysis Stack (Version Change) + template: Staging Fragalysis/2 Stack (Version Change) template-host: ${{ secrets.AWX_HOST }} template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} @@ -303,7 +303,7 @@ jobs: - name: Deploy production uses: informaticsmatters/trigger-awx-action@v1 with: - template: Production Fragalysis Stack (Version Change) + template: Production Fragalysis/2 Stack (Version Change) template-host: ${{ secrets.AWX_HOST }} template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} diff --git a/Dockerfile b/Dockerfile index 7bf718b..25e7f97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ ARG BE_NAMESPACE=xchem ARG BE_IMAGE_TAG=latest ARG FE_NAMESPACE=xchem -ARG FE_IMAGE_TAG=master +ARG FE_IMAGE_TAG=latest ARG STACK_NAMESPACE=xchem ARG STACK_VERSION=0.0.0 # Start with the frontend container image AS 'frontend'. # As part of the build we will copy the contents of its '/frontend' directory # into the backend image that we also pull in. -FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_IMAGE_TAG} AS frontend +FROM ${FE_NAMESPACE}/fragalysis2-frontend:${FE_IMAGE_TAG} AS frontend # We have to repeat the ARG assignments... # ARGs are reset during the FROM action @@ -25,7 +25,7 @@ ARG FE_IMAGE_TAG # Get the backend image # (we'll copy the pre-compiled forntend into it) -FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG} +FROM ${BE_NAMESPACE}/fragalysis2-backend:${BE_IMAGE_TAG} # We have to repeat the ARG assignments... ARG STACK_NAMESPACE diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index dd3f896..888c93a 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -13,7 +13,7 @@ services: - "5432:5432" web: container_name: web_dock - image: xchem/fragalysis-stack:latest + image: xchem/fragalysis2-stack:latest command: /bin/bash /code/launch-stack.sh volumes: - ../logs:/code/logs/ diff --git a/docker-compose.test.yml b/docker-compose.test.yml index e5713a9..10b7865 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -12,7 +12,7 @@ services: ports: - "5432:5432" tests: - image: ${STACK_NAMESPACE:-xchem}/fragalysis-stack:${STACK_TAG:-latest} + image: ${STACK_NAMESPACE:-xchem}/fragalysis2-stack:${STACK_TAG:-latest} command: - /code/wait-for-it.sh - database:5432 diff --git a/docker-compose.yml b/docker-compose.yml index ea28056..031d76d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,7 +34,7 @@ services: - NEO4J_dbms_memory_pagecache_size=4G stack: - image: ${STACK_NAMESPACE:-xchem}/fragalysis-stack:${STACK_TAG:-latest} + image: ${STACK_NAMESPACE:-xchem}/fragalysis2-stack:${STACK_TAG:-latest} container_name: stack build: context: . From 8c9aae6b22d9aef7bea1479543d3df6e6cd2b422 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 11 Sep 2023 17:18:40 +0200 Subject: [PATCH 059/143] build: Reversed image name change --- .github/workflows/build-main.yaml | 6 +++--- docker-compose.dev.yml | 3 ++- docker-compose.test.yml | 3 ++- docker-compose.yml | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index a92aa65..c46fc91 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -87,7 +87,7 @@ on: description: The fragalysis-stack Docker Hub namespace (to publish to) required: false stack_image_tag: - description: The image tage to apply to the fragalysis-stack image + description: The image tag to apply to the fragalysis-stack image required: false env: @@ -223,7 +223,7 @@ jobs: - name: Build uses: docker/build-push-action@v2 with: - tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis2-stack:${{ steps.vars.outputs.tag }} + tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} build-args: | BE_NAMESPACE=${{ steps.vars.outputs.BE_NAMESPACE }} BE_IMAGE_TAG=${{ steps.vars.outputs.BE_IMAGE_TAG }} @@ -247,7 +247,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push if: steps.vars.outputs.push == 'true' - run: docker push ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis2-stack:${{ steps.vars.outputs.tag }} + run: docker push ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} - name: Notify build if: steps.vars.outputs.notify == 'true' uses: rtCamp/action-slack-notify@v2 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 888c93a..90c70dc 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,3 +1,4 @@ +--- version: '3' services: @@ -13,7 +14,7 @@ services: - "5432:5432" web: container_name: web_dock - image: xchem/fragalysis2-stack:latest + image: xchem/fragalysis-stack:latest command: /bin/bash /code/launch-stack.sh volumes: - ../logs:/code/logs/ diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 10b7865..aaa0c8e 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -1,3 +1,4 @@ +--- version: '3' services: @@ -12,7 +13,7 @@ services: ports: - "5432:5432" tests: - image: ${STACK_NAMESPACE:-xchem}/fragalysis2-stack:${STACK_TAG:-latest} + image: ${STACK_NAMESPACE:-xchem}/fragalysis-stack:${STACK_TAG:-latest} command: - /code/wait-for-it.sh - database:5432 diff --git a/docker-compose.yml b/docker-compose.yml index 031d76d..43cbc57 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,4 @@ +--- version: '3' services: @@ -34,7 +35,7 @@ services: - NEO4J_dbms_memory_pagecache_size=4G stack: - image: ${STACK_NAMESPACE:-xchem}/fragalysis2-stack:${STACK_TAG:-latest} + image: ${STACK_NAMESPACE:-xchem}/fragalysis-stack:${STACK_TAG:-latest} container_name: stack build: context: . From 7f96c52511119926c0297e8ff8ef235a7f16d5f9 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 12 Sep 2023 12:09:32 +0200 Subject: [PATCH 060/143] ci: Better git output and image metadata --- .github/workflows/build-main.yaml | 79 +++++++++++++++++-------------- Dockerfile | 7 ++- 2 files changed, 49 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index c46fc91..7afe88c 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -24,12 +24,18 @@ name: build main # have the following GitHub 'Repository Secrets' defined # (i.e. via 'Settings -> Secrets'): - # -# BE_IMAGE_TAG optional - default stable +# BE_IMAGE_TAG optional - default is a valid version # BE_NAMESPACE optional - default xchem -# FE_IMAGE_TAG optional - default stable +# FE_IMAGE_TAG optional - default is a valid version # FE_NAMESPACE optional - default xchem # STACK_NAMESPACE optional - default xchem # +# As this workflow is for the refactored model, which differs significantly from the +# original Fragalysis, version tags have a metadata suffix applied, e.g. 2022.1.1+2. +# Users tag as normal, but the workflow introduces (and expects) a "+2" suffix +# in the container image tag. +# +# where the metadata # DOCKERHUB_USERNAME optional # DOCKERHUB_TOKEN optional - required if DOCKERHUB_USERNAME # @@ -112,6 +118,8 @@ env: BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem + # Fragalysis image tage siffix + IMAGE_TAG_METADATA: +2 # Common slack notification variables. # Used in the rtCamp/action-slack-notify Action. SLACK_USERNAME: ActionBot @@ -142,71 +150,71 @@ jobs: BE_NAMESPACE="${{ env.BE_NAMESPACE }}" if [ -n "${{ github.event.inputs.be_namespace }}" ]; then BE_NAMESPACE="${{ github.event.inputs.be_namespace }}"; elif [ -n "${{ secrets.BE_NAMESPACE }}" ]; then BE_NAMESPACE="${{ secrets.BE_NAMESPACE }}"; fi - echo set-output name=BE_NAMESPACE::${BE_NAMESPACE} - echo ::set-output name=BE_NAMESPACE::${BE_NAMESPACE} + echo BE_NAMESPACE=${BE_NAMESPACE} + echo "BE_NAMESPACE=${BE_NAMESPACE}" >> $GITHUB_OUTPUT # BE_IMAGE_TAG BE_IMAGE_TAG="${{ env.BE_IMAGE_TAG }}" if [ -n "${{ github.event.inputs.be_image_tag }}" ]; then BE_IMAGE_TAG="${{ github.event.inputs.be_image_tag }}"; elif [ -n "${{ secrets.BE_IMAGE_TAG }}" ]; then BE_IMAGE_TAG="${{ secrets.BE_IMAGE_TAG }}"; fi - echo set-output name=BE_IMAGE_TAG::${BE_IMAGE_TAG} - echo ::set-output name=BE_IMAGE_TAG::${BE_IMAGE_TAG} + echo BE_IMAGE_TAG=${BE_IMAGE_TAG} + echo "BE_IMAGE_TAG=${BE_IMAGE_TAG}" >> $GITHUB_OUTPUT # FE_NAMESPACE FE_NAMESPACE="${{ env.FE_NAMESPACE }}" if [ -n "${{ github.event.inputs.fe_namespace }}" ]; then FE_NAMESPACE="${{ github.event.inputs.fe_namespace }}"; elif [ -n "${{ secrets.FE_NAMESPACE }}" ]; then FE_NAMESPACE="${{ secrets.FE_NAMESPACE }}"; fi - echo set-output name=FE_NAMESPACE::${FE_NAMESPACE} - echo ::set-output name=FE_NAMESPACE::${FE_NAMESPACE} + echo FE_NAMESPACE=${FE_NAMESPACE} + echo "FE_NAMESPACE=${FE_NAMESPACE}" >> $GITHUB_OUTPUT # FE_IMAGE_TAG FE_IMAGE_TAG="${{ env.FE_IMAGE_TAG }}" if [ -n "${{ github.event.inputs.fe_image_tag }}" ]; then FE_IMAGE_TAG="${{ github.event.inputs.fe_image_tag }}"; elif [ -n "${{ secrets.FE_IMAGE_TAG }}" ]; then FE_IMAGE_TAG="${{ secrets.FE_IMAGE_TAG }}"; fi - echo set-output name=FE_IMAGE_TAG::${FE_IMAGE_TAG} - echo ::set-output name=FE_IMAGE_TAG::${FE_IMAGE_TAG} + echo FE_IMAGE_TAG=${FE_IMAGE_TAG} + echo "FE_IMAGE_TAG=${FE_IMAGE_TAG}" >> $GITHUB_OUTPUT # STACK_NAMESPACE STACK_NAMESPACE="${{ env.STACK_NAMESPACE }}" if [ -n "${{ github.event.inputs.stack_namespace }}" ]; then STACK_NAMESPACE="${{ github.event.inputs.stack_namespace }}"; elif [ -n "${{ secrets.STACK_NAMESPACE }}" ]; then STACK_NAMESPACE="${{ secrets.STACK_NAMESPACE }}"; fi - echo set-output name=STACK_NAMESPACE::${STACK_NAMESPACE} - echo ::set-output name=STACK_NAMESPACE::${STACK_NAMESPACE} + echo STACK_NAMESPACE=${STACK_NAMESPACE} + echo "STACK_NAMESPACE=${STACK_NAMESPACE}" >> $GITHUB_OUTPUT # Set a version STACK_VERSION="0.0.0" if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then STACK_VERSION="${{ env.GITHUB_REF_SLUG }}"; else STACK_VERSION="${{ github.ref_name }}.${{ github.run_number }}"; fi - echo set-output name=STACK_VERSION::${STACK_VERSION} - echo ::set-output name=STACK_VERSION::${STACK_VERSION} + echo STACK_VERSION=${STACK_VERSION} + echo "STACK_VERSION=${STACK_VERSION}" >> $GITHUB_OUTPUT # What image tag are we creating? 'latest' (if not tagged) or a GitHub tag? TAG="latest" if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then TAG="${{ env.GITHUB_REF_SLUG }}"; fi - echo set-output name=tag::${TAG} - echo ::set-output name=tag::${TAG} + echo tag=${TAG} + echo "tag=${TAG}" >> $GITHUB_OUTPUT # Do we push, i.e. is DOCKERHUB_USERNAME defined? - echo set-output name=push::${{ env.DOCKERHUB_USERNAME != '' }} - echo ::set-output name=push::${{ env.DOCKERHUB_USERNAME != '' }} + echo push=${{ env.DOCKERHUB_USERNAME != '' }} + echo "push=${{ env.DOCKERHUB_USERNAME != '' }}" >> $GITHUB_OUTPUT # Do we deploy official images, i.e. is TRIGGER_AWX 'yes'? - echo set-output name=deploy::${{ env.TRIGGER_AWX == 'yes' }} - echo ::set-output name=deploy::${{ env.TRIGGER_AWX == 'yes' }} + echo deploy=${{ env.TRIGGER_AWX == 'yes' }} + echo "deploy=${{ env.TRIGGER_AWX == 'yes' }}" >> $GITHUB_OUTPUT # Do we deploy developer images, i.e. is TRIGGER_DEVELOPER_AWX 'yes'? - echo set-output name=deploy-developer::${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }} - echo ::set-output name=deploy-developer::${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }} + echo deploy-developer=${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }} + echo "deploy-developer=${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }}" >> $GITHUB_OUTPUT # Do we deploy to production, i.e. is there a TAG of the form N.N.N? HAS_PRODUCTION_TAG=false if [[ ${{ env.GITHUB_REF_SLUG }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then HAS_PRODUCTION_TAG=true; fi - echo set-output name=production-tag::${HAS_PRODUCTION_TAG} - echo ::set-output name=production-tag::${HAS_PRODUCTION_TAG} + echo production-tag=${HAS_PRODUCTION_TAG} + echo "production-tag=${HAS_PRODUCTION_TAG}" >> $GITHUB_OUTPUT # Do we send Slack notifications, i.e. is SLACK_NOTIFY_WEBHOOK defined? - echo set-output name=notify::${{ env.SLACK_NOTIFY_WEBHOOK != '' }} - echo ::set-output name=notify::${{ env.SLACK_NOTIFY_WEBHOOK != '' }} + echo notify=${{ env.SLACK_NOTIFY_WEBHOOK != '' }} + echo "notify=${{ env.SLACK_NOTIFY_WEBHOOK != '' }}" >> $GITHUB_OUTPUT - name: Checkout uses: actions/checkout@v2 @@ -223,7 +231,7 @@ jobs: - name: Build uses: docker/build-push-action@v2 with: - tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} + tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }}+2 build-args: | BE_NAMESPACE=${{ steps.vars.outputs.BE_NAMESPACE }} BE_IMAGE_TAG=${{ steps.vars.outputs.BE_IMAGE_TAG }} @@ -231,6 +239,7 @@ jobs: FE_IMAGE_TAG=${{ steps.vars.outputs.FE_IMAGE_TAG }} STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} STACK_VERSION=${{ steps.vars.outputs.tag }} + IMAGE_TAG_METADATA=${{ env.IMAGE_TAG_METADATA }} - name: Test run: > docker-compose -f docker-compose.test.yml up @@ -238,7 +247,7 @@ jobs: --abort-on-container-exit env: STACK_NAMESPACE: ${{ steps.vars.outputs.STACK_NAMESPACE }} - STACK_TAG: ${{ steps.vars.outputs.tag }} + STACK_TAG: ${{ steps.vars.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} - name: Login to DockerHub if: steps.vars.outputs.push == 'true' uses: docker/login-action@v1 @@ -247,14 +256,14 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push if: steps.vars.outputs.push == 'true' - run: docker push ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} + run: docker push ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} - name: Notify build if: steps.vars.outputs.notify == 'true' uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} SLACK_TITLE: Build Complete - SLACK_MESSAGE: Built image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} + SLACK_MESSAGE: Built image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} deploy-staging: # A fixed job that "deploys to the Fragalysis Staging" Kubernetes Namespace @@ -277,14 +286,14 @@ jobs: template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} template-var: stack_image_tag - template-var-value: ${{ needs.build.outputs.tag }} + template-var-value: ${{ needs.build.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} - name: Notify staging deployment if: steps.vars.outputs.notify == 'true' uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} SLACK_TITLE: Deployment Complete (Staging) - SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} + SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} deploy-production: # A fixed job that "deploys to the Fragalysis Production" Kubernetes Namespace @@ -308,14 +317,14 @@ jobs: template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} template-var: stack_image_tag - template-var-value: ${{ needs.build.outputs.tag }} + template-var-value: ${{ needs.build.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} - name: Notify production deployment if: steps.vars.outputs.notify == 'true' uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} SLACK_TITLE: Deployment Complete (Production) - SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} + SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} deploy-developer: # A "deploy to a developer's Fragalysis" Kubernetes Namespace @@ -336,4 +345,4 @@ jobs: template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} template-var: stack_image_tag - template-var-value: ${{ needs.build.outputs.tag }} + template-var-value: ${{ needs.build.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} diff --git a/Dockerfile b/Dockerfile index 25e7f97..523f056 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,15 +4,18 @@ ARG FE_NAMESPACE=xchem ARG FE_IMAGE_TAG=latest ARG STACK_NAMESPACE=xchem ARG STACK_VERSION=0.0.0 +ARG IMAGE_TAG_METADATA=+2 # Start with the frontend container image AS 'frontend'. # As part of the build we will copy the contents of its '/frontend' directory # into the backend image that we also pull in. -FROM ${FE_NAMESPACE}/fragalysis2-frontend:${FE_IMAGE_TAG} AS frontend +FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_IMAGE_TAG}${IMAGE_TAG_METADATA} AS frontend # We have to repeat the ARG assignments... # ARGs are reset during the FROM action # See https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact +# Suffix +ARG IMAGE_TAG_METADATA # Us ARG STACK_NAMESPACE ARG STACK_VERSION @@ -25,7 +28,7 @@ ARG FE_IMAGE_TAG # Get the backend image # (we'll copy the pre-compiled forntend into it) -FROM ${BE_NAMESPACE}/fragalysis2-backend:${BE_IMAGE_TAG} +FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG}${IMAGE_TAG_METADATA} # We have to repeat the ARG assignments... ARG STACK_NAMESPACE From 2c8547764b2997fd325687e194721614b26a1414 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 18 Sep 2023 17:02:47 +0200 Subject: [PATCH 061/143] fix: Removed metadata (tag) feature --- .github/workflows/build-main.yaml | 19 ++++++++----------- Dockerfile | 5 ++--- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 7afe88c..2c17702 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -118,8 +118,6 @@ env: BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem - # Fragalysis image tage siffix - IMAGE_TAG_METADATA: +2 # Common slack notification variables. # Used in the rtCamp/action-slack-notify Action. SLACK_USERNAME: ActionBot @@ -239,7 +237,6 @@ jobs: FE_IMAGE_TAG=${{ steps.vars.outputs.FE_IMAGE_TAG }} STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} STACK_VERSION=${{ steps.vars.outputs.tag }} - IMAGE_TAG_METADATA=${{ env.IMAGE_TAG_METADATA }} - name: Test run: > docker-compose -f docker-compose.test.yml up @@ -247,7 +244,7 @@ jobs: --abort-on-container-exit env: STACK_NAMESPACE: ${{ steps.vars.outputs.STACK_NAMESPACE }} - STACK_TAG: ${{ steps.vars.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} + STACK_TAG: ${{ steps.vars.outputs.tag }} - name: Login to DockerHub if: steps.vars.outputs.push == 'true' uses: docker/login-action@v1 @@ -256,14 +253,14 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Push if: steps.vars.outputs.push == 'true' - run: docker push ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} + run: docker push ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} - name: Notify build if: steps.vars.outputs.notify == 'true' uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} SLACK_TITLE: Build Complete - SLACK_MESSAGE: Built image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} + SLACK_MESSAGE: Built image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} deploy-staging: # A fixed job that "deploys to the Fragalysis Staging" Kubernetes Namespace @@ -286,14 +283,14 @@ jobs: template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} template-var: stack_image_tag - template-var-value: ${{ needs.build.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} + template-var-value: ${{ needs.build.outputs.tag }} - name: Notify staging deployment if: steps.vars.outputs.notify == 'true' uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} SLACK_TITLE: Deployment Complete (Staging) - SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} + SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} deploy-production: # A fixed job that "deploys to the Fragalysis Production" Kubernetes Namespace @@ -317,14 +314,14 @@ jobs: template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} template-var: stack_image_tag - template-var-value: ${{ needs.build.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} + template-var-value: ${{ needs.build.outputs.tag }} - name: Notify production deployment if: steps.vars.outputs.notify == 'true' uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY_WEBHOOK }} SLACK_TITLE: Deployment Complete (Production) - SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} + SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} deploy-developer: # A "deploy to a developer's Fragalysis" Kubernetes Namespace @@ -345,4 +342,4 @@ jobs: template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} template-var: stack_image_tag - template-var-value: ${{ needs.build.outputs.tag }}${{ env.IMAGE_TAG_METADATA }} + template-var-value: ${{ needs.build.outputs.tag }} diff --git a/Dockerfile b/Dockerfile index 523f056..e365844 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,10 @@ ARG FE_NAMESPACE=xchem ARG FE_IMAGE_TAG=latest ARG STACK_NAMESPACE=xchem ARG STACK_VERSION=0.0.0 -ARG IMAGE_TAG_METADATA=+2 # Start with the frontend container image AS 'frontend'. # As part of the build we will copy the contents of its '/frontend' directory # into the backend image that we also pull in. -FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_IMAGE_TAG}${IMAGE_TAG_METADATA} AS frontend +FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_IMAGE_TAG} AS frontend # We have to repeat the ARG assignments... # ARGs are reset during the FROM action @@ -28,7 +27,7 @@ ARG FE_IMAGE_TAG # Get the backend image # (we'll copy the pre-compiled forntend into it) -FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG}${IMAGE_TAG_METADATA} +FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG} # We have to repeat the ARG assignments... ARG STACK_NAMESPACE From a52aa7f188a2bf46a1c4edd70ea1bb4925cd64d8 Mon Sep 17 00:00:00 2001 From: Warren Thompson Date: Mon, 25 Sep 2023 10:38:19 +0100 Subject: [PATCH 062/143] Update build-main.yaml --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 978ca95..5121e2b 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2023.08.1 + BE_IMAGE_TAG: 2023.09.1 FE_BRANCH: 2023.08.7 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From a8a58ad936ba35f3bb49bd4b93c6fb177d2aac05 Mon Sep 17 00:00:00 2001 From: Warren Thompson Date: Tue, 26 Sep 2023 12:44:34 +0100 Subject: [PATCH 063/143] Update build-main.yaml --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 5121e2b..43fad46 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.09.1 - FE_BRANCH: 2023.08.7 + FE_BRANCH: 2023.09.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From b5ca8e876e2a376925882fc75b452bf13c4b75a1 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Thu, 5 Oct 2023 14:23:15 +0100 Subject: [PATCH 064/143] f/e tag --> 2023.10.1 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 43fad46..b826749 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.09.1 - FE_BRANCH: 2023.09.2 + FE_BRANCH: 2023.10.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From bb7c700db5239189d406197c776c677fa8d42511 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:34:17 +0100 Subject: [PATCH 065/143] f/e tag --> 2023.10.2 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index b826749..86b36b3 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.09.1 - FE_BRANCH: 2023.10.1 + FE_BRANCH: 2023.10.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From e6987cfe90bcf69f8e0159a7d740155947f463d8 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:45:24 +0100 Subject: [PATCH 066/143] f/e tag to 2023.10.3 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 86b36b3..2fff5bb 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.09.1 - FE_BRANCH: 2023.10.2 + FE_BRANCH: 2023.10.3 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 49490319831d83df98f607ee13542fa3361c2d7e Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Tue, 7 Nov 2023 09:20:07 +0000 Subject: [PATCH 067/143] f/e tag --> 2023.11.1 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 2fff5bb..4ee8c87 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2023.09.1 - FE_BRANCH: 2023.10.3 + FE_BRANCH: 2023.11.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From f5bbb50090893147edb41f8aecbb80a676b1bd58 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 9 Nov 2023 15:12:51 +0100 Subject: [PATCH 068/143] fix: Adjustments to build for XCA fragalysis --- .github/workflows/build-main.yaml | 20 +++++++------------- Dockerfile | 4 +--- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 2c17702..17ddc75 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -30,12 +30,6 @@ name: build main # FE_NAMESPACE optional - default xchem # STACK_NAMESPACE optional - default xchem # -# As this workflow is for the refactored model, which differs significantly from the -# original Fragalysis, version tags have a metadata suffix applied, e.g. 2022.1.1+2. -# Users tag as normal, but the workflow introduces (and expects) a "+2" suffix -# in the container image tag. -# -# where the metadata # DOCKERHUB_USERNAME optional # DOCKERHUB_TOKEN optional - required if DOCKERHUB_USERNAME # @@ -229,7 +223,7 @@ jobs: - name: Build uses: docker/build-push-action@v2 with: - tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }}+2 + tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} build-args: | BE_NAMESPACE=${{ steps.vars.outputs.BE_NAMESPACE }} BE_IMAGE_TAG=${{ steps.vars.outputs.BE_IMAGE_TAG }} @@ -263,8 +257,8 @@ jobs: SLACK_MESSAGE: Built image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} deploy-staging: - # A fixed job that "deploys to the Fragalysis Staging" Kubernetes Namespace - # using a pre-defined AWX Job Template name + # A fixed job that deploys to the Fragalysis Staging Kubernetes Namespace + # using a pre-defined AWX Job Template name, # and the awx/fragalysis-production environment. # # All builds, tagged or otherwise, are deployed to staging. @@ -293,8 +287,8 @@ jobs: SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} deploy-production: - # A fixed job that "deploys to the Fragalysis Production" Kubernetes Namespace - # using a pre-defined AWX Job Template name + # A fixed job that deploys to the Fragalysis Production Kubernetes Namespace + # using a pre-defined AWX Job Template name, # and the awx/fragalysis-production environment. # # Only builds triggered by production-grade tags are deployed to production. @@ -324,8 +318,8 @@ jobs: SLACK_MESSAGE: Deployed ${{ needs.build.outputs.tag }} deploy-developer: - # A "deploy to a developer's Fragalysis" Kubernetes Namespace - # using an environment-defined AWX Job Template name + # Deploys to a developer's Fragalysis Kubernetes Namespace + # using an environment-defined AWX Job Template name, # and the awx/fragalysis-developer environment. needs: build if: | diff --git a/Dockerfile b/Dockerfile index e365844..ae5bebc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,6 @@ FROM ${FE_NAMESPACE}/fragalysis-frontend:${FE_IMAGE_TAG} AS frontend # ARGs are reset during the FROM action # See https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact -# Suffix -ARG IMAGE_TAG_METADATA # Us ARG STACK_NAMESPACE ARG STACK_VERSION @@ -26,7 +24,7 @@ ARG FE_NAMESPACE ARG FE_IMAGE_TAG # Get the backend image -# (we'll copy the pre-compiled forntend into it) +# (we'll copy the pre-compiled frontend into it) FROM ${BE_NAMESPACE}/fragalysis-backend:${BE_IMAGE_TAG} # We have to repeat the ARG assignments... From cdd56445a005625c44b2ce11cf6c182faf1340b3 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Fri, 10 Nov 2023 08:16:53 +0100 Subject: [PATCH 069/143] docs: Doc tweaks --- .github/workflows/build-main.yaml | 6 +++--- README.md | 27 ++++++++++++++++----------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 17ddc75..6f39183 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # For Jobs conditional on the presence of a secret see this Gist... # https://gist.github.com/jonico/24ffebee6d2fa2e679389fac8aef50a3 # - # New production stack builds should always result in a change to one + # New (tagged) production stack builds should always be preceded by a change to one # or both of the Backend or Frontend tags. i.e. before we make a production # release the author needs to change one or both of: - # @@ -107,8 +107,8 @@ env: # - FE_IMAGE_TAG # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2023.07.1 - FE_IMAGE_TAG: 2023.05.1 + BE_IMAGE_TAG: 2023.11.2 + FE_IMAGE_TAG: 2023.11.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem diff --git a/README.md b/README.md index d1bcfd9..008c7b4 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,35 @@ -[![build main](https://github.com/alanbchristie/fragalysis-stack/actions/workflows/build-main.yaml/badge.svg)](https://github.com/alanbchristie/fragalysis-stack/actions/workflows/build-main.yaml) +[![build main](https://github.com/xchem/fragalysis-stack/actions/workflows/build-main.yaml/badge.svg)](https://github.com/xchem/fragalysis-stack/actions/workflows/build-main.yaml) ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/xchem/fragalysis-stack) [![License](http://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat)](https://github.com/xchem/fragalysis-stack/blob/master/LICENSE.txt) # Fragalysis stack Docker setup for building a Django, RDKit and Postgres stack with neo4j. -There is no application code in the repository, it is a repository where the -stack application is *assembled* using environment variables that define the -origin of the [Backend] (container image) and [Frontend] (code). -The "official" stack is built and deployed using GitHub Actions and is deployed -to production when tagged (with a production-grade tag). +> There is no application code in this repository, it is a repository where the + stack application is *assembled* using environment variables that define the + origin of the [Backend] and [Frontend] container images. -When an official release is made you MUST make sure the default -backend and frontend variables are updated so the application is based on -the correct stable (tagged) backend and frontend code. Specifically: - +The stack is built and deployed using GitHub Actions and is deployed +to *staging* and *production* installations (**Namespaces** in a designated +Kubernetes cluster). If the build variables `DOCKERHUB_USERNAME` and +`TRIGGER_AWX` are defined staging deployments occur on every build +and production deployments occur on every *production-grade* tag. + +You **MUST** make sure the Action variables that select the backend and frontend +container images are updated prior to every production release so the stack +uses the chosen backend and frontend code. You will find these variables +in the `.github/workflows/build-main.yaml` action file: - - `BE_IMAGE_TAG` -- `FE_BRANCH` (called "branch" but should be a frontend tag) +- `FE_IMAGE_TAG` ## Local development A docker-compose file provides a convenient way of launching the stack locally. The suitability of the various docker-compose files is the responsibility of the developer. -Check the compose file, adjust accordingly then: - +Check the compose file, adjust accordingly, then: - docker-compose up From 799a67158f829e87fe34069e2718a40893dabbe8 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Fri, 10 Nov 2023 08:30:35 +0100 Subject: [PATCH 070/143] ci: Fix variable typo introduced in merge --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index ecd4ae4..ca203d8 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -182,8 +182,8 @@ jobs: echo "deploy=${{ env.TRIGGER_AWX == 'yes' }}" >> $GITHUB_OUTPUT # Do we deploy developer images, i.e. is TRIGGER_DEVELOPER_AWX 'yes'? - echo deploy-developer=${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }} - echo "deploy-developer=${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }}" >> $GITHUB_OUTPUT + echo deploy_developer=${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }} + echo "deploy_developer=${{ env.TRIGGER_DEVELOPER_AWX == 'yes' }}" >> $GITHUB_OUTPUT # Do we deploy to production, i.e. is there a TAG of the form N.N.N? HAS_PRODUCTION_TAG=false From 225a5bd3f47a6aff3ab42c57d3ec96de517b9239 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Fri, 10 Nov 2023 09:51:08 +0100 Subject: [PATCH 071/143] build: Updatd compose file, gitignore & docs --- .gitignore | 4 +++- README.md | 18 ++++++++++++++---- docker-compose.yml | 31 +++++++++++++++++++++++++++++-- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 723ef36..52e533e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -.idea \ No newline at end of file +.idea + +data/ diff --git a/README.md b/README.md index 97b589d..15f4962 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![License](http://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat)](https://github.com/xchem/fragalysis-stack/blob/master/LICENSE.txt) # Fragalysis stack + Docker setup for building a Django, RDKit and Postgres stack with neo4j. > There is no application code in this repository, it is a repository where the @@ -13,8 +14,8 @@ Docker setup for building a Django, RDKit and Postgres stack with neo4j. The stack is built and deployed using GitHub Actions and is deployed to *staging* and *production* installations (**Namespaces** in a designated Kubernetes cluster). If the build variables `DOCKERHUB_USERNAME` and -`TRIGGER_AWX` are defined staging deployments occur on every build -and production deployments occur on every *production-grade* tag. +`TRIGGER_AWX` are defined staging deployments occur on every build. +Production deployments occur on every *production-grade* tag. You **MUST** make sure the Action variables that select the backend and frontend container images are updated prior to every production release so the stack @@ -27,13 +28,22 @@ in the `.github/workflows/build-main.yaml` action file: - [More information on pushing to production](README.md#pushing-a-release-to-production) ## Local development + A docker-compose file provides a convenient way of launching the stack locally. The suitability of the various docker-compose files is the responsibility of the developer. Check the compose file, adjust accordingly, then: - - docker-compose up + docker-compose up -d + +> Containers in the docker-compose generally store persistent data in + thew `./data` and `./logs` directories of the repository. These directories + are created automatically if they do not exist. + +When you're done you can tear everything down with: - + + docker-compose down ## Pushing a release to production @@ -51,7 +61,7 @@ Check the compose file, adjust accordingly, then: - * Same as the frontend 2. Update [build-main.yaml](.github/workflows/build-main.yaml) with the new tags - * Change `FE_BRANCH` to the desired Frontend tag + * Change `FE_IMAGE_TAG` to the desired Frontend tag * Change `BE_IMAGE_TAG` to the desired Backend tag * Commit the changes to a new branch and start a pull request * Wait for review and approval diff --git a/docker-compose.yml b/docker-compose.yml index 43cbc57..bf213c0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,9 +2,9 @@ version: '3' services: - # The database + database: - image: postgres:12.2 + image: postgres:12.16-alpine3.18 container_name: database volumes: - ./data/postgresql/data:/var/lib/postgresql/data @@ -14,6 +14,12 @@ services: PGDATA: /var/lib/postgresql/data/pgdata ports: - "5432:5432" + healthcheck: + test: pg_isready -U postgres -d frag + interval: 10s + timeout: 2s + retries: 5 + start_period: 10s # The graph graph: @@ -33,6 +39,25 @@ services: environment: - NEO4J_AUTH=none - NEO4J_dbms_memory_pagecache_size=4G + healthcheck: + test: wget http://localhost:7474 || exit 1 + interval: 10s + timeout: 10s + retries: 20 + start_period: 10s + + # Redis (Celery/Worker Broker) + redis: + image: redis:7.2.3-alpine3.18 + container_name: redis + ports: + - "6379:6379" + healthcheck: + test: redis-cli ping + interval: 10s + timeout: 2s + retries: 5 + start_period: 10s stack: image: ${STACK_NAMESPACE:-xchem}/fragalysis-stack:${STACK_TAG:-latest} @@ -75,5 +100,7 @@ services: depends_on: database: condition: service_healthy + redis: + condition: service_healthy graph: condition: service_healthy From 4e36bb1cbf47c378b016c3d145591ee00fa566e0 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Fri, 10 Nov 2023 10:44:17 +0100 Subject: [PATCH 072/143] docs: Doc tweak --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 15f4962..20d200c 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Check the compose file, adjust accordingly, then: - docker-compose up -d > Containers in the docker-compose generally store persistent data in - thew `./data` and `./logs` directories of the repository. These directories + the `./data` directory of this repository. These directories are created automatically if they do not exist. When you're done you can tear everything down with: - From 5cb0043d6e872aeb0876c73ad2ea4f9522dd4c43 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 13 Nov 2023 09:29:44 +0100 Subject: [PATCH 073/143] ci: Fix AWX job template names --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index ca203d8..eadbe68 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -262,7 +262,7 @@ jobs: - name: Deploy staging uses: informaticsmatters/trigger-awx-action@v1 with: - template: Staging Fragalysis/2 Stack (Version Change) + template: Staging Fragalysis Stack (Version Change) template-host: ${{ secrets.AWX_HOST }} template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} @@ -306,7 +306,7 @@ jobs: - name: Deploy production uses: informaticsmatters/trigger-awx-action@v1 with: - template: Production Fragalysis/2 Stack (Version Change) + template: Production Fragalysis Stack (Version Change) template-host: ${{ secrets.AWX_HOST }} template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} From dfdf486fc182126118d580232fe03e0c865c8731 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 13 Nov 2023 09:40:21 +0100 Subject: [PATCH 074/143] ci: Removed test stage (responsibility of f/e & b/e) and doc tweaks --- .github/workflows/build-main.yaml | 8 ------- README.md | 12 ++++++----- docker-compose.test.yml | 35 ------------------------------- 3 files changed, 7 insertions(+), 48 deletions(-) delete mode 100644 docker-compose.test.yml diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index eadbe68..24e50c9 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -217,14 +217,6 @@ jobs: FE_IMAGE_TAG=${{ steps.vars.outputs.FE_IMAGE_TAG }} STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} STACK_VERSION=${{ steps.vars.outputs.tag }} - - name: Test - run: > - docker-compose -f docker-compose.test.yml up - --exit-code-from tests - --abort-on-container-exit - env: - STACK_NAMESPACE: ${{ steps.vars.outputs.STACK_NAMESPACE }} - STACK_TAG: ${{ steps.vars.outputs.tag }} - name: Login to DockerHub if: steps.vars.outputs.push == 'true' uses: docker/login-action@v2 diff --git a/README.md b/README.md index 20d200c..acb01e1 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,17 @@ Docker setup for building a Django, RDKit and Postgres stack with neo4j. stack application is *assembled* using environment variables that define the origin of the [Backend] and [Frontend] container images. -The stack is built and deployed using GitHub Actions and is deployed +The stack is built and orchestrated using GitHub Actions and is deployed to *staging* and *production* installations (**Namespaces** in a designated -Kubernetes cluster). If the build variables `DOCKERHUB_USERNAME` and -`TRIGGER_AWX` are defined staging deployments occur on every build. -Production deployments occur on every *production-grade* tag. +Kubernetes cluster). + +The build variables `DOCKERHUB_USERNAME` and `TRIGGER_AWX` must be defined +for orchestration to take place. Staging deployments take place on every downstream +build (frontend and backend) and tag, and production deployments take place on every tag. You **MUST** make sure the Action variables that select the backend and frontend container images are updated prior to every production release so the stack -uses the chosen backend and frontend code. You will find these variables +uses the appropriate backend and frontend code. You will find these variables in the `.github/workflows/build-main.yaml` action file: - - `BE_IMAGE_TAG` diff --git a/docker-compose.test.yml b/docker-compose.test.yml deleted file mode 100644 index aaa0c8e..0000000 --- a/docker-compose.test.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -version: '3' - -services: - database: - image: postgres:12.2 - volumes: - - ../django_data:/var/lib/postgresql/data - environment: - POSTGRES_PASSWORD: fragalysis - POSTGRES_DB: frag - PGDATA: /var/lib/postgresql/data/pgdata - ports: - - "5432:5432" - tests: - image: ${STACK_NAMESPACE:-xchem}/fragalysis-stack:${STACK_TAG:-latest} - command: - - /code/wait-for-it.sh - - database:5432 - - -- - - /bin/bash - - /code/test_entry.sh - volumes: - - ../logs:/code/logs/ - - ../media:/code/media/ - environment: - POSTGRESQL_DATABASE: frag - POSTGRESQL_USER: postgres - POSTGRESQL_PASSWORD: fragalysis - POSTGRESQL_HOST: database - POSTGRESQL_PORT: 5432 - ports: - - "80:80" - depends_on: - - database From 57d0fa150fb6c6eac1ea4702dad6aeaa2ff77c14 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 29 Jan 2024 15:47:54 +0000 Subject: [PATCH 075/143] fix: New JobTemplate names --- .github/workflows/build-main.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 24e50c9..c33d9cf 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2023.11.2 - FE_IMAGE_TAG: 2023.11.2 + BE_IMAGE_TAG: 2024.01.1 + FE_IMAGE_TAG: 2024.01.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem @@ -254,7 +254,7 @@ jobs: - name: Deploy staging uses: informaticsmatters/trigger-awx-action@v1 with: - template: Staging Fragalysis Stack (Version Change) + template: Staging Fragalysis Stack template-host: ${{ secrets.AWX_HOST }} template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} @@ -298,7 +298,7 @@ jobs: - name: Deploy production uses: informaticsmatters/trigger-awx-action@v1 with: - template: Production Fragalysis Stack (Version Change) + template: Production Fragalysis Stack template-host: ${{ secrets.AWX_HOST }} template-user: ${{ secrets.AWX_USER }} template-user-password: ${{ secrets.AWX_USER_PASSWORD }} From 40b0cf76d86b6b314874a7471702b3377a0e33c1 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 1 Feb 2024 10:20:00 +0000 Subject: [PATCH 076/143] fix: Update action versions --- .github/workflows/build-main.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index c33d9cf..96685bf 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -196,7 +196,7 @@ jobs: echo "notify=${{ env.SLACK_NOTIFY_WEBHOOK != '' }}" >> $GITHUB_OUTPUT - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Display build args run: | @@ -207,7 +207,7 @@ jobs: echo STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} echo STACK_VERSION=${{ steps.vars.outputs.STACK_VERSION }} - name: Build - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: tags: ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} build-args: | @@ -219,7 +219,7 @@ jobs: STACK_VERSION=${{ steps.vars.outputs.tag }} - name: Login to DockerHub if: steps.vars.outputs.push == 'true' - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} From 389ad64cd392533c7a8bc64c980e3aa4032dbca3 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Wed, 13 Mar 2024 15:08:20 +0100 Subject: [PATCH 077/143] build: Use of latest (v2) f/e and b/e tags --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 96685bf..3c347d0 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.01.1 - FE_IMAGE_TAG: 2024.01.1 + BE_IMAGE_TAG: 2024.03.3 + FE_IMAGE_TAG: 2024.03.5 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 68c8a79d9da293b797d1b00d30282a0ee2dfac83 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Wed, 13 Mar 2024 15:39:00 +0100 Subject: [PATCH 078/143] build: Adjusted f/e tag for latest tag --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 3c347d0..df0e892 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2024.03.3 - FE_IMAGE_TAG: 2024.03.5 + FE_IMAGE_TAG: 2024.03.6 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 8788c194ce17e0ec28de37a08151554f687e2af8 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Wed, 13 Mar 2024 17:21:55 +0100 Subject: [PATCH 079/143] ci: New f/e tag --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index df0e892..e6660fe 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2024.03.3 - FE_IMAGE_TAG: 2024.03.6 + FE_IMAGE_TAG: 2024.03.7 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 4aa782946988c90ba4b35a22077e47cc1b477202 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Wed, 13 Mar 2024 17:36:46 +0100 Subject: [PATCH 080/143] ci: Fix production release --- .github/workflows/build-main.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index e6660fe..386a7f4 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -188,8 +188,8 @@ jobs: # Do we deploy to production, i.e. is there a TAG of the form N.N.N? HAS_PRODUCTION_TAG=false if [[ ${{ env.GITHUB_REF_SLUG }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then HAS_PRODUCTION_TAG=true; fi - echo production-tag=${HAS_PRODUCTION_TAG} - echo "production-tag=${HAS_PRODUCTION_TAG}" >> $GITHUB_OUTPUT + echo production_tag=${HAS_PRODUCTION_TAG} + echo "production_tag=${HAS_PRODUCTION_TAG}" >> $GITHUB_OUTPUT # Do we send Slack notifications, i.e. is SLACK_NOTIFY_WEBHOOK defined? echo notify=${{ env.SLACK_NOTIFY_WEBHOOK != '' }} @@ -248,7 +248,7 @@ jobs: env: SLACK_WEBHOOK: ${{ env.slack_notify_staging_webhook }} SLACK_TITLE: A new STAGING deployment has begun - SLACK_MESSAGE: Image tag is "${{ needs.build.outputs.tag }}"" + SLACK_MESSAGE: Image tag is "${{ needs.build.outputs.tag }}" SLACK_FOOTER: '' MSG_MINIMAL: true - name: Deploy staging From 16f23509f784788081563a1eef15e2aa9218453b Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Fri, 22 Mar 2024 14:26:09 +0000 Subject: [PATCH 081/143] B/E tag to 2024.03.4 Kalev's medatafix --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 386a7f4..ab9b677 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.03.3 + BE_IMAGE_TAG: 2024.03.4 FE_IMAGE_TAG: 2024.03.7 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From affa0beb13faa8fa6786ff589c711e569227406c Mon Sep 17 00:00:00 2001 From: Kalev Takkis Date: Tue, 9 Apr 2024 10:45:31 +0100 Subject: [PATCH 082/143] BE tag to 2024.04.1 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index ab9b677..fb1b761 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.03.4 + BE_IMAGE_TAG: 2024.04.1 FE_IMAGE_TAG: 2024.03.7 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 49590556a19a50b67a329c934d534f34103a8736 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 20 May 2024 13:51:36 +0100 Subject: [PATCH 083/143] ci: Attempt to expose deployment failures --- .github/workflows/build-main.yaml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index fb1b761..2e0270a 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -252,6 +252,7 @@ jobs: SLACK_FOOTER: '' MSG_MINIMAL: true - name: Deploy staging + id: deploy_staging uses: informaticsmatters/trigger-awx-action@v1 with: template: Staging Fragalysis Stack @@ -260,8 +261,18 @@ jobs: template-user-password: ${{ secrets.AWX_USER_PASSWORD }} template-var: stack_image_tag template-var-value: ${{ needs.build.outputs.tag }} + continue-on-error: true + - name: Notify staging deployment failure + if: ${{ env.slack_notify_staging_webhook != '' && steps.deploy_staging.outcome == 'failure' }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ env.slack_notify_staging_webhook }} + SLACK_TITLE: The STAGING deployment FAILED + SLACK_MESSAGE: Please review the corresponding fragalysis-stack GitHuib Action Log + SLACK_FOOTER: '' + MSG_MINIMAL: true - name: Notify staging deployment complete - if: ${{ env.slack_notify_staging_webhook != '' }} + if: ${{ env.slack_notify_staging_webhook != '' && steps.deploy_staging.outcome == 'success' }} uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ env.slack_notify_staging_webhook }} @@ -296,6 +307,7 @@ jobs: SLACK_FOOTER: '' MSG_MINIMAL: true - name: Deploy production + id: deploy_production uses: informaticsmatters/trigger-awx-action@v1 with: template: Production Fragalysis Stack @@ -304,8 +316,18 @@ jobs: template-user-password: ${{ secrets.AWX_USER_PASSWORD }} template-var: stack_image_tag template-var-value: ${{ needs.build.outputs.tag }} + continue-on-error: true + - name: Notify production deployment failure + if: ${{ env.slack_notify_production_webhook != '' && steps.deploy_production.outcome == 'failure' }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ env.slack_notify_production_webhook }} + SLACK_TITLE: The PRODUCTION deployment FAILED + SLACK_MESSAGE: Please review the corresponding fragalysis-stack GitHuib Action Log + SLACK_FOOTER: '' + MSG_MINIMAL: true - name: Notify production deployment complete - if: ${{ env.slack_notify_production_webhook != '' }} + if: ${{ env.slack_notify_production_webhook != '' && steps.deploy_production.outcome == 'success'}} uses: rtCamp/action-slack-notify@v2 env: SLACK_WEBHOOK: ${{ env.slack_notify_production_webhook }} From f4e43df4e44e7e99fd9c6deacf8532d110da835e Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Fri, 13 Sep 2024 12:43:15 +0100 Subject: [PATCH 084/143] Update build-main.yaml --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 2e0270a..5d1d24c 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.04.1 - FE_IMAGE_TAG: 2024.03.7 + BE_IMAGE_TAG: 2024.09.2 + FE_IMAGE_TAG: 2024.09.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From f94c117552761dc0acc3edbf533b4bc4bbb1384d Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:34:04 +0100 Subject: [PATCH 085/143] Update build-main.yaml f/e: #1501 b/e: #1263 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 5d1d24c..e4ace42 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.09.2 - FE_IMAGE_TAG: 2024.09.1 + BE_IMAGE_TAG: 2024.09.3 + FE_IMAGE_TAG: 2024.09.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 6fbe6a55879fa3d92e91c5a27009a187748edfb2 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:34:33 +0100 Subject: [PATCH 086/143] b/e --> 2024.09.4 issues 1500 and 1530 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index e4ace42..1e94f0a 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.09.3 + BE_IMAGE_TAG: 2024.09.4 FE_IMAGE_TAG: 2024.09.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 24b078dce7edea510d160769d451a93298533064 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Tue, 5 Nov 2024 09:22:52 +0000 Subject: [PATCH 087/143] Mint incremental release tags 2024.11.1 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 1e94f0a..b3bfeab 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.09.4 - FE_IMAGE_TAG: 2024.09.2 + BE_IMAGE_TAG: 2024.11.1 + FE_IMAGE_TAG: 2024.11.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 2155d35f5d99d13531e726dd115625bd28a52420 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:13:25 +0000 Subject: [PATCH 088/143] media directory hot-fix issue 1564 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index b3bfeab..bca1bf7 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.11.1 + BE_IMAGE_TAG: 2024.11.1-1 FE_IMAGE_TAG: 2024.11.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 8c8fbcc3cfbcfdccb4d4d77f808ff3d9fc9b07fd Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:04:59 +0000 Subject: [PATCH 089/143] Update f/e & b/e to 2024.11.2 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index bca1bf7..afdb392 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.11.1-1 - FE_IMAGE_TAG: 2024.11.1 + BE_IMAGE_TAG: 2024.11.2 + FE_IMAGE_TAG: 2024.11.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 2ec7f8ffb14adc45d14c38b2766f520f8ae9fb69 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 3 Dec 2024 11:41:58 +0000 Subject: [PATCH 090/143] ci: Use updated trigger-awx-action --- .github/workflows/build-main.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index afdb392..718f506 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -253,7 +253,7 @@ jobs: MSG_MINIMAL: true - name: Deploy staging id: deploy_staging - uses: informaticsmatters/trigger-awx-action@v1 + uses: informaticsmatters/trigger-awx-action@v2 with: template: Staging Fragalysis Stack template-host: ${{ secrets.AWX_HOST }} @@ -308,7 +308,7 @@ jobs: MSG_MINIMAL: true - name: Deploy production id: deploy_production - uses: informaticsmatters/trigger-awx-action@v1 + uses: informaticsmatters/trigger-awx-action@v2 with: template: Production Fragalysis Stack template-host: ${{ secrets.AWX_HOST }} @@ -348,7 +348,7 @@ jobs: environment: awx/fragalysis-developer steps: - name: Deploy developer - uses: informaticsmatters/trigger-awx-action@v1 + uses: informaticsmatters/trigger-awx-action@v2 with: template: ${{ secrets.AWX_TEMPLATE_NAME }} template-host: ${{ secrets.AWX_HOST }} From ed4d69885b0a3a25856c2c22b6e7bfd93d6c6068 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:09:40 +0000 Subject: [PATCH 091/143] Snapshots refactor and mint incremental --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 718f506..33745ae 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.11.2 - FE_IMAGE_TAG: 2024.11.2 + BE_IMAGE_TAG: 2024.12.1 + FE_IMAGE_TAG: 2024.12.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 53e4f18b35087d275451614dc846b2a10452a345 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:13:52 +0000 Subject: [PATCH 092/143] Update build-main.yaml --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 33745ae..3195a42 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.12.1 + BE_IMAGE_TAG: 2024.12.2 FE_IMAGE_TAG: 2024.12.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From ff1206298a2f1ddfb154eea0003ad5960a054164 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Thu, 12 Dec 2024 09:46:05 +0000 Subject: [PATCH 093/143] 2024.12.2 Mint incremental release (target settings UI, density snapshots, LHS upload/display bugs) --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 3195a42..74b136d 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.12.2 - FE_IMAGE_TAG: 2024.12.1 + BE_IMAGE_TAG: 2024.12.3 + FE_IMAGE_TAG: 2024.12.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From aec3a15482b7a27d37c887ef95649189afc11b41 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Tue, 28 Jan 2025 15:46:40 +0000 Subject: [PATCH 094/143] b/e and f/e to user 2025.01.1 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 74b136d..59dbcb3 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2024.12.3 - FE_IMAGE_TAG: 2024.12.2 + BE_IMAGE_TAG: 2025.01.1 + FE_IMAGE_TAG: 2025.01.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 5d0e1049bbe9aef7c4f7307752deca69b0b513ee Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 6 Feb 2025 16:23:43 +0000 Subject: [PATCH 095/143] ci: Attempt to trigger behaviour tests from latest build --- .github/workflows/build-main.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 59dbcb3..f0400c4 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -281,6 +281,20 @@ jobs: SLACK_FOOTER: '' MSG_MINIMAL: true + trigger-behaviour-tests: + needs: build + if: needs.build.outputs.push == 'true' + runs-on: ubuntu-latest + steps: + - name: Trigger behaviour tests + uses: informaticsmatters/trigger-ci-action@v1 + with: + ci-owner: xchem + ci-repository: fragalysis-stack-behaviour-tests + ci-name: latest stack test + ci-user: ${{ secrets.STACK_USER }} + ci-user-token: ${{ secrets.STACK_USER_TOKEN }} + deploy-production: # A fixed job that deploys to the Fragalysis Production Kubernetes Namespace # using a pre-defined AWX Job Template name, From 4b58f2767bbb88bef0f7541bd392ef3583f9384e Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 6 Feb 2025 16:27:21 +0000 Subject: [PATCH 096/143] ci: Behaviour only on non-production builds --- .github/workflows/build-main.yaml | 33 ++++++++++++++++++------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index f0400c4..16e1c75 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -227,6 +227,25 @@ jobs: if: steps.vars.outputs.push == 'true' run: docker push ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} + trigger-behaviour-tests: + # Trigger behaviour tests + # (if deploying, but not to production) + needs: build + if: | + needs.build.outputs.push == 'true' && + needs.build.outputs.deploy == 'true' && + needs.build.outputs.production_tag == 'false' + runs-on: ubuntu-latest + steps: + - name: Trigger behaviour tests + uses: informaticsmatters/trigger-ci-action@v1 + with: + ci-owner: xchem + ci-repository: fragalysis-stack-behaviour-tests + ci-name: latest stack test + ci-user: ${{ secrets.STACK_USER }} + ci-user-token: ${{ secrets.STACK_USER_TOKEN }} + deploy-staging: # A fixed job that deploys to the Fragalysis Staging Kubernetes Namespace # using a pre-defined AWX Job Template name, @@ -281,20 +300,6 @@ jobs: SLACK_FOOTER: '' MSG_MINIMAL: true - trigger-behaviour-tests: - needs: build - if: needs.build.outputs.push == 'true' - runs-on: ubuntu-latest - steps: - - name: Trigger behaviour tests - uses: informaticsmatters/trigger-ci-action@v1 - with: - ci-owner: xchem - ci-repository: fragalysis-stack-behaviour-tests - ci-name: latest stack test - ci-user: ${{ secrets.STACK_USER }} - ci-user-token: ${{ secrets.STACK_USER_TOKEN }} - deploy-production: # A fixed job that deploys to the Fragalysis Production Kubernetes Namespace # using a pre-defined AWX Job Template name, From cc386f004b9447549cb138327c11e2436e1e027a Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Thu, 27 Feb 2025 08:30:39 +0000 Subject: [PATCH 097/143] Update build-main.yaml --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 16e1c75..1920580 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.01.1 - FE_IMAGE_TAG: 2025.01.1 + BE_IMAGE_TAG: 2025.02.1 + FE_IMAGE_TAG: 2025.02.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From f49673154308c3fddb11e212e1c7fd2243193d56 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Tue, 4 Mar 2025 09:43:05 +0000 Subject: [PATCH 098/143] Update f/e & b/e to 2025.03.1 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 1920580..3320dc6 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.02.1 - FE_IMAGE_TAG: 2025.02.1 + BE_IMAGE_TAG: 2025.03.1 + FE_IMAGE_TAG: 2025.03.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From a2a8aba216adebec506d1186776d046dc778fa2d Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Fri, 14 Mar 2025 14:54:05 +0000 Subject: [PATCH 099/143] Update f/e & b/e to 2025.03.2 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 3320dc6..52c92b1 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.03.1 - FE_IMAGE_TAG: 2025.03.1 + BE_IMAGE_TAG: 2025.03.2 + FE_IMAGE_TAG: 2025.03.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From abaa4ada9b85821b69f0c23258cb282a983b6b23 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Mon, 17 Mar 2025 13:06:45 +0000 Subject: [PATCH 100/143] Update f/e to 2025.03.3 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 52c92b1..308a755 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2025.03.2 - FE_IMAGE_TAG: 2025.03.2 + FE_IMAGE_TAG: 2025.03.3 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From be5df3aee304c50dd24fb80815961388db1b5be2 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Tue, 18 Mar 2025 16:50:34 +0000 Subject: [PATCH 101/143] Update f/e to 2025.03.4 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 308a755..6a0d708 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2025.03.2 - FE_IMAGE_TAG: 2025.03.3 + FE_IMAGE_TAG: 2025.03.4 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From a998373295a342892c68393549428e37930998a1 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Mon, 24 Mar 2025 17:51:27 +0000 Subject: [PATCH 102/143] b/e to 2025.03.3 and hotfix for Zika_NS2B3 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 6a0d708..08cc27d 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.03.2 + BE_IMAGE_TAG: 2025.03.3 FE_IMAGE_TAG: 2025.03.4 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From dead5e3e7602d5cf58a8f1d6da6810a53cc1e0a7 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Thu, 27 Mar 2025 14:39:35 +0000 Subject: [PATCH 103/143] Update build-main.yaml --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 08cc27d..e20674a 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.03.3 + BE_IMAGE_TAG: 2025.03.4 FE_IMAGE_TAG: 2025.03.4 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 6961153e93c61f5ecca57376b1d0975bbcc73d97 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:40:24 +0100 Subject: [PATCH 104/143] Update build-main.yaml --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index e20674a..c93428e 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.03.4 - FE_IMAGE_TAG: 2025.03.4 + BE_IMAGE_TAG: 2025.04.1 + FE_IMAGE_TAG: 2025.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From e7920d716599baf56ba23f070c0e87e9c818b22e Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Tue, 22 Apr 2025 15:35:23 +0100 Subject: [PATCH 105/143] f/e & b/e -> 2025.04.2 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index c93428e..1abae65 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.04.1 - FE_IMAGE_TAG: 2025.04.1 + BE_IMAGE_TAG: 2025.04.2 + FE_IMAGE_TAG: 2025.04.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 645217e22b8ec95876825a33ae70fe09c90c6cd9 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Wed, 14 May 2025 17:31:08 +0900 Subject: [PATCH 106/143] f/e & b/e -> 2025.05.1 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 1abae65..7232269 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.04.2 - FE_IMAGE_TAG: 2025.04.2 + BE_IMAGE_TAG: 2025.05.1 + FE_IMAGE_TAG: 2025.05.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From d5ed944e3ede3c682d344c4604d52d92a29a8099 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Wed, 11 Jun 2025 15:51:52 +0100 Subject: [PATCH 107/143] b/e -> 2025.06.1 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 7232269..66c9640 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.05.1 + BE_IMAGE_TAG: 2025.06.1 FE_IMAGE_TAG: 2025.05.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 6fabebfe660c8640565d15b0fe4e114bd3979d7e Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Mon, 30 Jun 2025 16:31:01 +0100 Subject: [PATCH 108/143] f/e & b/e -> 2025.06.1 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 66c9640..0340139 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.06.1 - FE_IMAGE_TAG: 2025.05.1 + BE_IMAGE_TAG: 2025.06.2 + FE_IMAGE_TAG: 2025.06.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 93768c50bbfea7aa5741e5fbe5cdae65ea2fb421 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Mon, 7 Jul 2025 10:35:32 +0100 Subject: [PATCH 109/143] docs: LICENCE copyright fix --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 8dada3e..864bfbd 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright 2025 Diamond Light Source Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 5573e8660ea5bbfeb578535cbd44790ffafd2f3c Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Tue, 9 Sep 2025 08:55:16 +0100 Subject: [PATCH 110/143] f/e & b/e -> 2025.09.1 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 0340139..a81e00d 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.06.2 - FE_IMAGE_TAG: 2025.06.2 + BE_IMAGE_TAG: 2025.09.1 + FE_IMAGE_TAG: 2025.09.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From aeda40cf40502f1836cb5697347f966e93be448d Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Wed, 24 Sep 2025 11:11:29 +0100 Subject: [PATCH 111/143] f/e & b/e -> 2025.09.2 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index a81e00d..ea9ea35 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.09.1 - FE_IMAGE_TAG: 2025.09.1 + BE_IMAGE_TAG: 2025.09.2 + FE_IMAGE_TAG: 2025.09.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From df873fb7de3bbe30536039559ce835e260fe38b4 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Tue, 14 Oct 2025 11:03:57 +0100 Subject: [PATCH 112/143] Update build-main.yaml --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index ea9ea35..16f29f2 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.09.2 - FE_IMAGE_TAG: 2025.09.2 + BE_IMAGE_TAG: 2025.10.1 + FE_IMAGE_TAG: 2025.10.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 05d90bd535158fd91e9cb2c403dede3068f6af44 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Tue, 21 Oct 2025 14:43:51 +0200 Subject: [PATCH 113/143] b/e -> 2025.10.2 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 16f29f2..5bb02cc 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.10.1 + BE_IMAGE_TAG: 2025.10.2 FE_IMAGE_TAG: 2025.10.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From f301abdb4cdc711d01caeefa93c06e1e555814c1 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Thu, 30 Oct 2025 10:43:16 +0000 Subject: [PATCH 114/143] b/e -> 2025.10.3, f/e -> 2025.10.2 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 5bb02cc..04c0733 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.10.2 - FE_IMAGE_TAG: 2025.10.1 + BE_IMAGE_TAG: 2025.10.3 + FE_IMAGE_TAG: 2025.10.2 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 1b6df40e7d4a0ca7dd8e74e980065e610b327ae0 Mon Sep 17 00:00:00 2001 From: Max Winokan <36866506+mwinokan@users.noreply.github.com> Date: Wed, 12 Nov 2025 09:12:58 +0000 Subject: [PATCH 115/143] f/e -> 2025.11.1 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 04c0733..4127490 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -100,7 +100,7 @@ env: # # Commit the changes and then tag or make a release from the stack repository. BE_IMAGE_TAG: 2025.10.3 - FE_IMAGE_TAG: 2025.10.2 + FE_IMAGE_TAG: 2025.11.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 4eca01d8ae4226c2b4e8e3d3922f1f6c84201051 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Tue, 16 Dec 2025 14:59:00 +0000 Subject: [PATCH 116/143] Experiment with OSV scanner --- .github/workflows/build-main.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 4127490..4a8841f 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -217,6 +217,11 @@ jobs: FE_IMAGE_TAG=${{ steps.vars.outputs.FE_IMAGE_TAG }} STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} STACK_VERSION=${{ steps.vars.outputs.tag }} + - name: Vulnerability Scan (OSV) + run: | + wget https://github.com/google/osv-scanner/releases/download/v2.3.1/osv-scanner-linux-amd64 -O osv-scanner + chmod +x osv-scanner + osv-scanner scan image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} - name: Login to DockerHub if: steps.vars.outputs.push == 'true' uses: docker/login-action@v3 From caad55ad6c289c91e550239933d40516177b8341 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Wed, 17 Dec 2025 10:38:21 +0000 Subject: [PATCH 117/143] ci: Add OSV scan to built image --- .github/workflows/build-main.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 4a8841f..5ad4fb8 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -218,10 +218,22 @@ jobs: STACK_NAMESPACE=${{ steps.vars.outputs.STACK_NAMESPACE }} STACK_VERSION=${{ steps.vars.outputs.tag }} - name: Vulnerability Scan (OSV) + # The vulnerability scan (using Google's OSV) + # Allowed to fail (we force true) as it's used for information only + # The generated "Common Vulnerability Scoring System (CVSS)"" values + # are interpreted as... + # + # - None: 0.0 (No impact) + # - Low: 0.1–3.9 (Minor risk) + # - Medium: 4.0–6.9 (Moderate risk) + # - High: 7.0–8.9 (Serious risk) + # - Critical: 9.0–10.0 (Grave, severe risk) run: | - wget https://github.com/google/osv-scanner/releases/download/v2.3.1/osv-scanner-linux-amd64 -O osv-scanner + wget https://github.com/google/osv-scanner/releases/latest/download/osv-scanner_linux_amd64 -O osv-scanner chmod +x osv-scanner - osv-scanner scan image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} + ./osv-scanner scan image ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} \ + --format markdown --output scan.md || true + cat scan.md >> $GITHUB_STEP_SUMMARY - name: Login to DockerHub if: steps.vars.outputs.push == 'true' uses: docker/login-action@v3 From 58a78320b308d519d05cab343a00f8e8f657b787 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Wed, 17 Dec 2025 10:40:56 +0000 Subject: [PATCH 118/143] ci: Nobble behaviour tests (broken) --- .github/workflows/build-main.yaml | 39 +++++++++++++++++-------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 5ad4fb8..b538e93 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -244,24 +244,27 @@ jobs: if: steps.vars.outputs.push == 'true' run: docker push ${{ steps.vars.outputs.STACK_NAMESPACE }}/fragalysis-stack:${{ steps.vars.outputs.tag }} - trigger-behaviour-tests: - # Trigger behaviour tests - # (if deploying, but not to production) - needs: build - if: | - needs.build.outputs.push == 'true' && - needs.build.outputs.deploy == 'true' && - needs.build.outputs.production_tag == 'false' - runs-on: ubuntu-latest - steps: - - name: Trigger behaviour tests - uses: informaticsmatters/trigger-ci-action@v1 - with: - ci-owner: xchem - ci-repository: fragalysis-stack-behaviour-tests - ci-name: latest stack test - ci-user: ${{ secrets.STACK_USER }} - ci-user-token: ${{ secrets.STACK_USER_TOKEN }} +# Behaviour tests are too fragile. +# Disabled for now (achristie) +# +# trigger-behaviour-tests: +# # Trigger behaviour tests +# # (if deploying, but not to production) +# needs: build +# if: | +# needs.build.outputs.push == 'true' && +# needs.build.outputs.deploy == 'true' && +# needs.build.outputs.production_tag == 'false' +# runs-on: ubuntu-latest +# steps: +# - name: Trigger behaviour tests +# uses: informaticsmatters/trigger-ci-action@v1 +# with: +# ci-owner: xchem +# ci-repository: fragalysis-stack-behaviour-tests +# ci-name: latest stack test +# ci-user: ${{ secrets.STACK_USER }} +# ci-user-token: ${{ secrets.STACK_USER_TOKEN }} deploy-staging: # A fixed job that deploys to the Fragalysis Staging Kubernetes Namespace From ecff7c62d29d215cc4f4f41127e2d0ba84ee705f Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Thu, 29 Jan 2026 13:29:20 +0000 Subject: [PATCH 119/143] build: Update to fe 2026.01.1 and be 2026.01.1 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index b538e93..8d62752 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2025.10.3 - FE_IMAGE_TAG: 2025.11.1 + BE_IMAGE_TAG: 2026.01.1 + FE_IMAGE_TAG: 2026.01.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From 053fa6b8e0187cb489f3267a3a26cb178d936dfd Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Thu, 12 Feb 2026 12:50:57 +0000 Subject: [PATCH 120/143] build: Use b/e 2026.02.1 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 8d62752..232a5f4 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.01.1 + BE_IMAGE_TAG: 2026.02.1 FE_IMAGE_TAG: 2026.01.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From c4404d236e5270d5ddb594556ceb392305ec7569 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Thu, 12 Feb 2026 14:53:53 +0000 Subject: [PATCH 121/143] ci: Use of trigger-awx-action@v3 --- .github/workflows/build-main.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 232a5f4..d8f4f21 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -292,7 +292,7 @@ jobs: MSG_MINIMAL: true - name: Deploy staging id: deploy_staging - uses: informaticsmatters/trigger-awx-action@v2 + uses: informaticsmatters/trigger-awx-action@v3 with: template: Staging Fragalysis Stack template-host: ${{ secrets.AWX_HOST }} @@ -347,7 +347,7 @@ jobs: MSG_MINIMAL: true - name: Deploy production id: deploy_production - uses: informaticsmatters/trigger-awx-action@v2 + uses: informaticsmatters/trigger-awx-action@v3 with: template: Production Fragalysis Stack template-host: ${{ secrets.AWX_HOST }} @@ -387,7 +387,7 @@ jobs: environment: awx/fragalysis-developer steps: - name: Deploy developer - uses: informaticsmatters/trigger-awx-action@v2 + uses: informaticsmatters/trigger-awx-action@v3 with: template: ${{ secrets.AWX_TEMPLATE_NAME }} template-host: ${{ secrets.AWX_HOST }} From 3ad90c9e0af0bfb6b6d8c8a33ee6d44e2bee9dd6 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Fri, 20 Feb 2026 10:07:53 +0000 Subject: [PATCH 122/143] build: Use of b/e 2026.02.2 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index d8f4f21..b4530e7 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.02.1 + BE_IMAGE_TAG: 2026.02.2 FE_IMAGE_TAG: 2026.01.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 22a6ecf3268365732c7e881591c3c99372afd390 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Thu, 12 Mar 2026 14:40:43 +0000 Subject: [PATCH 123/143] build: Use of B/E 2026.03.1 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index b4530e7..a55c304 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.02.2 + BE_IMAGE_TAG: 2026.03.1 FE_IMAGE_TAG: 2026.01.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 15b9c2e4fff2f61bd669053b01b771ca60150c1c Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Sat, 4 Apr 2026 08:46:59 +0200 Subject: [PATCH 124/143] build: Use of b/e 2026.04.1 and f/e 2026.04.1 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index a55c304..74c07aa 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,8 +99,8 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.03.1 - FE_IMAGE_TAG: 2026.01.1 + BE_IMAGE_TAG: 2026.04.1 + FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From be4c25e9c730dd3b1f2a8c83fb4429b7a4ca3720 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Fri, 10 Apr 2026 20:30:47 +0200 Subject: [PATCH 125/143] fix: Use of b/w 2026.04.2 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 74c07aa..6fec4cc 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.04.1 + BE_IMAGE_TAG: 2026.04.2 FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From c881a56645414f523f0092ddd362626fc5628f35 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Fri, 17 Apr 2026 23:37:08 +0200 Subject: [PATCH 126/143] fix: Fix mesage typos --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 6fec4cc..92a3da4 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -307,7 +307,7 @@ jobs: env: SLACK_WEBHOOK: ${{ env.slack_notify_staging_webhook }} SLACK_TITLE: The STAGING deployment FAILED - SLACK_MESSAGE: Please review the corresponding fragalysis-stack GitHuib Action Log + SLACK_MESSAGE: Please review the corresponding fragalysis-stack GitHub Action Log SLACK_FOOTER: '' MSG_MINIMAL: true - name: Notify staging deployment complete @@ -362,7 +362,7 @@ jobs: env: SLACK_WEBHOOK: ${{ env.slack_notify_production_webhook }} SLACK_TITLE: The PRODUCTION deployment FAILED - SLACK_MESSAGE: Please review the corresponding fragalysis-stack GitHuib Action Log + SLACK_MESSAGE: Please review the corresponding fragalysis-stack GitHub Action Log SLACK_FOOTER: '' MSG_MINIMAL: true - name: Notify production deployment complete From c72b02487a1e71d892e8a406668750f2d3676061 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Wed, 22 Apr 2026 13:26:26 +0200 Subject: [PATCH 127/143] fix: Fix Dockerfile ENV warnings --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index ae5bebc..9b8011e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,14 +37,14 @@ ARG FE_IMAGE_TAG # Set the container ENV to record the origin of the b/e and f/e # (for diagnostic purposes) -ENV BE_NAMESPACE ${BE_NAMESPACE} -ENV BE_IMAGE_TAG ${BE_IMAGE_TAG} -ENV FE_NAMESPACE ${FE_NAMESPACE} -ENV FE_IMAGE_TAG ${FE_IMAGE_TAG} -ENV STACK_NAMESPACE ${STACK_NAMESPACE} -ENV STACK_VERSION ${STACK_VERSION} - -ENV APP_ROOT /code +ENV BE_NAMESPACE=${BE_NAMESPACE} +ENV BE_IMAGE_TAG=${BE_IMAGE_TAG} +ENV FE_NAMESPACE=${FE_NAMESPACE} +ENV FE_IMAGE_TAG=${FE_IMAGE_TAG} +ENV STACK_NAMESPACE=${STACK_NAMESPACE} +ENV STACK_VERSION=${STACK_VERSION} + +ENV APP_ROOT=/code # Copy the frontend code from the frontend container WORKDIR ${APP_ROOT}/frontend From 8415e284966aa7bc9ff4c2d29f3ea2e3637ea79d Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Wed, 22 Apr 2026 13:27:12 +0200 Subject: [PATCH 128/143] build: Default b/e now 2026.04.3 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 92a3da4..156311c 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.04.2 + BE_IMAGE_TAG: 2026.04.3 FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 7a4ffdfb3633af509308c3708f09eec7d2aecb0d Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Thu, 30 Apr 2026 11:02:43 +0200 Subject: [PATCH 129/143] build: Updated default backend to 2026.04.4 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 156311c..a16237d 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.04.3 + BE_IMAGE_TAG: 2026.04.4 FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 842953dfff3d47f9b0a89294e57ac2e43dab9d2e Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Tue, 5 May 2026 16:10:52 +0200 Subject: [PATCH 130/143] build: Use of b/e 2026.05.1 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index a16237d..43b468f 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.04.4 + BE_IMAGE_TAG: 2026.05.1 FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 02f0f93692e1dd7f12ecba263e19d4fe4283270c Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Tue, 5 May 2026 18:50:17 +0200 Subject: [PATCH 131/143] build: Prepare for 2026.05.2 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 43b468f..cdb2c91 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.05.1 + BE_IMAGE_TAG: 2026.05.2 FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From c16a779ed5986600e6c7b122b7824414c6c838c1 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Tue, 5 May 2026 20:16:48 +0200 Subject: [PATCH 132/143] build: Prepare for b/e 2026.05.3 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index cdb2c91..523f1d9 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.05.2 + BE_IMAGE_TAG: 2026.05.3 FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From a583a18f477c1714232c2d11c6e37828557887d5 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Fri, 8 May 2026 11:07:13 +0200 Subject: [PATCH 133/143] build: Prepare for b/e 2026.05.4 (2201) --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 523f1d9..754579f 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -99,7 +99,7 @@ env: # # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.05.3 + BE_IMAGE_TAG: 2026.05.4 FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 6c9c6ab128d089f814e1267753797de8bfdfb022 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Thu, 14 May 2026 15:22:31 +0200 Subject: [PATCH 134/143] fix: Prepare for b/e 2026.05.5 --- .github/workflows/build-main.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 754579f..5f17bc4 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -97,9 +97,8 @@ env: # - BE_IMAGE_TAG # - FE_IMAGE_TAG # - # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.05.4 + BE_IMAGE_TAG: 2026.05.5 FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From f201338c0c1b6a15adbcfeac2502228a1bb9d70b Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Tue, 19 May 2026 15:25:57 +0100 Subject: [PATCH 135/143] build: Prepare for b/e 2026.05.6 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 5f17bc4..fbc2eaa 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -98,7 +98,7 @@ env: # - FE_IMAGE_TAG # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.05.5 + BE_IMAGE_TAG: 2026.05.6 FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 3f3538d66d985f0925a779252d83aa1530911e3a Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Fri, 29 May 2026 14:40:54 +0100 Subject: [PATCH 136/143] feat: New b/e 2026.05.7 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index fbc2eaa..a79d234 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -98,7 +98,7 @@ env: # - FE_IMAGE_TAG # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.05.6 + BE_IMAGE_TAG: 2026.05.7 FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From 0254376d372a2191af61f8c34aae4979ac9ea220 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Mon, 1 Jun 2026 14:17:16 +0100 Subject: [PATCH 137/143] build: Use of b/e 2026.06.1 --- .github/workflows/build-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index a79d234..d0043b2 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -98,7 +98,7 @@ env: # - FE_IMAGE_TAG # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.05.7 + BE_IMAGE_TAG: 2026.06.1 FE_IMAGE_TAG: 2026.04.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem From ac24a449e06e1637ed1482002e38decd4e12eecc Mon Sep 17 00:00:00 2001 From: claude-im Date: Tue, 2 Jun 2026 15:20:24 +0100 Subject: [PATCH 138/143] docs: Add CLAUDE.md and release skill Add CLAUDE.md describing the assembly/release nature of the repo, and a project-level release skill that drives the stack release process from a GitHub release ticket (backend/frontend versions) and auto-generates the YYYY.MM.ITERATION stack tag. Co-Authored-By: Claude Opus 4.8 (1M context) --- .claude/skills/release/SKILL.md | 132 ++++++++++++++++++++++++++++++++ CLAUDE.md | 55 +++++++++++++ 2 files changed, 187 insertions(+) create mode 100644 .claude/skills/release/SKILL.md create mode 100644 CLAUDE.md diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.md new file mode 100644 index 0000000..daa6d4b --- /dev/null +++ b/.claude/skills/release/SKILL.md @@ -0,0 +1,132 @@ +--- +name: release +description: Run the fragalysis-stack release process. Finds the most recent open GitHub ticket whose title begins with "release" (case-insensitive), reads the fragalysis-backend and fragalysis-frontend versions from its body, updates the image tags in the build workflow, commits to master, and tags a stack release. Use when the user asks to "do a release", "cut a release", "run the release process", or invokes /release. +--- + +# Fragalysis stack release + +This repo contains no application code — a release means pointing the stack build at specific +**fragalysis-backend** and **fragalysis-frontend** image tags, committing that change, then tagging +this repo so GitHub Actions builds and deploys the stack. Background: see `CLAUDE.md` ("Releasing"). + +A release ticket drives the process. The ticket body names the backend and frontend versions to use, +each on its own bullet point in a flexible format, e.g. `- backend 2026.06.1` and `- frontend 2026.05.7`. + +This process tags and (via CI/AWX) deploys to **staging** and, for `N.N.N` tags, **production**. It is +outward-facing and hard to reverse, so **confirm with the user before committing, pushing, or tagging.** + +## Step 1 — Find the release ticket + +Find the most recent **open** issue in `xchem/fragalysis-stack` whose title begins with "release" +(case-insensitive). Fetch candidates and pick the newest by `createdAt`: + +```bash +gh issue list --repo xchem/fragalysis-stack --state open \ + --json number,title,body,createdAt --limit 100 +``` + +Filter to titles matching `^\s*release\b` (case-insensitive) and choose the one with the latest +`createdAt`. If none is found, **stop** and tell the user no release ticket exists — do not invent +versions. If you find more than one, report them and confirm which to use. + +## Step 2 — Extract the backend and frontend versions + +From the chosen ticket's body, find the version that follows the word `backend` and the version that +follows the word `frontend` (both case-insensitive). Be format-flexible: the version may be separated +by a space, colon, dash, or "v", and may live in a bullet, table, or sentence. A version is a +dotted-number token like `2026.06.1`. This Python snippet captures the first version token appearing +after each keyword: + +```bash +gh issue view --repo xchem/fragalysis-stack --json body -q .body | python3 -c ' +import re, sys +body = sys.stdin.read() +def find(keyword): + m = re.search(rf"{keyword}\b\D*?(\d+(?:\.\d+)+)", body, re.IGNORECASE) + return m.group(1) if m else None +be, fe = find("backend"), find("frontend") +print(f"BE_IMAGE_TAG={be}") +print(f"FE_IMAGE_TAG={fe}") +' +``` + +If either version is missing or doesn't look like a valid tag, **stop** and ask the user — never guess. +Show both extracted versions to the user and confirm they are correct before changing any files. + +## Step 3 — Generate the stack tag + +The stack tag is generated automatically as `YYYY.MM.ITERATION`, where `YYYY.MM` is the **current** +year and month and `ITERATION` is one greater than the highest iteration already used in tags for this +same year/month (starting at `1` if there are none). For example, in June 2026, if `2026.06.1` already +exists the new tag is `2026.06.2`; if no `2026.06.*` tag exists yet it is `2026.06.1`. + +Compute it from the existing remote tags so nothing local/stale is missed: + +```bash +git ls-remote --tags origin | sed -E 's#.*refs/tags/##; s/\^\{\}$//' | sort -u | python3 -c ' +import sys, datetime, re +prefix = datetime.date.today().strftime("%Y.%m") # e.g. 2026.06 +highest = 0 +for line in sys.stdin: + m = re.fullmatch(rf"{re.escape(prefix)}\.(\d+)", line.strip()) + if m: + highest = max(highest, int(m.group(1))) +print(f"{prefix}.{highest + 1}") +' +``` + +This is a `YYYY.MM.N` tag, so it will deploy to production. Show the generated tag to the user and +confirm before using it. + +## Step 4 — Update the build workflow + +Edit `.github/workflows/build-main.yaml` and set the two values under the top-level `env:` block to the +versions from Step 2: + +```yaml + BE_IMAGE_TAG: + FE_IMAGE_TAG: +``` + +Change only these two lines. Show the diff (`git diff .github/workflows/build-main.yaml`). + +## Step 5 — Commit to master + +Per `CLAUDE.md`, this change is committed directly to `master`. Confirm the working tree is on `master` +and otherwise clean. Use a message matching the existing history style (`git log --oneline -5`), e.g.: + +``` +build: Use of b/e f/e +``` + +After confirming with the user, commit and push: + +```bash +git add .github/workflows/build-main.yaml +git commit -m "build: Use of b/e f/e " +git push origin master +``` + +## Step 6 — Tag the stack release + +After the commit is pushed, create the release/tag (this is what triggers the build + deploy). Confirm +with the user first, then: + +```bash +gh release create --repo xchem/fragalysis-stack \ + --title "" \ + --notes "Stack release using backend and frontend (ticket #)." +``` + +## Step 7 — Report and close out + +- Link the triggered workflow run (`gh run list --repo xchem/fragalysis-stack --limit 3`) so the user + can watch the ~10–20 min build/deploy. +- Ask whether to comment on and/or close the release ticket (#) referencing the new tag. Only do + so if the user agrees. + +## Guardrails + +- Never fabricate versions or a tag — if anything is ambiguous or missing, stop and ask. +- Confirm with the user before each outward-facing action: the commit/push (Step 5) and the tag (Step 6). +- Only the two `*_IMAGE_TAG` lines in the workflow should change. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..477b309 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,55 @@ +## What this repository is + +This repo contains **no application code**. It *assembles* the Fragalysis stack by combining two +externally-built container images, selected by environment variables / build args: + +- [fragalysis-backend](https://github.com/xchem/fragalysis-backend) — Django + RDKit + Celery +- [fragalysis-frontend](https://github.com/xchem/fragalysis-frontend) — pre-compiled web bundles + +The `Dockerfile` is a two-stage build: it pulls the frontend image, then pulls the +backend image and copies the frontend's `/frontend` directory into the backend at +`${APP_ROOT}/frontend` (`/code/frontend`), symlinking the bundles into `/code/static/bundles`. +The container entrypoint and runtime behaviour (`docker-entrypoint.sh`, `launch-stack.sh`) +belong to the **backend** image, not this repo. + +Because there is no source to lint or unit-test here, day-to-day work is: changing image tags, +adjusting Docker/compose configuration, and editing the GitHub Actions workflow. + +## Key build args / image selection + +Set in `Dockerfile` and overridden by `.github/workflows/build-main.yaml`: + +- `BE_NAMESPACE` / `BE_IMAGE_TAG` — which backend image to pull (default namespace `xchem`) +- `FE_NAMESPACE` / `FE_IMAGE_TAG` — which frontend image to pull (default namespace `xchem`) +- `STACK_NAMESPACE` / `STACK_VERSION` — where to publish and what to tag the assembled stack image + +These origins are also baked into the runtime image as `ENV` vars for diagnostics +(visible at the bottom of the Fragalysis menu). + +## Local development + +```bash +docker-compose up -d # launch stack + postgres + neo4j + redis +docker-compose down # tear everything down +``` + +`docker-compose.yml` is the maintained compose file (Postgres 12, neo4j 4.4, Redis 7, plus the `stack` +service built from this `Dockerfile`). It runs Celery eagerly (`CELERY_TASK_ALWAYS_EAGER: True`) and +wires Keycloak (OIDC) and Squonk2 config via environment variables — supply secrets via the shell +environment, never commit them. Persistent data lives under `./data` (gitignored, auto-created). +`docker-compose.dev.yml` is an older/simpler variant; treat `docker-compose.yml` as authoritative. + +## Releasing (this is the core workflow) + +Builds and deployments are driven entirely by GitHub Actions (`build-main.yaml`) and AWX/Kubernetes: + +- **Every push of a tag** builds the stack image and (if `TRIGGER_AWX=yes`) deploys to **staging**. +- **Only tags of the form `N.N.N`** (e.g. `2026.06.1`) additionally deploy to **production**. +- An OSV vulnerability scan runs on every build (informational; allowed to fail). + +**Before cutting a production release you MUST update the backend/frontend tags first**, +then tag: + +1. Create matching releases in fragalysis-frontend and fragalysis-backend (tag format `YYYY.MM.#`). +2. Edit `env.BE_IMAGE_TAG` / `env.FE_IMAGE_TAG` near the top of `.github/workflows/build-main.yaml`, and commit directly to `master`. +3. Create a new release/tag for this repo. Tags need **not** match across the three repos. From e323047c51e3f244004d81873f9c42f94c36d46b Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Tue, 9 Jun 2026 15:59:23 +0100 Subject: [PATCH 139/143] docs(release-skill): ask for release ticket; record release on it - Step 1 now asks the user which ticket represents the release instead of searching for an open "release" issue. - Step 7 comments the stack release on that ticket, does not close it, and adds the fragalysis-stack label. Co-Authored-By: Claude Opus 4.8 (1M context) --- .claude/skills/release/SKILL.md | 34 ++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.md index daa6d4b..5e535a5 100644 --- a/.claude/skills/release/SKILL.md +++ b/.claude/skills/release/SKILL.md @@ -1,6 +1,6 @@ --- name: release -description: Run the fragalysis-stack release process. Finds the most recent open GitHub ticket whose title begins with "release" (case-insensitive), reads the fragalysis-backend and fragalysis-frontend versions from its body, updates the image tags in the build workflow, commits to master, and tags a stack release. Use when the user asks to "do a release", "cut a release", "run the release process", or invokes /release. +description: Run the fragalysis-stack release process. Asks the user which GitHub ticket represents the release, reads the fragalysis-backend and fragalysis-frontend versions from its body, updates the image tags in the build workflow, commits to master, and tags a stack release. Use when the user asks to "do a release", "cut a release", "run the release process", or invokes /release. --- # Fragalysis stack release @@ -15,19 +15,10 @@ each on its own bullet point in a flexible format, e.g. `- backend 2026.06.1` an This process tags and (via CI/AWX) deploys to **staging** and, for `N.N.N` tags, **production**. It is outward-facing and hard to reverse, so **confirm with the user before committing, pushing, or tagging.** -## Step 1 — Find the release ticket +## Step 1 — Identify the release ticket -Find the most recent **open** issue in `xchem/fragalysis-stack` whose title begins with "release" -(case-insensitive). Fetch candidates and pick the newest by `createdAt`: - -```bash -gh issue list --repo xchem/fragalysis-stack --state open \ - --json number,title,body,createdAt --limit 100 -``` - -Filter to titles matching `^\s*release\b` (case-insensitive) and choose the one with the latest -`createdAt`. If none is found, **stop** and tell the user no release ticket exists — do not invent -versions. If you find more than one, report them and confirm which to use. +Ask the user which ticket represents the release — do not search for it. Have them give you the issue +number (in `xchem/fragalysis-stack`). Do not proceed until they have told you which ticket to use. ## Step 2 — Extract the backend and frontend versions @@ -122,8 +113,21 @@ gh release create --repo xchem/fragalysis-stack \ - Link the triggered workflow run (`gh run list --repo xchem/fragalysis-stack --limit 3`) so the user can watch the ~10–20 min build/deploy. -- Ask whether to comment on and/or close the release ticket (#) referencing the new tag. Only do - so if the user agrees. +- Record the release on the ticket the user started from (Step 1). Comment on that issue with a clear, + single line identifying the stack release just made, so anyone reading the ticket can see exactly which + release it produced, e.g.: + + ```bash + gh issue comment --repo xchem/fragalysis-stack \ + --body "Stack release **** created (backend , frontend )." + ``` + +- Do not close the release ticket — tickets on the project board are not closed here. +- Finally, add the `fragalysis-stack` label to that issue to mark it as released: + + ```bash + gh issue edit --repo xchem/fragalysis-stack --add-label fragalysis-stack + ``` ## Guardrails From 14fb6951f859dfd3b41bd2872fd7b3a744e4db21 Mon Sep 17 00:00:00 2001 From: claude-im Date: Mon, 22 Jun 2026 15:59:30 +0100 Subject: [PATCH 140/143] build: Use of b/e 2026.06.2 f/e 2026.06.1 --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index d0043b2..2368f1b 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -98,8 +98,8 @@ env: # - FE_IMAGE_TAG # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.06.1 - FE_IMAGE_TAG: 2026.04.1 + BE_IMAGE_TAG: 2026.06.2 + FE_IMAGE_TAG: 2026.06.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem From c698e32c24f8148658f2f195bb948d94c86f7543 Mon Sep 17 00:00:00 2001 From: "a.b.christie" Date: Mon, 22 Jun 2026 16:45:10 +0100 Subject: [PATCH 141/143] ci: Fixed the skill (looking at the wrong issue board) --- .claude/skills/release/SKILL.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.md index 5e535a5..7fdd622 100644 --- a/.claude/skills/release/SKILL.md +++ b/.claude/skills/release/SKILL.md @@ -9,8 +9,11 @@ This repo contains no application code — a release means pointing the stack bu **fragalysis-backend** and **fragalysis-frontend** image tags, committing that change, then tagging this repo so GitHub Actions builds and deploys the stack. Background: see `CLAUDE.md` ("Releasing"). -A release ticket drives the process. The ticket body names the backend and frontend versions to use, -each on its own bullet point in a flexible format, e.g. `- backend 2026.06.1` and `- frontend 2026.05.7`. +A release ticket drives the process. The ticket is a GitHub issue in **`m2ms/fragalysis-frontend`**, +tracked on the m2ms project board . The number the user gives +is that issue's number in `m2ms/fragalysis-frontend` (it is **not** an `xchem/fragalysis-stack` issue). +The ticket body names the backend and frontend versions to use, each on its own line in a flexible +format, e.g. `## Backend 2026.06.1` and `## Frontend 2026.06.2`. This process tags and (via CI/AWX) deploys to **staging** and, for `N.N.N` tags, **production**. It is outward-facing and hard to reverse, so **confirm with the user before committing, pushing, or tagging.** @@ -18,7 +21,8 @@ outward-facing and hard to reverse, so **confirm with the user before committing ## Step 1 — Identify the release ticket Ask the user which ticket represents the release — do not search for it. Have them give you the issue -number (in `xchem/fragalysis-stack`). Do not proceed until they have told you which ticket to use. +number (an issue in `m2ms/fragalysis-frontend`, tracked on the m2ms project board +). Do not proceed until they have told you which ticket to use. ## Step 2 — Extract the backend and frontend versions @@ -29,7 +33,7 @@ dotted-number token like `2026.06.1`. This Python snippet captures the first ver after each keyword: ```bash -gh issue view --repo xchem/fragalysis-stack --json body -q .body | python3 -c ' +gh issue view --repo m2ms/fragalysis-frontend --json body -q .body | python3 -c ' import re, sys body = sys.stdin.read() def find(keyword): @@ -118,7 +122,7 @@ gh release create --repo xchem/fragalysis-stack \ release it produced, e.g.: ```bash - gh issue comment --repo xchem/fragalysis-stack \ + gh issue comment --repo m2ms/fragalysis-frontend \ --body "Stack release **** created (backend , frontend )." ``` @@ -126,7 +130,7 @@ gh release create --repo xchem/fragalysis-stack \ - Finally, add the `fragalysis-stack` label to that issue to mark it as released: ```bash - gh issue edit --repo xchem/fragalysis-stack --add-label fragalysis-stack + gh issue edit --repo m2ms/fragalysis-frontend --add-label fragalysis-stack ``` ## Guardrails From e3108d01a0a7f9e6ed89d082b19b88a7cca0bdb6 Mon Sep 17 00:00:00 2001 From: claude-im Date: Thu, 23 Jul 2026 14:35:57 +0100 Subject: [PATCH 142/143] chore: move release skill to fragalysis-skills plugin The release skill now lives in InformaticsMatters/claude-skills as release-the-stack. Co-Authored-By: Claude Opus 4.8 --- .claude/skills/release/SKILL.md | 140 -------------------------------- 1 file changed, 140 deletions(-) delete mode 100644 .claude/skills/release/SKILL.md diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.md deleted file mode 100644 index 7fdd622..0000000 --- a/.claude/skills/release/SKILL.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -name: release -description: Run the fragalysis-stack release process. Asks the user which GitHub ticket represents the release, reads the fragalysis-backend and fragalysis-frontend versions from its body, updates the image tags in the build workflow, commits to master, and tags a stack release. Use when the user asks to "do a release", "cut a release", "run the release process", or invokes /release. ---- - -# Fragalysis stack release - -This repo contains no application code — a release means pointing the stack build at specific -**fragalysis-backend** and **fragalysis-frontend** image tags, committing that change, then tagging -this repo so GitHub Actions builds and deploys the stack. Background: see `CLAUDE.md` ("Releasing"). - -A release ticket drives the process. The ticket is a GitHub issue in **`m2ms/fragalysis-frontend`**, -tracked on the m2ms project board . The number the user gives -is that issue's number in `m2ms/fragalysis-frontend` (it is **not** an `xchem/fragalysis-stack` issue). -The ticket body names the backend and frontend versions to use, each on its own line in a flexible -format, e.g. `## Backend 2026.06.1` and `## Frontend 2026.06.2`. - -This process tags and (via CI/AWX) deploys to **staging** and, for `N.N.N` tags, **production**. It is -outward-facing and hard to reverse, so **confirm with the user before committing, pushing, or tagging.** - -## Step 1 — Identify the release ticket - -Ask the user which ticket represents the release — do not search for it. Have them give you the issue -number (an issue in `m2ms/fragalysis-frontend`, tracked on the m2ms project board -). Do not proceed until they have told you which ticket to use. - -## Step 2 — Extract the backend and frontend versions - -From the chosen ticket's body, find the version that follows the word `backend` and the version that -follows the word `frontend` (both case-insensitive). Be format-flexible: the version may be separated -by a space, colon, dash, or "v", and may live in a bullet, table, or sentence. A version is a -dotted-number token like `2026.06.1`. This Python snippet captures the first version token appearing -after each keyword: - -```bash -gh issue view --repo m2ms/fragalysis-frontend --json body -q .body | python3 -c ' -import re, sys -body = sys.stdin.read() -def find(keyword): - m = re.search(rf"{keyword}\b\D*?(\d+(?:\.\d+)+)", body, re.IGNORECASE) - return m.group(1) if m else None -be, fe = find("backend"), find("frontend") -print(f"BE_IMAGE_TAG={be}") -print(f"FE_IMAGE_TAG={fe}") -' -``` - -If either version is missing or doesn't look like a valid tag, **stop** and ask the user — never guess. -Show both extracted versions to the user and confirm they are correct before changing any files. - -## Step 3 — Generate the stack tag - -The stack tag is generated automatically as `YYYY.MM.ITERATION`, where `YYYY.MM` is the **current** -year and month and `ITERATION` is one greater than the highest iteration already used in tags for this -same year/month (starting at `1` if there are none). For example, in June 2026, if `2026.06.1` already -exists the new tag is `2026.06.2`; if no `2026.06.*` tag exists yet it is `2026.06.1`. - -Compute it from the existing remote tags so nothing local/stale is missed: - -```bash -git ls-remote --tags origin | sed -E 's#.*refs/tags/##; s/\^\{\}$//' | sort -u | python3 -c ' -import sys, datetime, re -prefix = datetime.date.today().strftime("%Y.%m") # e.g. 2026.06 -highest = 0 -for line in sys.stdin: - m = re.fullmatch(rf"{re.escape(prefix)}\.(\d+)", line.strip()) - if m: - highest = max(highest, int(m.group(1))) -print(f"{prefix}.{highest + 1}") -' -``` - -This is a `YYYY.MM.N` tag, so it will deploy to production. Show the generated tag to the user and -confirm before using it. - -## Step 4 — Update the build workflow - -Edit `.github/workflows/build-main.yaml` and set the two values under the top-level `env:` block to the -versions from Step 2: - -```yaml - BE_IMAGE_TAG: - FE_IMAGE_TAG: -``` - -Change only these two lines. Show the diff (`git diff .github/workflows/build-main.yaml`). - -## Step 5 — Commit to master - -Per `CLAUDE.md`, this change is committed directly to `master`. Confirm the working tree is on `master` -and otherwise clean. Use a message matching the existing history style (`git log --oneline -5`), e.g.: - -``` -build: Use of b/e f/e -``` - -After confirming with the user, commit and push: - -```bash -git add .github/workflows/build-main.yaml -git commit -m "build: Use of b/e f/e " -git push origin master -``` - -## Step 6 — Tag the stack release - -After the commit is pushed, create the release/tag (this is what triggers the build + deploy). Confirm -with the user first, then: - -```bash -gh release create --repo xchem/fragalysis-stack \ - --title "" \ - --notes "Stack release using backend and frontend (ticket #)." -``` - -## Step 7 — Report and close out - -- Link the triggered workflow run (`gh run list --repo xchem/fragalysis-stack --limit 3`) so the user - can watch the ~10–20 min build/deploy. -- Record the release on the ticket the user started from (Step 1). Comment on that issue with a clear, - single line identifying the stack release just made, so anyone reading the ticket can see exactly which - release it produced, e.g.: - - ```bash - gh issue comment --repo m2ms/fragalysis-frontend \ - --body "Stack release **** created (backend , frontend )." - ``` - -- Do not close the release ticket — tickets on the project board are not closed here. -- Finally, add the `fragalysis-stack` label to that issue to mark it as released: - - ```bash - gh issue edit --repo m2ms/fragalysis-frontend --add-label fragalysis-stack - ``` - -## Guardrails - -- Never fabricate versions or a tag — if anything is ambiguous or missing, stop and ask. -- Confirm with the user before each outward-facing action: the commit/push (Step 5) and the tag (Step 6). -- Only the two `*_IMAGE_TAG` lines in the workflow should change. From 8ea160b16b164c16097fda34eb8d222c979749c4 Mon Sep 17 00:00:00 2001 From: claude-im Date: Thu, 23 Jul 2026 14:55:04 +0100 Subject: [PATCH 143/143] build: Use of b/e 2026.07.1 f/e 2026.07.1 (#131) --- .github/workflows/build-main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 2368f1b..b575d69 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -98,8 +98,8 @@ env: # - FE_IMAGE_TAG # # Commit the changes and then tag or make a release from the stack repository. - BE_IMAGE_TAG: 2026.06.2 - FE_IMAGE_TAG: 2026.06.1 + BE_IMAGE_TAG: 2026.07.1 + FE_IMAGE_TAG: 2026.07.1 BE_NAMESPACE: xchem FE_NAMESPACE: xchem STACK_NAMESPACE: xchem