Skip to content

Commit

Permalink
build: Disable Circle CI and Sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
simster7 committed Jun 18, 2020
1 parent 23ca07a commit 47bcded
Showing 1 changed file with 8 additions and 69 deletions.
77 changes: 8 additions & 69 deletions .circleci/config.yml
@@ -1,77 +1,16 @@
version: 2.1
orbs:
sonarcloud: sonarsource/sonarcloud@1.0.1
commands:
restore_go_mod:
steps:
- restore_cache:
name: Restore go mod cache
keys:
- go-mod-v3-{{ checksum "go.sum" }}-{{ .Environment.CIRCLE_JOB }}
save_go_mod:
steps:
- save_cache:
name: Save go mod cache
key: go-mod-v3-{{ checksum "go.sum" }}-{{ .Environment.CIRCLE_JOB }}
paths:
- /home/circleci/.go_workspace/go/pkg/mod
when: always
install_golang:
jobs:
ci:
docker:
- image: cimg/base:2020.01
steps:
- run:
name: Install Golang v1.13.4
name: hello
command: |
go get golang.org/dl/go1.13.4
[ -e /home/circleci/sdk/go1.13.4 ] || go1.13.4 download
echo "export GOPATH=/home/circleci/.go_workspace" | tee -a $BASH_ENV
echo "export PATH=/home/circleci/sdk/go1.13.4/bin:\$PATH" | tee -a $BASH_ENV
save_go_cache:
steps:
- save_cache:
name: Save Golang cache
key: go-v7-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}
paths:
- /home/circleci/.cache/go-build
- /home/circleci/sdk/go1.13.4
when: always
restore_go_cache:
steps:
- restore_cache:
name: Restore Golang cache
keys:
- go-v7-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}
- go-v7-master-{{ .Environment.CIRCLE_JOB }}
jobs:
sonar:
working_directory: /home/circleci/.go_workspace/src/github.com/argoproj/argo
machine:
image: ubuntu-1604:201903-01
steps:
- checkout
- restore_go_cache
- install_golang
- restore_go_mod
- run: |
mkdir dist
cp sonar-project.properties dist/
if [ "$(echo "$CIRCLE_BRANCH" | grep 'master\|release-')" = '' ]; then
echo "sonar.pullrequest.branch=$CIRCLE_BRANCH" >> sonar-project.properties
echo "sonar.pullrequest.key=$CIRCLE_PR_NUMBER" >> sonar-project.properties
fi
- sonarcloud/scan
- run: cp dist/sonar-project.properties .
- store_test_results:
path: test-results
when: always
- store_artifacts:
path: test-results
destination: .
when: always
- save_go_cache
- save_go_mod
echo "Hello, world"
workflows:
version: 2
CI:
workflow:
jobs:
- sonar
- ci

0 comments on commit 47bcded

Please sign in to comment.