Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace name, prebuilt devcontainer, livereload #39

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6de607d
Changed to project and removed live reload. Updated to use pre built …
RossBugginsNHS Jul 3, 2024
f70e5a7
correct open file for index.
RossBugginsNHS Jul 3, 2024
cd73362
Remove sonar properties file as should get from env vars on action.
RossBugginsNHS Jul 3, 2024
0c8316f
Versioning and make file.
RossBugginsNHS Jul 3, 2024
03103e3
hide node modules.
RossBugginsNHS Jul 3, 2024
7624df5
Remove versions from git.
RossBugginsNHS Jul 3, 2024
d517b7f
remove ignore for old workspace file.
RossBugginsNHS Jul 3, 2024
d13a763
Add codespaces extension.
RossBugginsNHS Jul 3, 2024
8f7dd73
Worspaces already there.
RossBugginsNHS Jul 3, 2024
e07c2fc
gem lock spacing.
RossBugginsNHS Jul 3, 2024
db73f74
Added ruby lsp.
RossBugginsNHS Jul 3, 2024
60dc037
Added gem file to editor ignore.
RossBugginsNHS Jul 3, 2024
7926c02
Use make build in pipeline build.
RossBugginsNHS Jul 3, 2024
9999361
Added config to point to install in docs makefile.
RossBugginsNHS Jul 3, 2024
f8ee611
Upped Pa11y version.
RossBugginsNHS Jul 3, 2024
fad1a40
Upped ruby version in build.
RossBugginsNHS Jul 3, 2024
be00440
Upped gitleaks version.
RossBugginsNHS Jul 3, 2024
ef32f82
Merge branch 'main' into rossbugginsnhs/dev-container-and-project-wor…
RossBugginsNHS Jul 3, 2024
674ea86
pa11y version
RossBugginsNHS Jul 8, 2024
4900f37
pa11y override.
RossBugginsNHS Jul 8, 2024
7f9e6b4
pa11y as override only.
RossBugginsNHS Jul 8, 2024
c9910d1
Merge branch 'main' into rossbugginsnhs/dev-container-and-project-wor…
RossBugginsNHS Jul 10, 2024
89df1fb
Merge branch 'main' into rossbugginsnhs/dev-container-and-project-wor…
RossBugginsNHS Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .devcontainer/Dockerfile

This file was deleted.

81 changes: 22 additions & 59 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,28 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/jekyll
{
"name": "Jekyll",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"build": {
"dockerfile": "Dockerfile"
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment the next line to run commands after the container is created.
"postCreateCommand": "zsh scripts/devcontainer/postcreatecommand.sh",
"postStartCommand": "zsh scripts/devcontainer/poststartcommand.sh",
"forwardPorts": [4000],
// Configure tool-specific properties.
"customizations": {
"codespaces": {
"openFiles": ["README.md", ".github/SECURITY.md", "docs/pages/index.md"]
},
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"alefragnani.bookmarks",
"AmazonWebServices.aws-toolkit-vscode",
"chdsbd.github-code-owners",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"donjayamanne.githistory",
"eamodio.gitlens",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"fvclaus.sort-json-array",
"github.codespaces",
"github.github-vscode-theme",
"github.remotehub",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"hediet.vscode-drawio",
"johnpapa.vscode-peacock",
"joshx.workspace-terminals",
"maattdd.gitless",
"mhutchie.git-graph",
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers",
Expand All @@ -48,6 +32,7 @@
"ms-vsliveshare.vsliveshare",
"redhat.vscode-xml",
"streetsidesoftware.code-spell-checker-british-english",
"takumii.markdowntable",
"tamasfe.even-better-toml",
"tomoki1207.pdf",
"vscode-icons-team.vscode-icons",
Expand All @@ -56,44 +41,22 @@
"yzane.markdown-pdf",
"yzhang.dictionary-completion",
"yzhang.markdown-all-in-one",
"joshx.workspace-terminals",
"takumii.markdowntable",
"chdsbd.github-code-owners"
]
"zoma.vscode-auto-open-workspace"
],
"settings": {
"[makefile]": {
"editor.detectIndentation": false,
"editor.insertSpaces": false
},
"autoOpenWorkspace.enableAutoOpenIfSingleWorkspace": true,
"editor.formatOnSave": true,
"extensions.ignoreRecommendations": true,
"files.insertFinalNewline": true
}
}
},
"features": {
"ghcr.io/devcontainers/features/aws-cli:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
"azureDnsAutoDetection": true,
"installDockerBuildx": true,
"installDockerComposeSwitch": true,
"version": "latest",
"dockerDashComposeVersion": "latest"
},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "lts",
"nvmVersion": "latest"
},
"ghcr.io/devcontainers/features/github-cli:1": {
"installDirectlyFromGitHubRelease": true,
"version": "latest"
},
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"installOhMyZshConfig": true,
"upgradePackages": true,
"username": "automatic",
"userUid": "automatic",
"userGid": "automatic"
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"forwardPorts": [4000],
"image": "ghcr.io/nhsdigital/nhs-notify-template-repository:latest",
"name": "Jekyll",
RossBugginsNHS marked this conversation as resolved.
Show resolved Hide resolved
"runArgs": ["--platform=linux/amd64"]
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@ indent_size = 4

