Skip to content

Commit

Permalink
Merge pull request #112 from snyk/develop
Browse files Browse the repository at this point in the history
Merge develop into master for release
  • Loading branch information
maxjeffos authored May 23, 2021
2 parents ee6dbc8 + fb8e117 commit 7eba33f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 33 deletions.
33 changes: 2 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
command: |
node ./ops/deploy/dist/run-test-pipelines.js
build_prod:
deploy_prod:
docker:
- image: circleci/node:lts
environment:
Expand Down Expand Up @@ -117,27 +117,6 @@ jobs:
- store_artifacts:
path: ./Snyk-snyk-security-scan.vsix

- persist_to_workspace:
root: .
paths:
- ./Snyk-snyk-security-scan.vsix

publish:
docker:
- image: circleci/node:lts
environment:
AZ_EXTENSION_ID: "snyk-security-scan"
AZ_EXTENSION_NAME: "Snyk Security Scan"
AZ_PUBLISHER: "Snyk"
working_directory: ~/repo
steps:
- attach_workspace:
at: ~/repo
- run:
name: Publish to Marketplace
command: |
tfx extension publish --token $AZURE_DEVOPS_EXT_PAT --vsix Snyk-snyk-security-scan.vsix

workflows:
version: 2
Expand All @@ -150,18 +129,10 @@ workflows:
filters:
branches:
ignore: master
- build_prod:
- deploy_prod:
context: nodejs-lib-release
requires:
- test
filters:
branches:
only: master
- hold:
type: approval
requires:
- build_prod
- publish:
context: nodejs-lib-release
requires:
- hold
21 changes: 19 additions & 2 deletions scripts/ci-deploy-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,27 @@ tfx extension create \
--token $AZURE_DEVOPS_EXT_PAT \
--output-path Snyk-snyk-security-scan.vsix

create_exit_code=$?
if [[ create_exit_code -eq 0 ]]; then
echo "Extension created"
ls -la
else
echo "Failed to create extension with exit code ${create_exit_code}"
exit ${create_exit_code}
fi

if [[ ! -f "Snyk-snyk-security-scan.vsix" ]]; then
echo "missing Snyk-snyk-security-scan.vsix file, not publishing extension"
exit 1
fi

echo "Snyk-snyk-security-scan.vsix file exists, publishing extension..."
tfx extension publish --token $AZURE_DEVOPS_EXT_PAT --vsix Snyk-snyk-security-scan.vsix

publish_exit_code=$?
if [[ publish_exit_code -eq 0 ]]; then
echo "Extension created"
echo "Extension published"
else
echo "Extension failed to create extension with exit code ${publish_exit_code}"
echo "Failed to publish extension with exit code ${publish_exit_code}"
exit ${publish_exit_code}
fi

0 comments on commit 7eba33f

Please sign in to comment.