generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
307 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
name: Build and Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: docker.io/ministryofjustice/tech-docs-github-pages-publisher@sha256:cd3513beca3fcaf5dd34cbe81a33b3ff30337d8ada5869b40a6454c21d6f7684 # v4.0.0 | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Build | ||
id: build | ||
run: | | ||
/usr/local/bin/package | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Lychee | ||
id: lychee | ||
uses: lycheeverse/lychee-action@c053181aa0c3d17606addfe97a9075a32723548a # v1.9.3 | ||
with: | ||
args: --verbose --no-progress './**/*.md' './**/*.html' './**/*.erb' --accept 403,200,429 | ||
fail: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
name: OpenSSF Scorecard | ||
|
||
on: | ||
branch_protection_rule: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "30 6 * * 1" | ||
workflow_dispatch: | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
openssf-scorecard: | ||
name: OpenSSF Scorecard | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
security-events: write | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Run Analysis | ||
id: run_analysis | ||
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 | ||
with: | ||
results_file: results.sarif | ||
results_format: sarif | ||
publish_results: true | ||
|
||
- name: Upload SARIF | ||
id: upload_sarif | ||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | ||
with: | ||
name: SARIF Results | ||
path: results.sarif | ||
retention-days: 5 | ||
|
||
- name: Upload to CodeQL | ||
id: upload_to_codeql | ||
uses: github/codeql-action/upload-sarif@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0 | ||
with: | ||
sarif_file: results.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
name: Build and Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: {} | ||
|
||
concurrency: | ||
group: github-pages | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: docker.io/ministryofjustice/tech-docs-github-pages-publisher@sha256:cd3513beca3fcaf5dd34cbe81a33b3ff30337d8ada5869b40a6454c21d6f7684 # v4.0.0 | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Build | ||
id: build | ||
run: | | ||
/usr/local/bin/package | ||
- name: Upload Artifact | ||
id: upload_artifact | ||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | ||
with: | ||
name: github-pages | ||
path: artifact.tar | ||
retention-days: 1 | ||
overwrite: true | ||
|
||
publish: | ||
needs: build | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.configure_pages.outputs.base_url }} | ||
permissions: | ||
contents: read | ||
id-token: write | ||
pages: write | ||
steps: | ||
- name: Configure Pages | ||
id: configure_pages | ||
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deploy_pages | ||
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
collapsible_nav: true | ||
default_owner_slack: "#devcontainer-community" | ||
enable_search: true | ||
footer_links: | ||
Platform Status: https://status.observability-platform.service.justice.gov.uk | ||
full_service_name: Dev Container User Guide | ||
github_branch: main | ||
github_repo: ministryofjustice/.devcontainer | ||
header_links: | ||
GitHub: https://github.com/ministryofjustice/.devcontainer | ||
Slack: https://moj.enterprise.slack.com/archives/C06DZ4F04JZ | ||
host: https://user-guide.devcontainer.service.justice.gov.uk | ||
max_toc_heading_level: 3 | ||
owner_slack_workspace: mojdt | ||
phase: prototype | ||
prevent_indexing: true | ||
service_link: / | ||
service_name: Dev Container User Guide | ||
show_contribution_banner: true | ||
show_expiry: true | ||
show_govuk_logo: false | ||
show_review_banner: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
MODE="${1:-preview}" | ||
TECH_DOCS_PUBLISHER_IMAGE="docker.io/ministryofjustice/tech-docs-github-pages-publisher@sha256:cd3513beca3fcaf5dd34cbe81a33b3ff30337d8ada5869b40a6454c21d6f7684" # v4.0.0 | ||
|
||
case ${MODE} in | ||
package | preview) | ||
true | ||
;; | ||
*) | ||
echo "Usage: ${0} [package|preview]" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
if [[ "$(uname --machine)" == "aarch64" ]] || [[ "$(uname --machine)" == "arm64" ]]; then | ||
PLATFORM_FLAG="--platform=linux/amd64" | ||
else | ||
PLATFORM_FLAG="" | ||
fi | ||
|
||
docker run -it --rm ${PLATFORM_FLAG} \ | ||
--name "tech-docs-${MODE}" \ | ||
--publish 4567:4567 \ | ||
--volume "${PWD}/config:/app/config" \ | ||
--volume "${PWD}/source:/app/source" \ | ||
"${TECH_DOCS_PUBLISHER_IMAGE}" "/usr/local/bin/${MODE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: Features | ||
last_reviewed_on: 2024-04-15 | ||
review_in: 3 months | ||
weight: 0 | ||
--- | ||
|
||
# <%= current_page.data.title %> | ||
|
||
## What are Features? | ||
|
||
In the context of the Ministry of Justice Dev Containers community, features are built by the community to satisfy the specific needs of our developers and the challenges they face on a day to day basis. | ||
|
||
Features are built using the [.devcontainer](https.//github.com/ministryofjustice/.devcontainer/features/test) GitHub repository and are designed to be modular and reusable. This means that features can be combined to create a custom development environment that meets the needs of a specific project or team. | ||
|
||
Features are can be used by Sofware Developers and those in Operations Roles to create consistent and reliable development environments for the applications and services they work on. | ||
|
||
## Available Features | ||
|
||
Features are located in the [features](https.//github.com/ministryofjustice/.devcontainer/features/src) folder in the Dev Containers GitHub repository. | ||
|
||
### AWS | ||
|
||
The AWS feature provides a development environment with the AWS CLI and SDKs pre-installed. | ||
|
||
###Â Cloud Platform | ||
|
||
The Cloud Platform feature provides a development environment with | ||
|
||
### Container Structure Test | ||
|
||
The Container Structure Test feature | ||
|
||
### Kubernetes | ||
|
||
### Static Analysis | ||
|
||
The Static Analysis feature provides a development environment with static analysis tools pre-installed. | ||
|
||
The tools include: | ||
|
||
- [checkov](https://www.checkov.io/) | ||
|
||
- [trivy](https://aquasecurity.github.io/trivy/v0.51/) | ||
|
||
- [terrascan](https://runterrascan.io/) | ||
|
||
### Terraform | ||
|
||
The Terraform feature provides a development environment with the Terraform CLI pre-installed. | ||
|
||
## Adding a New Features | ||
|
||
To add a new feature: | ||
|
||
1. Create a new feature in the [.devcontainer](https.//github.com/ministryofjustice/.devcontainer/features/src) GitHub repository. | ||
1. Add the feature to the [Dev Containers Features](/documentation/features/features.html) documentation. | ||
1. Add tests for the feature in the [.devcontainer](https.//github.com/ministryofjustice/.devcontainer/features/test) GitHub repository. |
13 changes: 13 additions & 0 deletions
13
source/documentation/getting-started/getting-started.html.md.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: Getting Started with Dev Containers | ||
last_reviewed_on: 2024-04-15 | ||
review_in: 3 months | ||
weight: 0 | ||
--- | ||
|
||
# <%= current_page.data.title %> | ||
|
||
## Heading | ||
|
||
Content | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Dev Container User Guide | ||
last_reviewed_on: 2024-05-14 | ||
review_in: 3 months | ||
weight: 0 | ||
--- | ||
|
||
# <%= current_page.data.title %> | ||
|
||
This documentation is for teams and individuals who wish to integrate [Dev Containers](https://containers.dev/) into their development workflow. | ||
|
||
## Our Goals | ||
|
||
The goal of the community is to provide a consistent and reliable development environment for all developers throughout the Ministry of Justice. | ||
We welcome contributions to this community - Pull Requests, documentation, feedback and requests are all welcome. | ||
|
||
## Getting Started | ||
|
||
- [Getting Started with Dev Containers in the Ministry of Justice](/documentation/getting-started/getting-started.html) | ||
|
||
## Features | ||
|
||
- [Dev Containers Features](/documentation/features/features.html) | ||
|
||
## Getting Help | ||
|
||
You can contact us on Slack via [#devcontainer-community](https://moj.enterprise.slack.com/archives/C06DZ4F04JZ). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//= require govuk_tech_docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$is-print: true; | ||
|
||
@import "govuk_tech_docs"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$is-ie: true; | ||
$ie-version: 8; | ||
|
||
@import "govuk_tech_docs"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import "govuk_tech_docs"; |