Skip to content

Commit

Permalink
Merge branch 'release/2.1.0' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 19, 2024
2 parents e34d007 + 53cbf18 commit ebacbc5
Show file tree
Hide file tree
Showing 90 changed files with 1,464 additions and 1,221 deletions.
19 changes: 18 additions & 1 deletion .github/release-notes.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
# Copyright 2020-2023 Crown Copyright
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

releasenotes:
sections:
- title: "Headliners"
emoji: ":star:"
labels: [ "headliner" ]
- title: "New Features"
emoji: ":gift:"
labels: [ "feature" ]
- title: "Enhancements"
emoji: ":sparkles:"
labels: [ "enhancement" ]
- title: "Bugs Fixed"
Expand All @@ -14,4 +31,4 @@ releasenotes:
labels: "documentation"
- title: "Automation"
emoji: ":robot:"
labels: [ "automation" ]
labels: [ "automation" ]
14 changes: 9 additions & 5 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2023 Crown Copyright
# Copyright 2020-2024 Crown Copyright
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,13 +27,17 @@ jobs:
steps:

- name: Maximize build space
uses: easimon/maximize-build-space@v4
uses: easimon/maximize-build-space@v10
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
swap-size-mb: 1024
overprovision-lvm: 'true'

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -54,8 +58,8 @@ jobs:
run: ./cd/lint_charts.sh

- name: Deploy to Kubernetes
run: ./cd/deploy_to_kind.sh
run: ./cd/deploy_to_kind.sh ./docker/accumulo2.env

- name: Run gaffer-road-traffic Tests
run: helm test gaffer || (kubectl get po && kubectl describe po && kubectl logs -l app.kubernetes.io/component=test --tail=-1 && df -h && false)

Expand Down
25 changes: 4 additions & 21 deletions .github/workflows/create-hotfix-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout master
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: master
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
Expand All @@ -46,29 +46,12 @@ jobs:
if: ${{ !github.event.inputs.version }}
run: echo "CURRENT_VERSION=$(echo ${{ steps.get-latest-tag.outputs.tag }} | sed 's/^v//')" >> $GITHUB_ENV

- name: Bump latest tag variable
- name: Bump latest tag variable version
if: ${{ !github.event.inputs.version }}
uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ env.CURRENT_VERSION }}
level: patch

- name: Set version automatically
if: ${{ !github.event.inputs.version }}
run: echo "RELEASE_VERSION=$(echo ${{ steps.bump-semver.outputs.new_version }} )" >> $GITHUB_ENV
run: echo "RELEASE_VERSION=$(echo ${{ env.CURRENT_VERSION }} | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)/echo \1.\2.$((\3+1))/' | sh)" >> $GITHUB_ENV

- name: Verify version regex
uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ env.RELEASE_VERSION }}
# Ensure version doesn't end in .0
regex: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.([1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'

- name: Fail if incorrect version
if: ${{ !steps.regex-match.outputs.match }}
run: exit 1
run: echo ${{ env.RELEASE_VERSION }} | grep -E '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'

- name: Set hotfix branch
run: echo "BRANCH_NAME=$(echo hotfix/${{ env.RELEASE_VERSION }} )" >> $GITHUB_ENV
Expand Down
25 changes: 4 additions & 21 deletions .github/workflows/create-release-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout develop
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
Expand All @@ -46,29 +46,12 @@ jobs:
if: ${{ !github.event.inputs.version }}
run: echo "CURRENT_VERSION=$(echo ${{ steps.get-latest-tag.outputs.tag }} | sed 's/^v//')" >> $GITHUB_ENV

- name: Bump latest tag variable
- name: Bump latest tag variable version
if: ${{ !github.event.inputs.version }}
uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ env.CURRENT_VERSION }}
level: minor

- name: Set version automatically
if: ${{ !github.event.inputs.version }}
run: echo "RELEASE_VERSION=$(echo ${{ steps.bump-semver.outputs.new_version }} )" >> $GITHUB_ENV
run: echo "RELEASE_VERSION=$(echo ${{ env.CURRENT_VERSION }} | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)/echo \1.$((\2+1)).0/' | sh)" >> $GITHUB_ENV

- name: Verify version regex
uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ env.RELEASE_VERSION }}
# Ensure valid semver version
regex: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'

- name: Fail if incorrect version
if: ${{ !steps.regex-match.outputs.match }}
run: exit 1
run: echo ${{ env.RELEASE_VERSION }} | grep -E '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'

- name: Set release branch
run: echo "BRANCH_NAME=$(echo release/${{ env.RELEASE_VERSION }} )" >> $GITHUB_ENV
Expand Down
33 changes: 6 additions & 27 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,14 @@ jobs:
runs-on: ubuntu-latest
env:
GAFFER_VERSION: develop
steps:
- uses: actions/checkout@v3
GAFFER_TESTER_VERSION: develop
steps:
- uses: actions/checkout@v4

