forked from gchq/gaffer-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:gchq/gaffer-docker into gchqgh-34-…
…add-operation-declarations # Conflicts: # kubernetes/gaffer/templates/api/deployment.yaml # kubernetes/gaffer/values.yaml
- Loading branch information
Showing
136 changed files
with
2,820 additions
and
1,127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
releasenotes: | ||
sections: | ||
- title: "Headliners" | ||
emoji: ":star:" | ||
labels: [ "headliner" ] | ||
- title: "New Features" | ||
emoji: ":sparkles:" | ||
labels: [ "enhancement" ] | ||
- title: "Bugs Fixed" | ||
emoji: ":beetle:" | ||
labels: [ "bug" ] | ||
- title: "Documentation" | ||
emoji: ":book:" | ||
labels: "documentation" | ||
- title: "Automation" | ||
emoji: ":robot:" | ||
labels: [ "automation" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Continuous Integration | ||
|
||
on: [ pull_request ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Kubernetes | ||
run: ./cd/before_install.sh | ||
|
||
- name: Build Images | ||
run: ./cd/build_images.sh | ||
|
||
- name: Install subcharts | ||
run: ./cd/install_dependencies.sh | ||
|
||
- name: Lint charts | ||
run: ./cd/lint_charts.sh | ||
|
||
- name: Deploy to Kubernetes | ||
run: ./cd/deploy_to_kind.sh | ||
|
||
- name: Run Tests | ||
run: helm test gaffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Integration Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 9 * * 1,4" | ||
jobs: | ||
Build: | ||
runs-on: ubuntu-latest | ||
env: | ||
GAFFER_VERSION: develop | ||
GAFFER_TOOLS_VERSION: develop | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install KinD | ||
run: ./cd/before_install.sh | ||
|
||
# See issue #153 for why Gaffer image is not using docker-compose | ||
- name: Build images | ||
run: | | ||
docker-compose --project-directory ./docker/gaffer-ui/ -f ./docker/gaffer-ui/docker-compose.yaml build --build-arg GAFFER_TOOLS_VERSION=$GAFFER_TOOLS_VERSION | ||
docker build -t gchq/gaffer:$GAFFER_VERSION --build-arg GAFFER_VERSION=$GAFFER_VERSION ./docker/gaffer | ||
docker build -t gchq/gaffer-integration-tests:$GAFFER_VERSION ./docker/gaffer-integration-tests | ||
- name: Install Helm charts | ||
run: ./cd/install_dependencies.sh | ||
|
||
- name: Start KinD | ||
run: | | ||
kind create cluster --config ./cd/kind.yaml | ||
kind load docker-image gchq/gaffer:$GAFFER_VERSION | ||
kind load docker-image gchq/gaffer-integration-tests:$GAFFER_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 \ | ||
--set accumulo.image.tag=develop | ||
- name: Run Integration Tests | ||
run: helm test gaffer --timeout=40m | ||
|
||
- name: Send success message to ms teams | ||
if: ${{ success()}} | ||
uses: fjogeleit/http-request-action@master | ||
with: | ||
url: ${{ secrets.WORKFLOW_URL}} | ||
method: 'POST' | ||
data: '{"@context": "https://schema.org/extensions","@type": "MessageCard","title": "GitHub Actions Message","text": "Gaffer succesfully deployed and Integration Tests passing \n\n Click [here](https://github.com/gchq/gaffer-docker/actions) for workflow overview and logs"}' | ||
|
||
- name: Print logs from Integration tests | ||
if: ${{ failure() }} | ||
run: kubectl logs pods/gaffer-accumulo-integration-tests | ||
|
||
- name: Send failure message to ms teams | ||
if: ${{ failure()}} | ||
uses: fjogeleit/http-request-action@master | ||
with: | ||
url: ${{ secrets.WORKFLOW_URL}} | ||
method: 'POST' | ||
data: '{"@context": "https://schema.org/extensions","@type": "MessageCard","title": "GitHub Actions Message","text": "Gaffer Integration Tests Unsuccessful \n\n Click [here](https://github.com/gchq/gaffer-docker/actions) for workflow overview and logs"}' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: 'Issue Links' | ||
on: | ||
pull_request: | ||
types: [opened] | ||
|
||
jobs: | ||
issue-links: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: tkt-actions/add-issue-links@v1.4.0 | ||
with: | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' | ||
branch-prefix: 'gh-' | ||
link-style: 'body' | ||
resolve: 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
name: Release | ||
|
||
on: | ||
milestone: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
create-git-tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: develop | ||
token: ${{ secrets.ADMIN_GITHUB_TOKEN }} | ||
|
||
- name: Set up Github credentials | ||
run: | | ||
git config user.name Gaffer | ||
git config user.email github-actions@github.com | ||
- name: Set version | ||
run: echo "RELEASE_VERSION=$(echo ${{ github.event.milestone.title }} | cut -c 2-)" >> $GITHUB_ENV | ||
|
||
- name: Update version | ||
run: ./cd/update_app_version.sh ${RELEASE_VERSION} | ||
|
||
- name: Push changes | ||
run: | | ||
git commit -a -m "Release v${RELEASE_VERSION}" | ||
git tag v${RELEASE_VERSION} | ||
git push origin --tags | ||
git push | ||
update-branches: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
branch: | ||
- master | ||
- gh-pages | ||
needs: | ||
- create-git-tag | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ matrix.branch }} | ||
token: ${{ secrets.ADMIN_GITHUB_TOKEN }} | ||
|
||
- name: Set up Github credentials | ||
run: | | ||
git config user.name Gaffer | ||
git config user.email github-actions@github.com | ||
- name: Update branch | ||
run: | | ||
git remote set-branches --add origin develop | ||
git pull | ||
git merge origin/develop --strategy recursive --strategy-option theirs --allow-unrelated-histories | ||
- name: Push changes | ||
run: git push | ||
|
||
publish-images-to-dockerhub: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- create-git-tag | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: develop | ||
|
||
- name: Build images | ||
run: ./cd/build_images.sh | ||
|
||
- name: Set version | ||
run: echo "APP_VERSION=$(echo ${{ github.event.milestone.title }} | cut -c 2-)" >> $GITHUB_ENV | ||
|
||
- name: Publish images | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
run: ./cd/publish_images.sh | ||
|
||
create-release-notes: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- create-git-tag | ||
outputs: | ||
release_upload_url: ${{ steps.upload_notes.outputs.upload_url }} | ||
steps: | ||
- name: Checkout develop | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: develop | ||
|
||
- name: Create Release Notes | ||
id: create_release_notes | ||
uses: docker://decathlon/release-notes-generator-action:2.1.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set version | ||
run: echo "RELEASE_VERSION=$(echo ${{ github.event.milestone.title }} | cut -c 2-)" >> $GITHUB_ENV | ||
|
||
- name: Upload notes | ||
id: upload_notes | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ env.RELEASE_VERSION }} | ||
release_name: Gaffer Docker ${{ env.RELEASE_VERSION }} | ||
body_path: release_file.md | ||
|
||
upload-release-artifacts: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- create-release-notes | ||
strategy: | ||
matrix: | ||
chart: | ||
- hdfs | ||
- accumulo | ||
- gaffer | ||
- gaffer-road-traffic | ||
steps: | ||
- name: Checkout develop | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: develop | ||
|
||
- name: Install helm | ||
run: ./cd/before_install.sh | ||
|
||
- name: Install dependencies | ||
run: ./cd/install_dependencies.sh | ||
|
||
- name: Create Asset | ||
env: | ||
chart: ${{ matrix.chart }} | ||
run: | | ||
helm package "kubernetes/${chart}" | ||
filename=$(ls | grep ${chart}-[0-9]*.[0-9]*.[0-9]*.tgz) | ||
echo "ASSET_FILENAME=${filename}" >> $GITHUB_ENV | ||
- name: Upload chart artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.chart }} | ||
path: ${{ env.ASSET_FILENAME }} | ||
retention-days: 1 | ||
|
||
- name: Upload Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create-release-notes.outputs.release_upload_url }} | ||
asset_path: ${{ env.ASSET_FILENAME }} | ||
asset_name: ${{ env.ASSET_FILENAME }} | ||
asset_content_type: application/zip | ||
|
||
update-helm-repo: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- upload-release-artifacts | ||
steps: | ||
- name: Checkout gh-pages | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: gh-pages | ||
token: ${{ secrets.ADMIN_GITHUB_TOKEN }} | ||
|
||
- name: Set up Github credentials | ||
run: | | ||
git config user.name Gaffer | ||
git config user.email github-actions@github.com | ||
- name: Install helm | ||
run: ./cd/before_install.sh | ||
|
||
- name: Download packaged charts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: artifacts | ||
|
||
- name: Update repo | ||
run: | | ||
mv artifacts/*/*.tgz . | ||
helm repo index . --url "https://github.com/gchq/gaffer-docker/releases/download/${{ github.event.milestone.title }}" --merge index.yaml | ||
sed -i'' -e 's|file://.*|https://gchq.github.io/gaffer-docker|g' index.yaml | ||
rm *.tgz | ||
rm -r artifacts | ||
git commit -am "Updated index.yaml" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.