From b41c9e11dd07a36d1b9ce7bad2da98eabfbc64b5 Mon Sep 17 00:00:00 2001 From: Trombitas Imre-Sandor Date: Fri, 12 Jul 2024 11:30:15 +0300 Subject: [PATCH] test: direct download --- .circleci/config.yml | 83 +++++++++++--------------------------------- 1 file changed, 20 insertions(+), 63 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 04c4a8d..1d2d4a4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,77 +1,34 @@ -# This config was automatically generated from your source code -# Stacks detected: cicd:github-actions:.github/workflows,cicd:gitlab-workflows:.,deps:node:. version: 2.1 -orbs: - node: circleci/node@5 - snyk: snyk/snyk@2.1.0 jobs: snyk_scan: docker: - - image: cimg/node2:lts + - image: cimg/node:lts steps: - checkout - run: npm ci - - snyk/install - run: - command: snyk version - name: Which version of snyk is installed + name: Download Snyk CLI + command: | + curl -Lo snyk-linux https://static.snyk.io/cli/latest/snyk-linux - run: - command: snyk code test - name: Run code scan - test-node: - # Install node dependencies and run tests - executor: node/default - steps: - - checkout - - node/install-packages: - pkg-manager: npm - - run: - name: Run tests - command: echo \"No test specified in package.json\" - build-node: - # Build node project - executor: node/default - steps: - - checkout - - node/install-packages: - pkg-manager: npm - - run: - command: npm run build - - run: - name: Create the ~/artifacts directory if it doesn't exist - command: mkdir -p ~/artifacts - # Copy output to artifacts dir - - run: - name: Copy artifacts - command: cp -R build dist public .output .next .docusaurus ~/artifacts 2>/dev/null || true - - store_artifacts: - path: ~/artifacts - destination: node-build - deploy: - # This is an example deploy job, not actually used by the workflow - docker: - - image: cimg/base:stable - steps: - # Replace this with steps to deploy to users + name: Download Snyk CLI SHA256 Checksum + command: | + curl -Lo snyk-linux.sha256 https://static.snyk.io/cli/latest/snyk-linux.sha256 - run: - name: deploy - command: '#e.g. ./deploy.sh' + name: Verify SHA256 Checksum + command: | + sha256sum -c snyk-linux.sha256 - run: - name: found github actions config - command: ':' + name: Install Snyk CLI + command: | + chmod +x snyk-linux + ./snyk-linux --version - run: - name: found gitlab workflows config - command: ':' + name: Run Snyk to test project dependencies + command: | + ./snyk-linux test workflows: - build-and-test: + version: 2 + build_and_scan: jobs: - - test-node - - snyk_scan: - requires: - - test-node - - build-node: - requires: - - test-node - # - deploy: - # requires: - # - build-node + - snyk_scan \ No newline at end of file