- name: Build images
run: |
source ./docker/accumulo/.env
docker compose --project-directory ./docker/accumulo/ -f ./docker/accumulo/docker-compose.yaml build
docker compose --project-directory ./docker/gaffer/ -f ./docker/gaffer/docker-compose.yaml build
docker compose --project-directory ./docker/gaffer-integration-tests/ -f ./docker/gaffer-integration-tests/docker-compose.yaml build
- name: Install Helm charts
run: ./cd/install_dependencies.sh

- name: Start KinD
run: |
source ./docker/accumulo/.env
kind create cluster --config ./cd/kind.yaml --image kindest/node:v1.24.4
kind load docker-image gchq/hdfs:$HADOOP_VERSION
kind load docker-image gchq/gaffer:$GAFFER_VERSION-accumulo-$ACCUMULO_VERSION
kind load docker-image gchq/gaffer-rest:$GAFFER_VERSION-accumulo-$ACCUMULO_VERSION
kind load docker-image gchq/gaffer-integration-tests:$GAFFER_VERSION-accumulo-$ACCUMULO_VERSION
- name: Deploy Gaffer
run: |
helm install gaffer ./kubernetes/gaffer --timeout=6m -f ./kubernetes/gaffer/integration-tests.yaml \
--set accumulo.hdfs.config.hdfsSite."dfs\.namenode\.datanode\.registration\.ip-hostname-check"=false
- name: Run Integration Tests
run: helm test gaffer --timeout=40m
run: |
cd docker/gaffer-integration-tests/
docker compose up --exit-code-from gaffer-integration-tests
- name: Send success message to ms teams
if: ${{ success()}}
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/link-issue.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2020-2023 Crown Copyright
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'Issue Links'
on:
pull_request:
Expand All @@ -7,7 +21,7 @@ jobs:
issue-links:
runs-on: ubuntu-latest
steps:
- uses: tkt-actions/add-issue-links@v1.6.0
- uses: tkt-actions/add-issue-links@v1.8.2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
branch-prefix: 'gh-'
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout master
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: master
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
Expand All @@ -47,7 +47,7 @@ jobs:

- name: Output branch name
id: branch
run: echo "::set-output name=branch_name::$BRANCH_NAME"
run: echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT

- name: Fail if no branch found
if: ${{ !env.BRANCH_NAME }}
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
- create-release-tag

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
Expand All @@ -101,7 +101,7 @@ jobs:
- update-branches

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: develop

Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
release_upload_url: ${{ steps.upload_notes.outputs.upload_url }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: develop

Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
- gaffer-jhub

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: develop

Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:

steps:
- name: Checkout gh-pages
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: gh-pages
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2023 Crown Copyright
# Copyright 2020-2024 Crown Copyright
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,3 +21,4 @@
**/.DS_Store
kubernetes/*/Chart.lock
kubernetes/*/charts/
target/
33 changes: 0 additions & 33 deletions CONTRIBUTING.md

This file was deleted.

28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
Gaffer Docker
================
# Gaffer Docker

This repo contains the code needed to run Gaffer using Docker or Kubernetes.
This repo contains the code needed to run Gaffer using Docker or Kubernetes.
There are two main sub-folders, 'docker' and 'kubernetes' which contain the project files you need for starting Gaffer using those services.

# Running Gaffer Using Docker
For information on how to run Gaffer using Docker containers, please see the README in the docker directory: [Gaffer Docker README](docker/README.md)

For information on how to run Gaffer using Docker containers, please see the documentation: [Gaffer Docker Docs](https://gchq.github.io/gaffer-doc/latest/dev/docker/)

# Running Gaffer Using Kubernetes
For information on how to run Gaffer using Kubernetes, please see the README in the kubernetes directory: [Kubernetes README](kubernetes/README.md)

For information on how to run Gaffer using Kubernetes, please see the documentation: [Gaffer Kubernetes Docs](https://gchq.github.io/gaffer-doc/latest/dev/kubernetes-guide/kubernetes/)

# Versioning

Each of our images which is released will be tagged with the version of the software they represent. Every release,
we update the `latest` tag for each image and add a new release which has the corresponding version tag.

If we release Gaffer version 2.1.2, the following images would be uploaded:

* gchq/gaffer:latest
* gchq/gaffer:2
* gchq/gaffer:2.1
* gchq/gaffer:2.1.2
* gchq/gaffer:2.1.2-accumulo-2.0.1
- gchq/gaffer:latest
- gchq/gaffer:2
- gchq/gaffer:2.1
- gchq/gaffer:2.1.2
- gchq/gaffer:2.1.2-accumulo-2.0.1

We maintain mutable versions of latest, as well as the major, minor and bugfix versions of Gaffer. For reproducibility
make sure to use the full version in your build metadata. For `gaffer`/`gaffer-rest` images, we also create a tag including the
Expand All @@ -30,7 +32,9 @@ are not published but can be build locally if required.
The release process is automated by GitHub actions.

# Known Compatible Docker Versions
* 20.10.23

- 20.10.23

# Contributing
If you would like to make a Contribution, we have all the details for doing that [here](CONTRIBUTING.md)

We welcome contributions to this project. Detailed information on our ways of working can be found in our [developer docs](https://gchq.github.io/gaffer-doc/latest/dev/ways-of-working/).
Loading

0 comments on commit ebacbc5

Please sign in to comment.