Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code to push to artifactory #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
version: 2.1
orbs:
aws-white-list-circleci-ip: configure/[email protected]
jobs:
build:
docker:
- image: circleci/ruby:2.6
steps:
- checkout
- run: echo "export DATE=$(eval date +%s)" >> $BASH_ENV
- run: bundle config packagecloud.io $PACKAGECLOUD_READ_TOKEN
- run: gem install package_cloud
- aws-white-list-circleci-ip/add:
tag-key: Name
tag-value: artifactory_proxy_ingress_dyn
description: "circleci_gems_$DATE"
- run: |
cat \<< EOF > /home/circleci/.gem/credentials
---
:rubygems_api_key: Basic $ARTIFACTORY_API_TOKEN
EOF
- run: chmod 0600 /home/circleci/.gem/credentials
- run: rm -f *.gem
- run: gem build $(ls *.gemspec)
- run: package_cloud push avvo/gems $(ls *.gem)
- run: gem push "$(ls *.gem)" --host https://avvo-gems.public.artifactory.internetbrands.com -v
- aws-white-list-circleci-ip/remove:
tag-key: Name
tag-value: artifactory_proxy_ingress_dyn
description: "circleci_gems_$DATE"
workflows:
version: 2.1
build-workflow:
jobs:
- build:
context: org-global
filters:
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]+.*/
branches:
ignore: /.*/