Skip to content

Commit

Permalink
Merge pull request #5060 from snyk/main
Browse files Browse the repository at this point in the history
chore: merge temporary main into master
  • Loading branch information
PeterSchafer authored Feb 20, 2024
2 parents 023f633 + e78bad6 commit 7f18d81
Show file tree
Hide file tree
Showing 33 changed files with 5,386 additions and 4,578 deletions.
6 changes: 6 additions & 0 deletions .circleci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
jq \
faketime \
zip \
cmake \
nodejs=$(apt-cache policy nodejs | grep nodesource | xargs | cut -d " " -f2)
RUN node -v
RUN apt-get auto-remove -y && apt-get clean -y && rm -rf /var/lib/apt/
Expand Down Expand Up @@ -74,5 +75,10 @@ ENV TEMP=/tmp
ENV TMP=$TEMP
ENV TMPDIR=$TEMP

# install rust and convco
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN ~/.cargo/bin/cargo install convco
ENV PATH=/home/circleci/.cargo/bin:$PATH

WORKDIR /
ENTRYPOINT [""]
78 changes: 40 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '2.1'
version: 2.1

parameters:
cli_download_base_url:
Expand Down Expand Up @@ -27,8 +27,8 @@ parameters:
default: '2.7.0'

orbs:
prodsec: snyk/prodsec-orb@1.0
snyk: snyk/snyk@1.7.0
prodsec: snyk/prodsec-orb@1
snyk: snyk/snyk@2.0.3
aws-cli: circleci/aws-cli@2.0.3
gh: circleci/github-cli@2.1.0

Expand All @@ -38,12 +38,12 @@ executors:
- image: alpine:3.17
docker-amd64:
docker:
- image: bastiandoetsch209/cli-build:20231210-192113
- image: bastiandoetsch209/cli-build:20240214-145818
working_directory: /mnt/ramdisk/snyk
resource_class: large
docker-arm64:
docker:
- image: bastiandoetsch209/cli-build-arm64:20231210-192113
- image: bastiandoetsch209/cli-build-arm64:20240214-145818
working_directory: /mnt/ramdisk/snyk
resource_class: arm.large
linux-ubuntu-mantic-amd64:
Expand Down Expand Up @@ -326,7 +326,7 @@ commands:
steps:
- when:
condition:
equal: [master, << pipeline.git.branch >>]
equal: [main, << pipeline.git.branch >>]
steps:
- run:
name: Handling failed release
Expand All @@ -348,25 +348,24 @@ commands:
####################################################################################################

workflows:
version: 2
test_and_release:
jobs:
- prodsec/secrets-scan:
name: secrets-scan
context: snyk-bot-slack
channel: hammerhead-alerts
channel: cli-alerts

- prepare-build:
requires:
- secrets-scan

- code-analysis:
context: hammerhead-snyk-orb-snyk-creds
context: devex_cli
requires:
- prepare-build
filters:
branches:
ignore: master
ignore: main

- test-node:
context:
Expand All @@ -376,7 +375,7 @@ workflows:
- prepare-build
filters:
branches:
ignore: master
ignore: main

- test-go:
context:
Expand All @@ -386,7 +385,7 @@ workflows:
- prepare-build
filters:
branches:
ignore: master
ignore: main

- test-legacy-tap:
context:
Expand All @@ -396,7 +395,7 @@ workflows:
- prepare-build
filters:
branches:
ignore: master
ignore: main

- build-special-artifacts:
name: build fix & protect
Expand Down Expand Up @@ -477,7 +476,7 @@ workflows:
context: team_hammerhead-cli
filters:
branches:
ignore: master
ignore: main
requires:
- build linux amd64
test_snyk_command: ./binary-releases/snyk-linux
Expand All @@ -489,7 +488,7 @@ workflows:
- team_hammerhead-cli
filters:
branches:
ignore: master
ignore: main
requires:
- build linux amd64
executor: docker-amd64
Expand All @@ -502,7 +501,7 @@ workflows:
- team_hammerhead-cli
filters:
branches:
ignore: master
ignore: main
requires:
- build linux arm64
executor: docker-arm64
Expand All @@ -518,7 +517,7 @@ workflows:
- team_hammerhead-cli
filters:
branches:
ignore: master
ignore: main
requires:
- build linux arm64

Expand All @@ -529,7 +528,7 @@ workflows:
- team_hammerhead-cli
filters:
branches:
ignore: master
ignore: main
requires:
- build alpine amd64
executor: alpine
Expand All @@ -544,7 +543,7 @@ workflows:
- team_hammerhead-cli
filters:
branches:
ignore: master
ignore: main
requires:
- build macOS arm64
executor: macos-arm64
Expand All @@ -558,7 +557,7 @@ workflows:
- team_hammerhead-cli
filters:
branches:
ignore: master
ignore: main
requires:
- build windows amd64
executor: win-server2022-amd64
Expand All @@ -580,7 +579,7 @@ workflows:
filters:
branches:
only:
- master
- main
- '/.*e2e.*/'