[{Makefile,*.mk,go.mod,go.sum,*.go,.gitmodules}]
indent_style = tab

# Ignore paths
[Gemfile.lock]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
generated_code = true
6 changes: 3 additions & 3 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
ruby-version: "3.2" # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
working-directory: './docs'
working-directory: "./docs"
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
working-directory: ./docs
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
run: make build BASE_URL="${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
*vulnerabilities*report*.json
*report*json.zip
.version

version.json
*.code-workspace
!project.code-workspace

# Please, add your custom content below!

!nhs-notify-web-cms.code-workspace
.reports
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
terraform 1.7.0
pre-commit 3.6.0
nodejs 18.18.2
gitleaks 8.15.3
gitleaks 8.18.4
# ==============================================================================
# The section below is reserved for Docker image versions.

Expand Down
16 changes: 0 additions & 16 deletions .vscode/launch.json

This file was deleted.

19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.ruby-lsp": true,
"docs": true,
".devcontainer": true,
".github": true,
".vscode": false,
"infrastructure": true,
"scripts": true,
"terraform": true,
"tests": true
}
}
13 changes: 0 additions & 13 deletions .vscode/tasks.json

This file was deleted.

12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies: # Install dependencies needed to build and test the project @Pipel
# TODO: Implement installation of your project dependencies

build: # Build the project artefact @Pipeline
# TODO: Implement the artefact build step
(cd docs && make build)

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

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

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

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

${VERBOSE}.SILENT: \
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
${yyyy}${mm}${dd}
0.0.1-${yyyy}${mm}${dd}.${HH}${MM}${SS}+${hash}
2 changes: 1 addition & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ _site
vendor
.bundle
node_modules
#Gemfile.lock
_config.version.yml
16 changes: 8 additions & 8 deletions docs/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Web CMS",
"console": "integratedTerminal",
"name": "Debug",
"preLaunchTask": "stop-already-running",
"request": "launch",
"runtimeArgs": ["run-script", "debug"],
"runtimeExecutable": "npm",
"runtimeArgs": ["debug"],
"runtimeExecutable": "make",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"preLaunchTask": "stop-already-running",
"console": "integratedTerminal"
"type": "node"
}
]
],
"version": "0.2.0"
}
16 changes: 16 additions & 0 deletions docs/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.ruby-lsp": true,
"_site": true,
".jekyll-cache": true,
".bundle": true,
"vendor": true,
"node_modules": true
}
}
6 changes: 3 additions & 3 deletions docs/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"version": "2.0.0",
"tasks": [
{
"command": "kill $(lsof -ti :4000); exit 0;",
"label": "stop-already-running",
"options": {
"cwd": "${workspaceFolder}"
},
"command": "kill $(lsof -ti :4000); exit 0;",
"type": "shell"
}
]
],
"version": "2.0.0"
}
2 changes: 2 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
gem "just-the-docs"

gem "jekyll-sitemap", "~> 1.4"

gem "ruby-lsp"
17 changes: 15 additions & 2 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ GEM
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
language_server-protocol (3.17.0.3)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.0)
mercenary (0.4.0)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
Expand All @@ -72,18 +74,28 @@ GEM
racc (~> 1.4)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
prism (0.30.0)
public_suffix (5.0.5)
racc (1.8.0)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rbs (3.5.1)
logger
rexml (3.2.8)
strscan (>= 3.0.9)
rouge (4.2.1)
ruby-lsp (0.17.4)
language_server-protocol (~> 3.17.0)
prism (>= 0.29.0, < 0.31)
rbs (>= 3, < 4)
sorbet-runtime (>= 0.5.10782)
safe_yaml (1.0.5)
sass-embedded (1.69.5-x86_64-linux-gnu)
sass-embedded (1.69.5)
google-protobuf (~> 3.23)
rake (>= 13.0.0)
sorbet-runtime (0.5.11466)
strscan (3.1.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
Expand All @@ -101,9 +113,10 @@ DEPENDENCIES
jekyll-sitemap (~> 1.4)
just-the-docs
minima (~> 2.5)
ruby-lsp
tzinfo (>= 1, < 3)
tzinfo-data
wdm (~> 0.1.1)

BUNDLED WITH
2.5.10
2.5.10
Loading
Loading