Skip to content

Commit bbb8d70

Browse files
committed
Merge branch 'main' of github.com:wwelling/dspace-angular into 1422-deploy-time-config
2 parents 2bf880b + 3e11162 commit bbb8d70

File tree

22 files changed

+258
-37
lines changed

22 files changed

+258
-37
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929
steps:
3030
# https://github.com/actions/checkout
3131
- name: Checkout codebase
32-
uses: actions/checkout@v1
32+
uses: actions/checkout@v2
3333

3434
# https://github.com/actions/setup-node
3535
- name: Install Node.js ${{ matrix.node-version }}
36-
uses: actions/setup-node@v1
36+
uses: actions/setup-node@v2
3737
with:
3838
node-version: ${{ matrix.node-version }}
3939

@@ -82,7 +82,7 @@ jobs:
8282
# Upload coverage reports to Codecov (for Node v12 only)
8383
# https://github.com/codecov/codecov-action
8484
- name: Upload coverage to Codecov.io
85-
uses: codecov/codecov-action@v1
85+
uses: codecov/codecov-action@v2
8686
if: matrix.node-version == '12.x'
8787

8888
# Using docker-compose start backend using CI configuration

.github/workflows/docker.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# DSpace Docker image build for hub.docker.com
2+
name: Docker images
3+
4+
# Run this Build for all pushes to 'main' or maintenance branches, or tagged releases.
5+
# Also run for PRs to ensure PR doesn't break Docker build process
6+
on:
7+
push:
8+
branches:
9+
- main
10+
- 'dspace-**'
11+
tags:
12+
- 'dspace-**'
13+
pull_request:
14+
15+
jobs:
16+
docker:
17+
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
18+
if: github.repository == 'dspace/dspace-angular'
19+
runs-on: ubuntu-latest
20+
env:
21+
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
22+
# For a new commit on default branch (main), use the literal tag 'dspace-7_x' on Docker image.
23+
# For a new commit on other branches, use the branch name as the tag for Docker image.
24+
# For a new tag, copy that tag name as the tag for Docker image.
25+
IMAGE_TAGS: |
26+
type=raw,value=dspace-7_x,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
27+
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
28+
type=ref,event=tag
29+
# Define default tag "flavor" for docker/metadata-action per
30+
# https://github.com/docker/metadata-action#flavor-input
31+
# We turn off 'latest' tag by default.
32+
TAGS_FLAVOR: |
33+
latest=false
34+
35+
steps:
36+
# https://github.com/actions/checkout
37+
- name: Checkout codebase
38+
uses: actions/checkout@v2
39+
40+
# https://github.com/docker/setup-buildx-action
41+
- name: Setup Docker Buildx
42+
uses: docker/setup-buildx-action@v1
43+
44+
# https://github.com/docker/login-action
45+
- name: Login to DockerHub
46+
# Only login if not a PR, as PRs only trigger a Docker build and not a push
47+
if: github.event_name != 'pull_request'
48+
uses: docker/login-action@v1
49+
with:
50+
username: ${{ secrets.DOCKER_USERNAME }}
51+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
52+
53+
###############################################
54+
# Build/Push the 'dspace/dspace-angular' image
55+
###############################################
56+
# https://github.com/docker/metadata-action
57+
# Get Metadata for docker_build step below
58+
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular' image
59+
id: meta_build
60+
uses: docker/metadata-action@v3
61+
with:
62+
images: dspace/dspace-angular
63+
tags: ${{ env.IMAGE_TAGS }}
64+
flavor: ${{ env.TAGS_FLAVOR }}
65+
66+
# https://github.com/docker/build-push-action
67+
- name: Build and push 'dspace-angular' image
68+
id: docker_build
69+
uses: docker/build-push-action@v2
70+
with:
71+
context: .
72+
file: ./Dockerfile
73+
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
74+
# but we ONLY do an image push to DockerHub if it's NOT a PR
75+
push: ${{ github.event_name != 'pull_request' }}
76+
# Use tags / labels provided by 'docker/metadata-action' above
77+
tags: ${{ steps.meta_build.outputs.tags }}
78+
labels: ${{ steps.meta_build.outputs.labels }}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This image will be published as dspace/dspace-angular
2-
# See https://dspace-labs.github.io/DSpace-Docker-Images/ for usage details
2+
# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details
33

4-
FROM node:12-alpine
4+
FROM node:14-alpine
55
WORKDIR /app
66
ADD . /app/
77
EXPOSE 4000

LICENSE

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DSpace source code BSD License:
1+
BSD 3-Clause License
22

33
Copyright (c) 2002-2021, LYRASIS. All rights reserved.
44

@@ -13,13 +13,12 @@ notice, this list of conditions and the following disclaimer.
1313
notice, this list of conditions and the following disclaimer in the
1414
documentation and/or other materials provided with the distribution.
1515