- sign:
Expand All @@ -595,7 +594,7 @@ workflows:
filters:
branches:
only:
- master
- main
- '/.*e2e.*/'

- sign:
Expand All @@ -610,7 +609,7 @@ workflows:
filters:
branches:
only:
- master
- main
- '/.*e2e.*/'

- create_deployment_artifacts:
Expand All @@ -627,7 +626,7 @@ workflows:
filters:
branches:
only:
- master
- main
- '/.*e2e.*/'

- should-release:
Expand All @@ -638,7 +637,7 @@ workflows:
filters:
branches:
only:
- master
- main
- '/.*e2e.*/'

- pre-release:
Expand All @@ -649,7 +648,7 @@ workflows:
filters:
branches:
only:
- master
- main
- '/.*e2e.*/'

- npm-validation:
Expand All @@ -666,7 +665,7 @@ workflows:
filters:
branches:
only:
- master
- main
- '/.*e2e.*/'

- test-release:
Expand Down Expand Up @@ -694,7 +693,7 @@ workflows:
filters:
branches:
only:
- master
- main
- '/.*e2e.*/'

- test-release:
Expand All @@ -709,7 +708,7 @@ workflows:
filters:
branches:
only:
- master
- main
- '/.*e2e.*/'

- test-release:
Expand All @@ -724,7 +723,7 @@ workflows:
filters:
branches:
only:
- master
- main
- '/.*e2e.*/'

- release-s3:
Expand Down Expand Up @@ -753,7 +752,7 @@ workflows:
- e2e fips tests (win-server2022-amd64)
filters:
branches:
only: master
only: main

- release-s3:
name: upload latest
Expand All @@ -763,7 +762,7 @@ workflows:
- upload preview
filters:
branches:
only: master
only: main

- release-github:
name: upload github
Expand All @@ -773,7 +772,7 @@ workflows:
filters:
branches:
only:
- master
- main
- release-npm:
name: upload npm
context: team-hammerhead-common-deploy-tokens
Expand All @@ -782,7 +781,7 @@ workflows:
filters:
branches:
only:
- master
- main

- trigger-building-snyk-images:
name: Trigger building snyk-images
Expand All @@ -792,7 +791,7 @@ workflows:
filters:
branches:
only:
- master
- main

####################################################################################################
# JOBS
Expand All @@ -808,7 +807,9 @@ jobs:
command: npm ci
- run:
name: Set version
command: make binary-releases/version binary-releases/fips/version
command: |
make binary-releases/version binary-releases/fips/version
make ts-cli-binaries/version BINARY_RELEASES_FOLDER_TS_CLI=ts-cli-binaries
- run:
# required for one unit test (ts-binary-wrapper/test/unit/common.spec.ts:15:30)
# consider removing this run
Expand All @@ -821,6 +822,7 @@ jobs:
root: .
paths:
- binary-releases/*
- ts-cli-binaries/*
- binary-releases/fips/*
- node_modules/*
- ts-binary-wrapper/*
Expand All @@ -836,7 +838,7 @@ jobs:
command: |
npm run lint
pushd cliv2
make lint
make lint
popd
- snyk/scan:
fail-on-issues: true
Expand Down Expand Up @@ -979,7 +981,7 @@ jobs:
name: Running acceptance tests
command: |
<< parameters.pre_test_cmds >>
npm run test:acceptance -- --selectProjects snyk
npm run test:acceptance -- --selectProjects coreCli
environment:
TEST_SNYK_FIPS: << parameters.fips >>
TEST_SNYK_COMMAND: << parameters.test_snyk_command >>
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Please check the boxes once done.
The pull request must:

- **Reviewer Documentation**
- [ ] follow [CONTRIBUTING](https://github.com/snyk/cli/blob/master/CONTRIBUTING.md) rules
- [ ] follow [CONTRIBUTING](https://github.com/snyk/cli/blob/main/CONTRIBUTING.md) rules
- [ ] be accompanied by a detailed description of the changes
- [ ] contain a risk assessment of the change (Low | Medium | High) with regards to breaking existing functionality. A change e.g. of an underlying language plugin can completely break the functionality for that language, but appearing as only a version change in the dependencies.
- [ ] highlight breaking API if applicable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Check Dependencies'

on:
pull_request:
branches: [master]
branches: [master, main]

jobs:
check-dependencies:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/danger-zone.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 'Danger Zone'
on:
pull_request:
branches: [master]
branches: [master, main]

jobs:
build:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ tap-output
.tap
# Jest
coverage
test/fixtures/basic-swift/.build
test/fixtures/basic-swift/Package.resolved
Loading

0 comments on commit 7f18d81

Please sign in to comment.