Skip to content

Commit 7a26ec9

Browse files
Workspace name, prebuilt devcontainer, livereload (#39)
* Changed to project and removed live reload. Updated to use pre built dev container. * correct open file for index. * Remove sonar properties file as should get from env vars on action. * Versioning and make file. * hide node modules. * Remove versions from git. * remove ignore for old workspace file. * Add codespaces extension. * Worspaces already there. * gem lock spacing. * Added ruby lsp. * Added gem file to editor ignore. * Use make build in pipeline build. * Added config to point to install in docs makefile. * Upped Pa11y version. * Upped ruby version in build. * Upped gitleaks version. * pa11y version * pa11y override. * pa11y as override only.
1 parent 705732b commit 7a26ec9

23 files changed

+1547
-399
lines changed

.devcontainer/Dockerfile

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

.devcontainer/devcontainer.json

Lines changed: 22 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,28 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2-
// README at: https://github.com/devcontainers/templates/tree/main/src/jekyll
31
{
4-
"name": "Jekyll",
5-
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"build": {
7-
"dockerfile": "Dockerfile"
8-
},
9-
// Features to add to the dev container. More info: https://containers.dev/features.
10-
// "features": {},
11-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
12-
// "forwardPorts": [],
13-
// Uncomment the next line to run commands after the container is created.
14-
"postCreateCommand": "zsh scripts/devcontainer/postcreatecommand.sh",
15-
"postStartCommand": "zsh scripts/devcontainer/poststartcommand.sh",
16-
"forwardPorts": [4000],
17-
// Configure tool-specific properties.
182
"customizations": {
193
"codespaces": {
204
"openFiles": ["README.md", ".github/SECURITY.md", "docs/pages/index.md"]
215
},
226
"vscode": {
23-
// Set *default* container specific settings.json values on container create.
24-
"settings": {
25-
},
26-
// Add the IDs of extensions you want installed when the container is created.
277
"extensions": [
288
"alefragnani.bookmarks",
9+
"AmazonWebServices.aws-toolkit-vscode",
10+
"chdsbd.github-code-owners",
2911
"davidanson.vscode-markdownlint",
3012
"dbaeumer.vscode-eslint",
3113
"donjayamanne.githistory",
32-
"eamodio.gitlens",
3314
"editorconfig.editorconfig",
3415
"esbenp.prettier-vscode",
16+
"fvclaus.sort-json-array",
3517
"github.codespaces",
3618
"github.github-vscode-theme",
3719
"github.remotehub",
3820
"github.vscode-github-actions",
3921
"github.vscode-pull-request-github",
4022
"hediet.vscode-drawio",
4123
"johnpapa.vscode-peacock",
24+
"joshx.workspace-terminals",
25+
"maattdd.gitless",
4226
"mhutchie.git-graph",
4327
"ms-azuretools.vscode-docker",
4428
"ms-vscode-remote.remote-containers",
@@ -48,6 +32,7 @@
4832
"ms-vsliveshare.vsliveshare",
4933
"redhat.vscode-xml",
5034
"streetsidesoftware.code-spell-checker-british-english",
35+
"takumii.markdowntable",
5136
"tamasfe.even-better-toml",
5237
"tomoki1207.pdf",
5338
"vscode-icons-team.vscode-icons",
@@ -56,44 +41,22 @@
5641
"yzane.markdown-pdf",
5742
"yzhang.dictionary-completion",
5843
"yzhang.markdown-all-in-one",
59-
"joshx.workspace-terminals",
60-
"takumii.markdowntable",
61-
"chdsbd.github-code-owners"
62-
]
44+
"zoma.vscode-auto-open-workspace"
45+
],
46+
"settings": {
47+
"[makefile]": {
48+
"editor.detectIndentation": false,
49+
"editor.insertSpaces": false
50+
},
51+
"autoOpenWorkspace.enableAutoOpenIfSingleWorkspace": true,
52+
"editor.formatOnSave": true,
53+
"extensions.ignoreRecommendations": true,
54+
"files.insertFinalNewline": true
55+
}
6356
}
6457
},
65-
"features": {
66-
"ghcr.io/devcontainers/features/aws-cli:1": {
67-
"version": "latest"
68-
},
69-
"ghcr.io/devcontainers/features/docker-in-docker:2": {
70-
"moby": true,
71-
"azureDnsAutoDetection": true,
72-
"installDockerBuildx": true,
73-
"installDockerComposeSwitch": true,
74-
"version": "latest",
75-
"dockerDashComposeVersion": "latest"
76-
},
77-
"ghcr.io/devcontainers/features/node:1": {
78-
"nodeGypDependencies": true,
79-
"version": "lts",
80-
"nvmVersion": "latest"
81-
},
82-
"ghcr.io/devcontainers/features/github-cli:1": {
83-
"installDirectlyFromGitHubRelease": true,
84-
"version": "latest"
85-
},
86-
"ghcr.io/devcontainers/features/common-utils:2": {
87-
"installZsh": true,
88-
"configureZshAsDefaultShell": true,
89-
"installOhMyZsh": true,
90-
"installOhMyZshConfig": true,
91-
"upgradePackages": true,
92-
"username": "automatic",
93-
"userUid": "automatic",
94-
"userGid": "automatic"
95-
}
96-
}
97-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
98-
// "remoteUser": "root"
58+
"forwardPorts": [4000],
59+
"image": "ghcr.io/nhsdigital/nhs-notify-template-repository:latest",
60+
"name": "Jekyll",
61+
"runArgs": ["--platform=linux/amd64"]
9962
}

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,13 @@ indent_size = 4
1919

