Skip to content

Commit 49cfe44

Browse files
Merge pull request #1406 from ral-facilities/release/v2.0.0
Release v2.0.0
2 parents 7acec9f + a779359 commit 49cfe44

File tree

131 files changed

+25294
-21643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+25294
-21643
lines changed

.dockerignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/.github
2+
/.husky
3+
/build
4+
/coverage
5+
/cypress
6+
/demos
7+
**/node_modules
8+
.gitignore
9+
.prettierrc
10+
codecov.yml
11+
CODEOWNERS
12+
cypress.json
13+
Jenkinsfile
14+
LICENSE.md
15+
README.md
16+
Dockerfile

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports = {
1010
'react-app',
1111
'plugin:react/recommended',
1212
'plugin:@typescript-eslint/recommended',
13+
'plugin:@typescript-eslint/stylistic',
1314
'prettier',
1415
'plugin:cypress/recommended',
1516
],

.github/dependabot.yml

Lines changed: 0 additions & 143 deletions
This file was deleted.

.github/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
changelog:
2+
categories:
3+
- title: Features
4+
labels:
5+
- '*'
6+
exclude:
7+
labels:
8+
- dependencies
9+
- title: Dependencies
10+
labels:
11+
- dependencies

.github/workflows/ci-build.yml

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CI Build
22
on:
33
pull_request:
4-
# By default, the pull_request event type is not triggered when a PR is merged into main
4+
# By default, the pull_request event type is not triggered when a PR is merged into main or develop
55
push:
66
branches:
77
- main
@@ -13,35 +13,57 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout repo
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
1717
- name: Setup Node.js
18-
uses: actions/setup-node@v1
18+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
1919
with:
20-
node-version: '14.x'
21-
# Cache yarn dependencies/ restore the cached dependencies during future workflows
22-
- name: Get yarn cache directory path
23-
id: yarn-cache-dir-path
24-
run: echo "::set-output name=dir::$(yarn cache dir)"
25-
- name: Cache yarn dependencies
26-
uses: actions/cache@v2
27-
id: yarn-cache
28-
with:
29-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
30-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31-
restore-keys: |
32-
${{ runner.os }}-yarn-
20+
node-version: 20
21+
cache: 'yarn'
3322
- name: Install dependencies
3423
# Ubuntu 16+ does not install libgconf-2-4 by default, so we need to install it ourselves (for Cypress)
3524
run: |
36-
npm config set scripts-prepend-node-path true
3725
sudo apt-get install libgconf-2-4
38-
yarn --frozen-lockfile
26+
yarn --immutable
3927
- name: Run linting
4028
run: yarn lint:js
4129
- name: Run unit tests
4230
run: yarn test
4331
- name: Upload unit test coverage
4432
if: success()
45-
uses: codecov/codecov-action@v1
33+
uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4
34+
with:
35+
token: ${{ secrets.CODECOV_TOKEN }}
36+
fail_ci_if_error: true
4637
- name: Run e2e tests
4738
run: yarn e2e
39+
40+
docker:
41+
# This job triggers only if all the other jobs succeed. It builds the Docker image and if successful,
42+
# it pushes it to Harbor.
43+
needs: [test]
44+
name: Docker
45+
runs-on: ubuntu-20.04
46+
steps:
47+
- name: Checkout repo
48+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
49+
50+
- name: Login to Harbor
51+
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
52+
with:
53+
registry: ${{ secrets.HARBOR_URL }}
54+
username: ${{ secrets.HARBOR_USERNAME }}
55+
password: ${{ secrets.HARBOR_TOKEN }}
56+
57+
- name: Extract metadata (tags, labels) for Docker
58+
id: meta
59+
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4.6.0
60+
with:
61+
images: ${{ secrets.HARBOR_URL }}/scigateway
62+
63+
- name: Build and push Docker image to Harbor
64+
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
65+
with:
66+
context: .
67+
push: true
68+
tags: ${{ steps.meta.outputs.tags }}
69+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release-build.yml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
branches:
55
- main
66
- develop
7-
tags: '*'
7+
tags:
8+
- '*'
89

910
jobs:
1011
build:
@@ -13,33 +14,19 @@ jobs:
1314

1415
steps:
1516
- name: Checkout repo
16-
uses: actions/checkout@v2
17+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
1718

1819
- name: Setup Node.js
19-
uses: actions/setup-node@v1
20+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
2021
with:
21-
node-version: '14.x'
22-
23-
# Cache yarn dependencies/ restore the cached dependencies during future workflows
24-
- name: Get yarn cache directory path
25-
id: yarn-cache-dir-path
26-
run: echo "::set-output name=dir::$(yarn cache dir)"
27-
28-
- name: Cache yarn dependencies
29-
uses: actions/cache@v2
30-
id: yarn-cache
31-
with:
32-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
33-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
34-
restore-keys: |
35-
${{ runner.os }}-yarn-
22+
node-version: 20
23+
cache: 'yarn'
3624

3725
- name: Install dependencies
3826
# Ubuntu 16+ does not install libgconf-2-4 by default, so we need to install it ourselves (for Cypress)
3927
run: |
40-
npm config set scripts-prepend-node-path true
4128
sudo apt-get install libgconf-2-4
42-
yarn --frozen-lockfile
29+
yarn --immutable
4330
4431
- name: Build
4532
run: yarn build
@@ -62,19 +49,20 @@ jobs:
6249
tar -czf scigateway-$TAG_NAME.tar.gz scigateway-$TAG_NAME
6350
6451
- name: Update snapshot tag
65-
uses: richardsimko/update-tag@v1
52+
uses: richardsimko/update-tag@e173a8ef8f54ab526a91dad6139a25efed62424c # v1
6653
with:
6754
tag_name: ${{ env.TAG_NAME }}
6855
env:
6956
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7057
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
7158

7259
- name: Create/update release
73-
uses: johnwbyrd/update-release@v1.0.0
60+
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
7461
with:
7562
token: ${{ secrets.GITHUB_TOKEN }}
7663
files: ./scigateway-${{ env.TAG_NAME }}.tar.gz
77-
release: Release ${{ env.TAG_NAME }}
78-
tag: ${{ env.TAG_NAME }}
64+
name: ${{ env.TAG_NAME }}
65+
tag_name: ${{ env.TAG_NAME }}
7966
prerelease: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
8067
draft: false
68+
generate_release_notes: true

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
/.pnp
66
.pnp.js
77

8+
# yarn 2
9+
.pnp.*
10+
.yarn/*
11+
!.yarn/patches
12+
!.yarn/plugins
13+
!.yarn/releases
14+
!.yarn/sdks
15+
!.yarn/versions
16+
817
# testing
918
/coverage
1019

@@ -22,4 +31,5 @@ npm-debug.log*
2231
yarn-debug.log*
2332
yarn-error.log*
2433

25-
public/settings.json
34+
public/settings.json
35+
public/*.js

0 commit comments

Comments
 (0)