Skip to content

Commit

Permalink
MAN-227 - reenable circleci steps
Browse files Browse the repository at this point in the history
  • Loading branch information
achimber-moj committed Dec 19, 2024
1 parent 11dca1d commit 9596b17
Showing 1 changed file with 142 additions and 142 deletions.
284 changes: 142 additions & 142 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,78 +27,78 @@ jobs:
tag: << pipeline.parameters.node-version >>
steps:
- checkout
# - run:
# name: Update npm
# command: 'sudo npm install -g npm@latest'
# - restore_cache:
# key: dependency-cache-{{ checksum "package-lock.json" }}
# - run:
# name: Install Dependencies
# command: npm ci --no-audit
# - save_cache:
# key: dependency-cache-{{ checksum "package-lock.json" }}
# paths:
# - node_modules
# - ~/.cache
# - run:
# command: |
# npm run build
# - run: # Run linter after build because the integration test code depend on compiled typescript...
# name: Linter check
# command: npm run lint
# - persist_to_workspace:
# root: .
# paths:
# - node_modules
# - build
# - dist
# - assets/stylesheets
- run:
name: Update npm
command: 'sudo npm install -g npm@10'
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Install Dependencies
command: npm ci --no-audit
- save_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
paths:
- node_modules
- ~/.cache
- run:
command: |
npm run build
- run: # Run linter after build because the integration test code depend on compiled typescript...
name: Linter check
command: npm run lint
- persist_to_workspace:
root: .
paths:
- node_modules
- build
- dist
- assets/stylesheets

# unit_test:
# executor:
# name: hmpps/node
# tag: << pipeline.parameters.node-version >>
# steps:
# - checkout
# - restore_cache:
# key: dependency-cache-{{ checksum "package-lock.json" }}
# - run:
# name: unit tests
# command: npm run test:ci
# - store_test_results:
# path: test_results
# - store_artifacts:
# path: test_results/unit-test-reports.html
#
# integration_test:
# executor:
# name: hmpps/node
# tag: << pipeline.parameters.node-version >>
# steps:
# - checkout
# - attach_workspace:
# at: ~/app
# - run:
# name: Install missing OS dependency
# command: sudo apt-get install libxss1
# - restore_cache:
# key: dependency-cache-{{ checksum "package-lock.json" }}
# - run:
# name: Run the node app.
# command: npm run start-feature
# background: true
# - run:
# name: Wait for node app to start
# command: sleep 5
# - run:
# name: integration tests
# command: npm run int-test
# - store_test_results:
# path: test_results
# - store_artifacts:
# path: integration_tests/videos
# - store_artifacts:
# path: integration_tests/screenshots
unit_test:
executor:
name: hmpps/node
tag: << pipeline.parameters.node-version >>
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: unit tests
command: npm run test:ci
- store_test_results:
path: test_results
- store_artifacts:
path: test_results/unit-test-reports.html

integration_test:
executor:
name: hmpps/node
tag: << pipeline.parameters.node-version >>
steps:
- checkout
- attach_workspace:
at: ~/app
- run:
name: Install missing OS dependency
command: sudo apt-get install libxss1
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Run the node app.
command: npm run start-feature
background: true
- run:
name: Wait for node app to start
command: sleep 5
- run:
name: integration tests
command: npm run int-test
- store_test_results:
path: test_results
- store_artifacts:
path: integration_tests/videos
- store_artifacts:
path: integration_tests/screenshots

workflows:
version: 2
Expand All @@ -108,77 +108,77 @@ workflows:
filters:
tags:
ignore: /.*/
# - unit_test:
# requires:
# - build
# - integration_test:
# requires:
# - build
# - hmpps/helm_lint:
# name: helm_lint
# - hmpps/build_docker:
# name: build_docker
# additional_docker_build_args: --secret id=sentry,env=SENTRY_AUTH_TOKEN
# filters:
# branches:
# only:
# - main
# - hmpps/deploy_env:
# name: deploy_dev
# env: "dev"
# jira_update: true
# pipeline_id: <<pipeline.id>>
# pipeline_number: <<pipeline.number>>
# context: hmpps-common-vars
# filters:
# branches:
# only:
# - main
# requires:
# - helm_lint
# - unit_test
# - integration_test
# - build_docker
# helm_timeout: 5m
# - hmpps/deploy_env:
# name: deploy_preprod
# env: "preprod"
# jira_update: true
# jira_env_type: staging
# pipeline_id: <<pipeline.id>>
# pipeline_number: <<pipeline.number>>
# context:
# - hmpps-common-vars
# - hmpps-manage-a-supervision-ui-preprod
# filters:
# branches:
# only:
# - main
# requires:
# - helm_lint
# - unit_test
# - integration_test
# - build_docker
# helm_timeout: 5m
# - request-prod-approval:
# type: approval
# requires:
# - deploy_preprod
# - hmpps/deploy_env:
# name: deploy_prod
# env: "prod"
# jira_update: true
# jira_env_type: production
# pipeline_id: <<pipeline.id>>
# pipeline_number: <<pipeline.number>>
# slack_notification: true
# slack_channel_name: << pipeline.parameters.releases-slack-channel >>
# context:
# - hmpps-common-vars
# - hmpps-manage-a-supervision-ui-prod
# requires:
# - request-prod-approval
# helm_timeout: 5m
- unit_test:
requires:
- build
- integration_test:
requires:
- build
- hmpps/helm_lint:
name: helm_lint
- hmpps/build_docker:
name: build_docker
additional_docker_build_args: --secret id=sentry,env=SENTRY_AUTH_TOKEN
filters:
branches:
only:
- main
- hmpps/deploy_env:
name: deploy_dev
env: "dev"
jira_update: true
pipeline_id: <<pipeline.id>>
pipeline_number: <<pipeline.number>>
context: hmpps-common-vars
filters:
branches:
only:
- main
requires:
- helm_lint
- unit_test
- integration_test
- build_docker
helm_timeout: 5m
- hmpps/deploy_env:
name: deploy_preprod
env: "preprod"
jira_update: true
jira_env_type: staging
pipeline_id: <<pipeline.id>>
pipeline_number: <<pipeline.number>>
context:
- hmpps-common-vars
- hmpps-manage-a-supervision-ui-preprod
filters:
branches:
only:
- main
requires:
- helm_lint
- unit_test
- integration_test
- build_docker
helm_timeout: 5m
# - request-prod-approval:
# type: approval
# requires:
# - deploy_preprod
# - hmpps/deploy_env:
# name: deploy_prod
# env: "prod"
# jira_update: true
# jira_env_type: production
# pipeline_id: <<pipeline.id>>
# pipeline_number: <<pipeline.number>>
# slack_notification: true
# slack_channel_name: << pipeline.parameters.releases-slack-channel >>
# context:
# - hmpps-common-vars
# - hmpps-manage-a-supervision-ui-prod
# requires:
# - request-prod-approval
# helm_timeout: 5m

security:
triggers:
Expand Down

0 comments on commit 9596b17

Please sign in to comment.