2020
[{Makefile,*.mk,go.mod,go.sum,*.go,.gitmodules}]
2121
indent_style = tab
22+
23+
# Ignore paths
24+
[Gemfile.lock]
25+
charset = unset
26+
end_of_line = unset
27+
insert_final_newline = unset
28+
trim_trailing_whitespace = unset
29+
indent_style = unset
30+
indent_size = unset
31+
generated_code = true

.github/workflows/jekyll-gh-pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ jobs:
4343
- name: Setup Ruby
4444
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
4545
with:
46-
ruby-version: '3.1' # Not needed with a .ruby-version file
46+
ruby-version: "3.2" # Not needed with a .ruby-version file
4747
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
4848
cache-version: 0 # Increment this number if you need to re-download cached gems
49-
working-directory: './docs'
49+
working-directory: "./docs"
5050
- name: Setup Pages
5151
id: pages
5252
uses: actions/configure-pages@v5
5353
- name: Build with Jekyll
5454
working-directory: ./docs
5555
# Outputs to the './_site' directory by default
56-
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
56+
run: make build BASE_URL="${{ steps.pages.outputs.base_path }}"
5757
env:
5858
JEKYLL_ENV: production
5959
- name: Upload artifact

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
*vulnerabilities*report*.json
77
*report*json.zip
88
.version
9-
9+
version.json
1010
*.code-workspace
1111
!project.code-workspace
1212

1313
# Please, add your custom content below!
14-
15-
!nhs-notify-web-cms.code-workspace
1614
.reports

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
terraform 1.7.0
44
pre-commit 3.6.0
55
nodejs 18.18.2
6-
gitleaks 8.15.3
6+
gitleaks 8.18.4
77
# ==============================================================================
88
# The section below is reserved for Docker image versions.
99

.vscode/launch.json

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

.vscode/settings.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"files.exclude": {
3+
"**/.git": true,
4+
"**/.svn": true,
5+
"**/.hg": true,
6+
"**/CVS": true,
7+
"**/.DS_Store": true,
8+
"**/Thumbs.db": true,
9+
"**/.ruby-lsp": true,
10+
"docs": true,
11+
".devcontainer": true,
12+
".github": true,
13+
".vscode": false,
14+
"infrastructure": true,
15+
"scripts": true,
16+
"terraform": true,
17+
"tests": true
18+
}
19+
}

.vscode/tasks.json

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

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies: # Install dependencies needed to build and test the project @Pipel
1111
# TODO: Implement installation of your project dependencies
1212

1313
build: # Build the project artefact @Pipeline
14-
# TODO: Implement the artefact build step
14+
(cd docs && make build)
1515

1616
publish: # Publish the project artefact @Pipeline
1717
# TODO: Implement the artefact publishing step
@@ -20,12 +20,16 @@ deploy: # Deploy the project artefact to the target environment @Pipeline
2020
# TODO: Implement the artefact deployment step
2121

2222
clean:: # Clean-up project resources (main) @Operations
23+
rm -f .version
2324
# TODO: Implement project resources clean-up step
2425

25-
config:: # Configure development environment (main) @Configuration
26-
# TODO: Use only 'make' targets that are specific to this project, e.g. you may not need to install Node.js
27-
make _install-dependencies
26+
config:: _install-dependencies version # Configure development environment (main) @Configuration
27+
(cd docs && make install)
2828

29+
version:
30+
rm -f .version
31+
make version-create-effective-file dir=.
32+
echo "{ \"schemaVersion\": 1, \"label\": \"version\", \"message\": \"$$(head -n 1 .version 2> /dev/null || echo unknown)\", \"color\": \"orange\" }" > version.json
2933
# ==============================================================================
3034

3135
${VERBOSE}.SILENT: \

0 commit comments

Comments
 (0)