-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
56 lines (47 loc) · 2.34 KB
/
.gitlab-ci.yml
File metadata and controls
56 lines (47 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# This file is only used for CI/CD pipelines when the repository is hosted within GITLAB
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/user/application_security/secret_detection/pipeline/configure
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
# This is used for ASH security scanning, during internal AWS development of applications
include:
- component: code.aws.dev/proserve/automated-security-helper/automated-security-helper/ash@~latest
# Any publicly available python image
image: public.ecr.aws/docker/library/python:3.13-bookworm
stages:
- developer_tests
- test # Need this name specifically for ASH scanning
- deploy
developer_tests:
stage: developer_tests
before_script:
- python --version
- apt-get update -y
- apt-get install make -y
- pip install ruff
- curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
- apt-get install -y nodejs
- cd frontend && npm ci && cd ..
script:
- make lint-cicd
# Override ASH job to depend on developer_tests passing
ash-sast:
needs: ["developer_tests"]
# GitLab Pages deployment job - must be named "pages" to trigger Pages deployment
# Builds MkDocs documentation and publishes to https://<namespace>.gitlab.io/<project-name>/
pages:
stage: deploy # Runs after tests pass
image: public.ecr.aws/docker/library/python:3.13-bookworm # Python required for mkdocs
before_script:
- pip install -r .mkdocs/requirements.txt # Install mkdocs, material theme, and plugins
script:
- cd .mkdocs
- mkdocs build --site-dir ../public # Build to public/ (required by GitLab Pages)
artifacts:
paths:
- public # GitLab Pages serves content from this directory
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Deploy only on main/master branch