diff --git a/.circleci/orb/orb-inline.yml b/.circleci/orb/orb-inline.yml index 12585b7..015591a 100644 --- a/.circleci/orb/orb-inline.yml +++ b/.circleci/orb/orb-inline.yml @@ -135,9 +135,9 @@ orbs: - attach_workspace: at: /tmp/workspace - run: cp apkpure_app_887.apk /tmp/workspace/test.apk - - run: curl -Ls https://github.com/nowsecure/auto-circleci-plugin/archive/1.2.0.tar.gz | tar -xzf - -C . + - run: curl -Ls https://github.com/nowsecure/auto-circleci-plugin/archive/1.2.1.tar.gz | tar -xzf - -C . - run: - command: cd auto-circleci-plugin-1.2.0 && ./gradlew run -Dauto.url=<< parameters.auto_url >> -Dauto.token=<< parameters.auto_token >> -Dauto.dir=<< parameters.auto_dir >> -Dauto.file=<< parameters.auto_file >> -Dauto.group=<< parameters.auto_group >> -Dauto.wait=<< parameters.auto_wait >> -Dauto.score=<< parameters.auto_score >> -Dauto.username=<> -Dauto.password=<> -Dauto.show.status.messages=<> -Dauto.stop.tests.on.status=<> + command: cd auto-circleci-plugin-1.2.1 && ./gradlew run -Dauto.url=<< parameters.auto_url >> -Dauto.token=<< parameters.auto_token >> -Dauto.dir=<< parameters.auto_dir >> -Dauto.file=<< parameters.auto_file >> -Dauto.group=<< parameters.auto_group >> -Dauto.wait=<< parameters.auto_wait >> -Dauto.score=<< parameters.auto_score >> -Dauto.username=<> -Dauto.password=<> -Dauto.show.status.messages=<> -Dauto.stop.tests.on.status=<> no_output_timeout: 90m - persist_to_workspace: root: /tmp/workspace diff --git a/.circleci/orb/orb.yml b/.circleci/orb/orb.yml index a656304..ca55149 100644 --- a/.circleci/orb/orb.yml +++ b/.circleci/orb/orb.yml @@ -74,9 +74,9 @@ commands: steps: - attach_workspace: at: /tmp/workspace - - run: curl -Ls https://github.com/nowsecure/auto-circleci-plugin/archive/1.2.0.tar.gz | tar -xzf - -C . + - run: curl -Ls https://github.com/nowsecure/auto-circleci-plugin/archive/1.2.1.tar.gz | tar -xzf - -C . - run: - command: cd auto-circleci-plugin-1.2.0 && ./gradlew run -Dauto.url=<< parameters.auto_url >> -Dauto.token=<< parameters.auto_token >> -Dauto.dir=<< parameters.auto_dir >> -Dauto.file=<< parameters.auto_file >> -Dauto.group=<< parameters.auto_group >> -Dauto.wait=<< parameters.auto_wait >> -Dauto.score=<< parameters.auto_score >> -Dauto.username=<> -Dauto.password=<> -Dauto.show.status.messages=<> -Dauto.stop.tests.on.status=<> + command: cd auto-circleci-plugin-1.2.1 && ./gradlew run -Dauto.url=<< parameters.auto_url >> -Dauto.token=<< parameters.auto_token >> -Dauto.dir=<< parameters.auto_dir >> -Dauto.file=<< parameters.auto_file >> -Dauto.group=<< parameters.auto_group >> -Dauto.wait=<< parameters.auto_wait >> -Dauto.score=<< parameters.auto_score >> -Dauto.username=<> -Dauto.password=<> -Dauto.show.status.messages=<> -Dauto.stop.tests.on.status=<> no_output_timeout: 90m - persist_to_workspace: root: /tmp/workspace diff --git a/.gitignore b/.gitignore index 900ae93..ee8516a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ bin/ build* dist *.sh + +auto-circleci-plugin-* +*.tar.gz \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index a3c975a..871deae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM openjdk:8 # plugin version from https://github.com/nowsecure/auto-circleci-plugin/releases -ENV PLUGIN_VERSION 1.2.0e -# +ENV PLUGIN_VERSION 1.2.1 + + # Download nowsecure plugin source RUN mkdir -p /usr/local/share/nowsecure RUN curl -Ls https://github.com/nowsecure/auto-circleci-plugin/archive/${PLUGIN_VERSION}.tar.gz | tar -xzf - -C /usr/local/share/nowsecure diff --git a/bin/nowsecure.sh b/bin/nowsecure.sh deleted file mode 100755 index 3d3b43b..0000000 --- a/bin/nowsecure.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -e -### -# Nowsecure Plugin to upload binary file, run assessment and retrieve scores -# This script will fail if the job fails or score is below minimum threshold. -### - -if [[ -z "${PLUGIN_VERSION}" ]]; then - PLUGIN_VERSION="1.2.0e" -fi - -if [[ -z "${PLUGIN_JAR}" ]]; then - BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - PLUGIN_JAR=${BIN_DIR}/../dist/all-in-one-jar-${PLUGIN_VERSION}.jar -fi - -if [[ -z "${AUTO_URL}" ]]; then - AUTO_URL="https://lab-api.nowsecure.com" -fi - -if [[ -z "${ARTIFACTS_DIR}" ]]; then - ARTIFACTS_DIR="/tmp/nowsecure/artifacts" - mkdir -p ${ARTIFACTS_DIR} -fi - -if [[ -z "${AUTO_TOKEN}" ]]; then - echo "Please specify nowsecure API token using environment variable AUTO_TOKEN" - exit 1 -fi - -if [[ -z "${AUTO_GROUP}" ]]; then - echo "Please specify nowsecure group using environment variable AUTO_GROUP" - exit 1 -fi - -if [[ -z "${BINARY_FILE}" ]]; then - echo "Please specify binary file to test using environment variable BINARY_FILE" - exit 1 -fi - -if [[ -z "${MAX_WAIT}" ]]; then - MAX_WAIT=60 -fi - -if [[ -z "${MIN_SCORE}" ]]; then - MIN_SCORE=50 -fi - -if [[ -z "${SHOW_STATUS_MESSAGES}" ]]; then - SHOW_STATUS_MESSAGES=true -fi - -exec java -jar ${PLUGIN_JAR} --plugin-name circleci-nowsecure-auto-security-test --plugin-version ${PLUGIN_VERSION} --auto-url $AUTO_URL --auto-token $AUTO_TOKEN --auto-dir $ARTIFACTS_DIR --auto-file $BINARY_FILE --auto-group $AUTO_GROUP --auto-wait $MAX_WAIT --auto-score $MIN_SCORE --auto-show-status-messages $SHOW_STATUS_MESSAGES --debug diff --git a/dist/all-in-one-jar-1.2.0.jar b/dist/all-in-one-jar-1.2.0.jar deleted file mode 100644 index c438f34..0000000 Binary files a/dist/all-in-one-jar-1.2.0.jar and /dev/null differ diff --git a/dist/all-in-one-jar-1.2.0e.jar b/dist/all-in-one-jar-1.2.0e.jar deleted file mode 100644 index 74852d0..0000000 Binary files a/dist/all-in-one-jar-1.2.0e.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b5c3478..534b775 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip diff --git a/src/main/resources/version.txt b/src/main/resources/version.txt index 867e524..cb174d5 100644 --- a/src/main/resources/version.txt +++ b/src/main/resources/version.txt @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.2.1 \ No newline at end of file