This repository has been archived by the owner on Feb 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from codacy/update-dependencies-FT-6107
update coverage parser and remove unnecessary dependencies
- Loading branch information
Showing
10 changed files
with
190 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# CircleCI 2.0 configuration file | ||
version: 2 | ||
|
||
# Re-usable blocks to reduce boilerplate in job definitions. | ||
references: | ||
host_environment_defaults: &host_environment_defaults | ||
# Customize the JVM maximum heap limit | ||
JAVA_OPTS: -Xmx3200m | ||
|
||
docker_environment_defaults: &docker_environment_defaults | ||
# Customize the JVM to read correct memory values | ||
JAVA_OPTS: '-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1' | ||
|
||
default_java_job: &default_java_job | ||
docker: | ||
- image: circleci/openjdk:8-jdk | ||
environment: | ||
<<: *docker_environment_defaults | ||
environment: | ||
<<: *host_environment_defaults | ||
working_directory: ~/workdir | ||
|
||
restore_dependencies: &restore_dependencies | ||
restore_cache: | ||
keys: | ||
- sbt-ivy2-dependencies-1.0.11-{{ checksum "/tmp/dependencies.cache.tmp" }}-extras | ||
- sbt-ivy2-dependencies-1.0.11-{{ checksum "/tmp/dependencies.cache.tmp" }} | ||
- sbt-ivy2-dependencies-1.0.11 | ||
|
||
clean_sbt_dependencies_cache: &clean_sbt_dependencies_cache | ||
run: | ||
name: Clean sbt dependencies cache | ||
command: | | ||
find ~/.sbt -name "*.lock" -delete | ||
find ~/.ivy2 -name "ivydata-*.properties" -delete | ||
setup_dependencies_key: &setup_dependencies_key | ||
run: | ||
name: Generate cache key | ||
command: | | ||
shasum build.sbt \ | ||
project/plugins.sbt \ | ||
project/build.properties \ | ||
project/Dependencies.scala > /tmp/dependencies.cache.tmp | ||
jobs: | ||
checkout_compile: | ||
<<: *default_java_job | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/workdir | ||
- *setup_dependencies_key | ||
- *restore_dependencies | ||
- run: | ||
name: Resolve dependencies | ||
command: | | ||
sbt update | ||
- run: | ||
name: Compile | ||
command: ./scripts/compile.sh | ||
- *clean_sbt_dependencies_cache | ||
- save_cache: | ||
paths: | ||
- ~/.ivy2 | ||
- ~/.sbt | ||
- ~/.m2 | ||
- ~/.coursier | ||
key: sbt-ivy2-dependencies-1.0.11-{{ checksum "/tmp/dependencies.cache.tmp" }} | ||
- persist_to_workspace: | ||
root: ~/workdir | ||
paths: | ||
- target | ||
- project/target | ||
- project/project/target | ||
|
||
publish_lib: | ||
<<: *default_java_job | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/workdir | ||
- *setup_dependencies_key | ||
- *restore_dependencies | ||
- run: | ||
name: Install AWS CLI | ||
command: | | ||
sudo apt -y update | ||
sudo apt -y install python3-pip | ||
sudo python3 -m pip install awscli | ||
- run: | ||
name: Setup AWS Credentials | ||
command: ./scripts/setup-aws-credentials.sh | ||
- run: | ||
name: Retrieve GPG Keys | ||
command: | | ||
mkdir -p ~/.gnupg | ||
aws s3 sync --profile shared-services --include '*.gpg' s3://$AWS_CREDENTIALS_BUCKET/gnupg/ ~/.gnupg | ||
- run: | ||
name: Export publish version | ||
command: echo 'export PUBLISH_VERSION="2.$CIRCLE_BUILD_NUM"' >> $BASH_ENV | ||
- run: | ||
name: Publish to Sonatype | ||
command: ./scripts/publish_lib.sh $PUBLISH_VERSION | ||
|
||
workflows: | ||
version: 2 | ||
test-and-publish: | ||
jobs: | ||
- checkout_compile | ||
- publish_lib: | ||
context: CodacyAWS | ||
filters: | ||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
import sbt._ | ||
|
||
object Dependencies { | ||
|
||
val codacyScalaApi = "com.codacy" %% "codacy-api-scala" % "3.0.7" | ||
val coverageParser = "com.codacy" %% "coverage-parser" % "2.0.7" | ||
val raptureJsonCirce = "com.propensive" %% "rapture-json-circe" % "2.0.0-M8" exclude("org.spire-math", "jawn-parser_2.11") | ||
object Codacy { | ||
val coverageParser = "com.codacy" %% "coverage-parser" % "2.0.12" | ||
} | ||
val javaxActivation = "com.sun.activation" % "javax.activation" % "1.2.0" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=0.13.16 | ||
sbt.version=1.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
sbt ^compile ^test:compile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
CURRENT_BRANCH="$(git symbolic-ref --short HEAD)" | ||
PUBLISH_BRANCH="master" | ||
|
||
BASE_VERSION="0.1.0-pre" | ||
DEFAULT_VERSION="${BASE_VERSION}.${CURRENT_BRANCH}-SNAPSHOT" | ||
|
||
if [ -n "$1" ]; then | ||
VERSION="$1" | ||
else | ||
VERSION="$DEFAULT_VERSION" | ||
fi | ||
|
||
echo "Publishing version ${VERSION}" | ||
if [[ -n "$CI" ]] && [[ "$CURRENT_BRANCH" == "$PUBLISH_BRANCH" || "$CIRCLE_BRANCH" == "$PUBLISH_BRANCH" ]]; then | ||
sbt 'set version := "'"${VERSION}"'"' 'set pgpPassphrase := Some("'"$SONATYPE_GPG_PASSPHRASE"'".toCharArray)' ^publishSigned sonatypeReleaseAll | ||
else | ||
sbt 'set version := "'"${VERSION}"'"' ^publishLocal | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
mkdir -p ~/.aws && touch ~/.aws/credentials | ||
|
||
cat >> ~/.aws/credentials << EOF | ||
[default] | ||
aws_access_key_id=$ACCESS_KEY_ID | ||
aws_secret_access_key=$SECRET_ACCESS_KEY | ||
[shared-services] | ||
source_profile = default | ||
role_arn = arn:aws:iam::$ACCOUNT_ID:role/CredentialsBucketReader | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters