Skip to content

Commit

Permalink
Merge pull request #3177 from snyk/chore/v2-arm64
Browse files Browse the repository at this point in the history
chore(ci): build and test v2 arm64 binaries
  • Loading branch information
Jahed Ahmed committed Apr 28, 2022
2 parents 6402857 + 572165f commit d5bd7ce
Showing 1 changed file with 41 additions and 8 deletions.
49 changes: 41 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ jobs:
environment:
TEST_SNYK_COMMAND: << parameters.test_snyk_command >>
test-linux-arm64:
parameters:
test_snyk_command:
type: string
executor: linux-arm64
working_directory: /home/circleci/snyk
steps:
Expand All @@ -398,12 +401,12 @@ jobs:
npm_cache_directory: /home/circleci/.npm
- run:
name: Configuring artifact
command: /home/circleci/snyk/binary-releases/snyk-linux-arm64 config set "api=${SNYK_API_KEY}"
command: << parameters.test_snyk_command >> config set "api=${SNYK_API_KEY}"
- run:
name: Testing artifact
command: npm run test:acceptance
command: npm run test:acceptance -- --selectProjects snyk
environment:
TEST_SNYK_COMMAND: /home/circleci/snyk/binary-releases/snyk-linux-arm64
TEST_SNYK_COMMAND: << parameters.test_snyk_command >>
test-jest:
parameters:
node_version:
Expand Down Expand Up @@ -543,6 +546,14 @@ jobs:
GOARCH: amd64
CLI_V1_LOCATION: ../binary-releases
command: make build build-test install prefix=. -e
- run:
name: Build linux/arm64
working_directory: ./cliv2
environment:
GOOS: linux
GOARCH: arm64
CLI_V1_LOCATION: ../binary-releases
command: make build build-test install prefix=. -e
- run:
name: Build darwin/amd64
working_directory: ./cliv2
Expand Down Expand Up @@ -577,8 +588,6 @@ jobs:
- checkout
- attach_workspace:
at: .
- go/install:
version: << pipeline.parameters.go_version >>
- run:
name: Run integration tests
working_directory: ./cliv2
Expand Down Expand Up @@ -607,15 +616,29 @@ jobs:
export SNYK_TOKEN="${SNYK_API_KEY}"
./bin/snyk_tests_linux_amd64
v2-test-linux-arm64:
executor: linux-arm64
working_directory: /home/circleci/snyk
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Run integration tests
working_directory: ./cliv2
environment:
TEST_SNYK_EXECUTABLE_PATH: ./bin/snyk_linux_arm64
command: |
export SNYK_TOKEN="${SNYK_API_KEY}"
./bin/snyk_tests_linux_arm64
v2-test-darwin-amd64:
executor: macos
working_directory: /Users/distiller/snyk
steps:
- checkout
- attach_workspace:
at: .
- go/install:
version: << pipeline.parameters.go_version >>
- run:
name: Run integration tests
working_directory: ./cliv2
Expand All @@ -632,7 +655,6 @@ jobs:
- checkout
- attach_workspace:
at: .
- install_sdks_windows
- run:
name: Run integration tests
working_directory: ./cliv2
Expand Down Expand Up @@ -721,6 +743,7 @@ workflows:
context: nodejs-install
requires:
- Build Artifacts
test_snyk_command: /home/circleci/snyk/binary-releases/snyk-linux-arm64
- regression-test:
name: Regression Tests
context: nodejs-install
Expand Down Expand Up @@ -774,6 +797,10 @@ workflows:
name: v2 / Proxy Integration Tests (linux/amd64)
requires:
- v2 / Build Artifacts
- v2-test-linux-arm64:
name: v2 / Integration Tests (linux/arm64)
requires:
- v2 / Build Artifacts
- v2-test-darwin-amd64:
name: v2 / Integration Tests (darwin/amd64)
requires:
Expand All @@ -793,6 +820,12 @@ workflows:
requires:
- v2 / Build Artifacts
test_snyk_command: /home/circleci/snyk/cliv2/bin/snyk_linux_amd64
- test-linux-arm64:
name: v2 / Jest Acceptance Tests (linux/arm64)
context: nodejs-install
requires:
- v2 / Build Artifacts
test_snyk_command: /home/circleci/snyk/cliv2/bin/snyk_linux_arm64
- test-windows:
name: v2 / Jest Acceptance Tests (windows/amd64)
context: nodejs-install
Expand Down

0 comments on commit d5bd7ce

Please sign in to comment.