Skip to content

Commit

Permalink
fix: pre-release validation
Browse files Browse the repository at this point in the history
Updated config.yml
  • Loading branch information
PeterSchafer committed Feb 15, 2023
1 parent 5648ff2 commit 5d02cbc
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 122 deletions.
240 changes: 120 additions & 120 deletions .circleci/config.yml
Expand Up @@ -995,27 +995,27 @@ workflows:
name: Build
requires:
- Install
- test-jest:
name: Jest Tests (Node v<< matrix.node_version >>)
context: nodejs-install
requires:
- Build
matrix:
parameters:
node_version: ['12.22.11', '14.20.0', '16.16.0']
npm_global_sudo: [true, false]
exclude:
- node_version: '12.22.11'
npm_global_sudo: false
- node_version: '14.20.0'
npm_global_sudo: false
- node_version: '16.16.0'
npm_global_sudo: true
- test-tap:
name: Tap Tests
context: nodejs-install
requires:
- Build
# - test-jest:
# name: Jest Tests (Node v<< matrix.node_version >>)
# context: nodejs-install
# requires:
# - Build
# matrix:
# parameters:
# node_version: ['12.22.11', '14.20.0', '16.16.0']
# npm_global_sudo: [true, false]
# exclude:
# - node_version: '12.22.11'
# npm_global_sudo: false
# - node_version: '14.20.0'
# npm_global_sudo: false
# - node_version: '16.16.0'
# npm_global_sudo: true
# - test-tap:
# name: Tap Tests
# context: nodejs-install
# requires:
# - Build
- version:
name: Version
requires:
Expand All @@ -1039,36 +1039,36 @@ workflows:
- snyk-for-docker-desktop-darwin-x64.tar.gz
- snyk-for-docker-desktop-darwin-arm64.tar.gz
- docker-mac-signed-bundle.tar.gz
- test-windows:
name: Acceptance Tests (snyk-win.exe)
context: nodejs-install
requires:
- Build (snyk-win.exe)
test_snyk_command: C:\Users\circleci\snyk\binary-releases\snyk-win.exe
- test-macos:
name: Acceptance Tests (snyk-macos)
context: nodejs-install
requires:
- Build (snyk-macos)
test_snyk_command: /Users/distiller/snyk/binary-releases/snyk-macos
- test-linux:
name: Acceptance Tests (snyk-linux)
context: nodejs-install
requires:
- Build (snyk-linux)
test_snyk_command: /home/circleci/snyk/binary-releases/snyk-linux
- test-linux-arm64:
name: Acceptance Tests (snyk-linux-arm64)
context: nodejs-install
requires:
- Build (snyk-linux-arm64)
test_snyk_command: /home/circleci/snyk/binary-releases/snyk-linux-arm64
- regression-test:
name: Regression Tests (snyk-linux)
context: nodejs-install
requires:
- Build (snyk-linux)
test_snyk_command: /mnt/ramdisk/snyk/binary-releases/snyk-linux
# - test-windows:
# name: Acceptance Tests (snyk-win.exe)
# context: nodejs-install
# requires:
# - Build (snyk-win.exe)
# test_snyk_command: C:\Users\circleci\snyk\binary-releases\snyk-win.exe
# - test-macos:
# name: Acceptance Tests (snyk-macos)
# context: nodejs-install
# requires:
# - Build (snyk-macos)
# test_snyk_command: /Users/distiller/snyk/binary-releases/snyk-macos
# - test-linux:
# name: Acceptance Tests (snyk-linux)
# context: nodejs-install
# requires:
# - Build (snyk-linux)
# test_snyk_command: /home/circleci/snyk/binary-releases/snyk-linux
# - test-linux-arm64:
# name: Acceptance Tests (snyk-linux-arm64)
# context: nodejs-install
# requires:
# - Build (snyk-linux-arm64)
# test_snyk_command: /home/circleci/snyk/binary-releases/snyk-linux-arm64
# - regression-test:
# name: Regression Tests (snyk-linux)
# context: nodejs-install
# requires:
# - Build (snyk-linux)
# test_snyk_command: /mnt/ramdisk/snyk/binary-releases/snyk-linux
- prepare-release:
name: Prepare Release
context:
Expand All @@ -1090,15 +1090,15 @@ workflows:
requires:
- Prepare Release
- Lint
- Tap Tests
- Jest Tests (Node v12.22.11)
- Jest Tests (Node v14.20.0)
- Jest Tests (Node v16.16.0)
- Acceptance Tests (snyk-win.exe)
- Acceptance Tests (snyk-macos)
- Acceptance Tests (snyk-linux)
- Acceptance Tests (snyk-linux-arm64)
- Regression Tests (snyk-linux)
# - Tap Tests
# - Jest Tests (Node v12.22.11)
# - Jest Tests (Node v14.20.0)
# - Jest Tests (Node v16.16.0)
# - Acceptance Tests (snyk-win.exe)
# - Acceptance Tests (snyk-macos)
# - Acceptance Tests (snyk-linux)
# - Acceptance Tests (snyk-linux-arm64)
# - Regression Tests (snyk-linux)
filters:
branches:
only:
Expand Down Expand Up @@ -1188,67 +1188,67 @@ workflows:
go_os: alpine
go_arch: amd64
c_compiler: /usr/bin/musl-gcc
- v2-test-linux-amd64:
name: v2 / Integration Tests (linux/amd64)
requires:
- v2 / Rename linux/amd64 artifact
- v2-test-proxy-linux-amd64:
name: v2 / Proxy Integration Tests (linux/amd64)
requires:
- v2 / Rename linux/amd64 artifact
- v2-test-linux-arm64:
name: v2 / Integration Tests (linux/arm64)
requires:
- v2 / Rename linux/arm64 artifact
- v2-test-darwin-amd64:
name: v2 / Integration Tests (darwin/amd64)
requires:
- v2 / Rename macos/amd64 artifact
- v2-test-windows-amd64:
name: v2 / Integration Tests (windows/amd64)
requires:
- v2 / Rename windows/amd64 artifact
- v2-test-proxy-windows-amd64:
name: v2 / Proxy Integration Tests (windows/amd64)
requires:
- v2 / Rename windows/amd64 artifact
# - v2-test-linux-amd64:
# name: v2 / Integration Tests (linux/amd64)
# requires:
# - v2 / Rename linux/amd64 artifact
# - v2-test-proxy-linux-amd64:
# name: v2 / Proxy Integration Tests (linux/amd64)
# requires:
# - v2 / Rename linux/amd64 artifact
# - v2-test-linux-arm64:
# name: v2 / Integration Tests (linux/arm64)
# requires:
# - v2 / Rename linux/arm64 artifact
# - v2-test-darwin-amd64:
# name: v2 / Integration Tests (darwin/amd64)
# requires:
# - v2 / Rename macos/amd64 artifact
# - v2-test-windows-amd64:
# name: v2 / Integration Tests (windows/amd64)
# requires:
# - v2 / Rename windows/amd64 artifact
# - v2-test-proxy-windows-amd64:
# name: v2 / Proxy Integration Tests (windows/amd64)
# requires:
# - v2 / Rename windows/amd64 artifact
# Tests for backwards compatibility with CLIv1
- test-alpine:
name: v2 / Jest Acceptance Tests (alpine/amd64)
context: nodejs-install
requires:
- v2 / Build (alpine/amd64)
test_snyk_command: /home/circleci/snyk/cliv2/bin/snyk_alpine_amd64
- test-linux:
name: v2 / Jest Acceptance Tests (linux/amd64)
context: nodejs-install
requires:
- v2 / Rename linux/amd64 artifact
test_snyk_command: /home/circleci/snyk/cliv2/bin/snyk-linux
- test-linux-arm64:
name: v2 / Jest Acceptance Tests (linux/arm64)
context: nodejs-install
requires:
- v2 / Rename linux/arm64 artifact
test_snyk_command: /home/circleci/snyk/cliv2/bin/snyk-linux-arm64
- test-windows:
name: v2 / Jest Acceptance Tests (windows/amd64)
context: nodejs-install
requires:
- v2 / Rename windows/amd64 artifact
test_snyk_command: C:\Users\circleci\snyk\cliv2\bin\snyk-win.exe
- test-macos:
name: v2 / Jest Acceptance Tests (darwin/amd64)
context: nodejs-install
requires:
- v2 / Rename macos/amd64 artifact
test_snyk_command: /Users/distiller/snyk/cliv2/bin/snyk-macos
- regression-test:
name: v2 / Regression Tests (linux/amd64)
context: nodejs-install
requires:
- v2 / Rename linux/amd64 artifact
test_snyk_command: /mnt/ramdisk/snyk/cliv2/bin/snyk-linux
# - test-alpine:
# name: v2 / Jest Acceptance Tests (alpine/amd64)
# context: nodejs-install
# requires:
# - v2 / Build (alpine/amd64)
# test_snyk_command: /home/circleci/snyk/cliv2/bin/snyk_alpine_amd64
# - test-linux:
# name: v2 / Jest Acceptance Tests (linux/amd64)
# context: nodejs-install
# requires:
# - v2 / Rename linux/amd64 artifact
# test_snyk_command: /home/circleci/snyk/cliv2/bin/snyk-linux
# - test-linux-arm64:
# name: v2 / Jest Acceptance Tests (linux/arm64)
# context: nodejs-install
# requires:
# - v2 / Rename linux/arm64 artifact
# test_snyk_command: /home/circleci/snyk/cliv2/bin/snyk-linux-arm64
# - test-windows:
# name: v2 / Jest Acceptance Tests (windows/amd64)
# context: nodejs-install
# requires:
# - v2 / Rename windows/amd64 artifact
# test_snyk_command: C:\Users\circleci\snyk\cliv2\bin\snyk-win.exe
# - test-macos:
# name: v2 / Jest Acceptance Tests (darwin/amd64)
# context: nodejs-install
# requires:
# - v2 / Rename macos/amd64 artifact
# test_snyk_command: /Users/distiller/snyk/cliv2/bin/snyk-macos
# - regression-test:
# name: v2 / Regression Tests (linux/amd64)
# context: nodejs-install
# requires:
# - v2 / Rename linux/amd64 artifact
# test_snyk_command: /mnt/ramdisk/snyk/cliv2/bin/snyk-linux
- v2-sign-darwin-amd64:
name: v2 / Sign (darwin/amd64)
context: snyk-macos-signing
Expand Down
7 changes: 5 additions & 2 deletions release-scripts/validate-repository.sh
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
set -uo pipefail

VERSION_TAG="v$(cat binary-releases/version)"

if git -P tag --list --contains; then
TAG_FOUND=$(git -P tag --list --contains)
if [ "${TAG_FOUND}" != "" ]; then
echo "This commit has already been released."
exit 1
fi
Expand All @@ -13,3 +14,5 @@ if [ "${?}" -eq "0" ]; then
echo "Version ${VERSION_TAG} has already been released."
exit 1
fi

echo "Version ${VERSION_TAG} LGTM!"

0 comments on commit 5d02cbc

Please sign in to comment.