You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Jenkinsfile
+41-2
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ pipeline {
9
9
booleanParam(name: "FORCE_REDEPLOY_WEB", defaultValue: false, description: 'Force redeploy the web frontend even if there are no code changes.' )
10
10
booleanParam(name: "FORCE_REDEPLOY_CG", defaultValue: false, description: 'Force redeploy the cer-graphql API even if there are no code changes.')
11
11
booleanParam(name: "FORCE_REDEPLOY_SP", defaultValue: false, description: 'Force redeploy the search-proxy Lambda even if there are no code changes.')
12
+
booleanParam(name: "FORCE_REDEPLOY_SLC", defaultValue: false, description: 'Force redeploy the subhub-link-checker Contentful App even if there are no code changes.')
12
13
}
13
14
14
15
agent {
@@ -108,7 +109,7 @@ pipeline {
108
109
}
109
110
}
110
111
111
-
stage('Build cer-graphql and search-proxy projects') {
112
+
stage('Build cer-graphql, subhub-link-checker and search-proxy projects') {
Copy file name to clipboardexpand all lines: subhub-link-checker/README.md
+12-2
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,15 @@ Part of the Hub Expansion project. This is required due to SubHub routing logic
14
14
There are three instances of the Contentful App - one for dev, test and prod. [Read more...](https://www.contentful.com/developers/docs/extensibility/app-framework/)
15
15
16
16
## Seeing and deploying your changes
17
+
Build and deployment for the SubHub Link Checker app are part of the Jenkins CI process.
18
+
19
+
ResearchHub has three Contentful environments - `dev`, `test`, and `prod`, and `prod` is the one content authors see. An [app definition](https://www.contentful.com/developers/docs/extensibility/app-framework/app-definition/) is set up for in three different environments, which means different versions of the link checker app can run in each environment. Deploy changes to `dev` for previewing your changes and manual testing - Contentful Apps can't be run locally. Deployment to `test` and `prod` should only be done as part of [the official release process](https://wiki.auckland.ac.nz/display/APPLCTN/Release+to+prod) and content authors need to be notified before deploying updates.
20
+
17
21
This assumes the Contentful environments are set up with the required app definitions. See the First time deployment section if you need to redo those steps.
18
22
19
-
ResearchHub has three Contentful environments - `dev`, `test`, and `prod`, and `prod` is the one content authors see. Use `dev` for previewing your changes and manual testing - Contentful Apps can't be run locally. Deployment to `test` and `prod` should only be done as part of [the official release process](https://wiki.auckland.ac.nz/display/APPLCTN/Release+to+prod) and content authors need to be notified before deploying updates.
23
+
## Manual deployment
24
+
If you would like to manually deploy the App (for example, if you would like to preview changes in the dev Contentful environment without having to commit and push into your dev branch), follow these instructions.
20
25
21
-
1. If you are deploying to `test` and `prod`, first check-in your changes to Git and merge them into `master`.
22
26
1. Run `npm run build` to build a new bundle.
23
27
2. Run `npm run upload`.
24
28
1. For the bundle comment, put in the hash of Git commit you built the bundle from if applicable.
@@ -28,6 +32,7 @@ ResearchHub has three Contentful environments - `dev`, `test`, and `prod`, and `
28
32
3. Go to Contentful to see your changes.
29
33
30
34
## First time deployment
35
+
These instructions are for deploying to a fresh Contentful instance.
31
36
32
37
1. Create three Apps on Contentful. In the `subhub-link-checker` folder, run the command:
33
38
@@ -59,6 +64,11 @@ ResearchHub has three Contentful environments - `dev`, `test`, and `prod`, and `
59
64
60
65
Open a SubHub to verify the Internal Pages field is still editable. If it is, then the App setup is complete!
61
66
67
+
4. Create a [Contentful personal access token](https://www.contentful.com/developers/docs/references/authentication/#getting-a-personal-access-token), preferably using a service account. Add these five secrets to Jenkins credentials store, so the Jenkins CI process can refer to the values. Read `Jenkinsfile` to see how these values are used.
68
+
* Personal Access Token: `contentful-pat`
69
+
* The App definition ID for each app definition: `contentful-link-checker-app-id-dev`, `contentful-link-checker-app-id-test`, and `contentful-link-checker-app-id-prod`.
70
+
* Organisation ID: `contentful-org-id`
71
+
62
72
## Development
63
73
This project was bootstrapped with [Create Contentful App](https://github.com/contentful/create-contentful-app).
0 commit comments