16-
- Neither the name DuraSpace nor the name of the DSpace Foundation
17-
nor the names of its contributors may be used to endorse or promote
18-
products derived from this software without specific prior written
19-
permission.
16+
- Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
2019

2120
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22-
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2322
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2423
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2524
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -29,11 +28,4 @@ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2928
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
3029
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
3130
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
32-
DAMAGE.
33-
34-
35-
DSpace uses third-party libraries which may be distributed under
36-
different licenses to the above. Information about these licenses
37-
is detailed in the LICENSES_THIRD_PARTY file at the root of the source
38-
tree. You must agree to the terms of these licenses, in addition to
39-
the above DSpace source code license, in order to use this software.
31+
DAMAGE.

NOTICE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Licenses of Third-Party Libraries
2+
=================================
3+
4+
DSpace uses third-party libraries which may be distributed under
5+
different licenses than specified in our LICENSE file. Information
6+
about these licenses is detailed in the LICENSES_THIRD_PARTY file at
7+
the root of the source tree. You must agree to the terms of these
8+
licenses, in addition to the DSpace source code license, in order to
9+
use this software.
10+
11+
Licensing Notices
12+
=================
13+
14+
[July 2019] DuraSpace joined with LYRASIS (another 501(c)3 organization) in July 2019.
15+
LYRASIS holds the copyrights of DuraSpace.
16+
17+
[July 2009] Fedora Commons joined with the DSpace Foundation and began operating under
18+
the new name DuraSpace in July 2009. DuraSpace holds the copyrights of
19+
the DSpace Foundation, Inc.
20+
21+
[July 2007] The DSpace Foundation, Inc. is a 501(c)3 corporation established in July 2007
22+
with a mission to promote and advance the dspace platform enabling management,
23+
access and preservation of digital works. The Foundation was able to transfer
24+
the legal copyright from Hewlett-Packard Company (HP) and Massachusetts
25+
Institute of Technology (MIT) to the DSpace Foundation in October 2007. Many
26+
of the files in the source code may contain a copyright statement stating HP
27+
and MIT possess the copyright, in these instances please note that the copy
28+
right has transferred to the DSpace foundation, and subsequently to DuraSpace.

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,4 +508,8 @@ DSpace uses GitHub to track issues:
508508

509509
License
510510
-------
511-
This project's source code is made available under the DSpace BSD License: http://www.dspace.org/license
511+
DSpace source code is freely available under a standard [BSD 3-Clause license](https://opensource.org/licenses/BSD-3-Clause).
512+
The full license is available in the [LICENSE](LICENSE) file or online at http://www.dspace.org/license/
513+
514+
DSpace uses third-party libraries which may be distributed under different licenses. Those licenses are listed
515+
in the [LICENSES_THIRD_PARTY](LICENSES_THIRD_PARTY) file.

docker/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44
:warning: **NOT PRODUCTION READY** The below Docker Compose resources are not guaranteed "production ready" at this time. They have been built for development/testing only. Therefore, DSpace Docker images may not be fully secured or up-to-date. While you are welcome to base your own images on these DSpace images/resources, these should not be used "as is" in any production scenario.
55
***
66

7+
## 'Dockerfile' in root directory
8+
This Dockerfile is used to build a *development* DSpace 7 Angular UI image, published as 'dspace/dspace-angular'
9+
10+
```
11+
docker build -t dspace/dspace-angular:dspace-7_x .
12+
```
13+
14+
This image is built *automatically* after each commit is made to the `main` branch.
15+
16+
Admins to our DockerHub repo can manually publish with the following command.
17+
```
18+
docker push dspace/dspace-angular:dspace-7_x
19+
```
20+
721
## docker directory
822
- docker-compose.yml
923
- Starts DSpace Angular with Docker Compose from the current branch. This file assumes that a DSpace 7 REST instance will also be started in Docker.

docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ services:
2020
DSPACE_NAMESPACE: /
2121
DSPACE_PORT: '4000'
2222
DSPACE_SSL: "false"
23-
image: dspace/dspace-angular:latest
23+
image: dspace/dspace-angular:dspace-7_x
2424
build:
2525
context: ..
2626
dockerfile: Dockerfile

src/app/admin/admin-search-page/admin-search.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const ENTRY_COMPONENTS = [
3636
export class AdminSearchModule {
3737
/**
3838
* NOTE: this method allows to resolve issue with components that using a custom decorator
39-
* which are not loaded during CSR otherwise
39+
* which are not loaded during SSR otherwise
4040
*/
4141
static withEntryComponents() {
4242
return {

src/app/admin/admin-workflow-page/admin-workflow.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const ENTRY_COMPONENTS = [
2828
export class AdminWorkflowModuleModule {
2929
/**
3030
* NOTE: this method allows to resolve issue with components that using a custom decorator
31-
* which are not loaded during CSR otherwise
31+
* which are not loaded during SSR otherwise
3232
*/
3333
static withEntryComponents() {
3434
return {

0 commit comments

Comments
 (0)