Skip to content

Commit

Permalink
Fix CI to actually produce artifacts for tags
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek committed Apr 22, 2021
1 parent 5cc8712 commit 4dce146
Showing 1 changed file with 23 additions and 63 deletions.
86 changes: 23 additions & 63 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ commands:
files:
type: string
default: |
bin/otelcontribcol_darwin_amd64
bin/otelcontribcol_linux_arm64
bin/otelcontribcol_linux_amd64
bin/otelcontribcol_windows_amd64.exe
dist/otel-contrib-collector-*.arm64.rpm
dist/otel-contrib-collector_*_amd64.deb
dist/otel-contrib-collector-*.x86_64.rpm
dist/otel-contrib-collector_*_arm64.deb
dist/otel-contrib-collector-*amd64.msi
bin/otelcontribcol_darwin_amd64
bin/otelcontribcol_linux_arm64
bin/otelcontribcol_linux_amd64
bin/otelcontribcol_windows_amd64.exe
dist/otel-contrib-collector-*.arm64.rpm
dist/otel-contrib-collector_*_amd64.deb
dist/otel-contrib-collector-*.x86_64.rpm
dist/otel-contrib-collector_*_arm64.deb
dist/otel-contrib-collector-*amd64.msi
steps:
- run:
name: Check if distribution files exist
Expand Down Expand Up @@ -160,36 +160,16 @@ workflows:
stability-tests:
when: << pipeline.parameters.run-stability-tests >>
jobs:
- checkout-commit:
filters:
branches:
only: /.*/
tags:
only: /.*/
- checkout-commit
- setup:
requires:
- checkout-commit
filters:
branches:
only: /.*/
tags:
only: /.*/
- cross-compile:
requires:
- setup
filters:
branches:
only: /.*/
tags:
only: /.*/
- run-stability-tests:
requires:
- cross-compile
filters:
branches:
only: /.*/
tags:
only: /.*/
- publish-dev:
requires:
- run-stability-tests
Expand All @@ -208,14 +188,6 @@ workflows:
only: /.*/
tags:
only: /.*/
- publish-stable:
requires:
- run-tracing-tests
filters:
branches:
ignore: /.*/
tags:
only: /.*/


build-publish:
Expand Down Expand Up @@ -276,11 +248,6 @@ workflows:
- windows-msi
- deb-package
- rpm-package
filters:
branches:
only: /.*/
tags:
only: /.*/
- publish-stable:
requires:
- lint
Expand All @@ -296,29 +263,18 @@ workflows:
branches:
ignore: /.*/
tags:
ignore: /.*/
- publish-dev:
only: /^v[0-9]+\.[0-9]+\.[0-9]+.*/
- spawn-stability-tests-job:
requires:
- lint
- unit-tests
- integration-tests
- cross-compile
- loadtest
- windows-test
- windows-msi
- deb-package
- rpm-package
filters:
branches:
ignore: /.*/
tags:
ignore: /.*/
- spawn-stability-tests-job:
requires:
- publish-check
- integration-tests
- cross-compile
filters:
branches:
only: /.*/
only: /main|release|tracing\/.+/
tags:
only: /.*/
- integration-tests:
Expand Down Expand Up @@ -481,12 +437,16 @@ jobs:
- publish_docker_images:
repo: opentelemetry-collector
tag: ${CIRCLE_TAG:1}
- run:
name: Prepare release artifacts
command: |
cp bin/* dist/
- run:
name: Calculate checksums
command: cd bin && shasum -a 256 * > checksums.txt
command: cd dist && shasum -a 256 * > checksums.txt
- run:
name: Create Github release and upload artifacts
command: ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace $CIRCLE_TAG bin/
command: ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace $CIRCLE_TAG dist/

publish-dev:
executor: golang
Expand All @@ -509,8 +469,8 @@ jobs:
- run:
name: Trigger stability tests job
command: |
PARAM='"branch": "'"${CIRLCE_BRANCH}"'"'
if [ -z "$CIRLCE_BRANCH" ]; then
PARAM='"branch": "'"${CIRCLE_BRANCH}"'"'
if [ -z "$CIRCLE_BRANCH" ]; then
PARAM='"tag": "'"${CIRCLE_TAG}"'"'
fi
curl -f -X POST "https://circleci.com/api/v2/project/github/SumoLogic/${CIRCLE_PROJECT_REPONAME}/pipeline" \
Expand Down

0 comments on commit 4dce146

Please sign in to comment.