Skip to content

Commit

Permalink
fix: orb publishing (#150)
Browse files Browse the repository at this point in the history
* chore: specify circleci-cli image tag

* docs: update the readme

* refactor: orb-tools description, specify image tag

* refactor: publish_orb script uses CIRCLECI_TOKEN
  • Loading branch information
ovasdi authored Apr 6, 2023
1 parent 4362cc2 commit 0ddd3ef
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
executors:
cli:
docker:
- image: circleci/circleci-cli
- image: circleci/circleci-cli:0.1.25725

jobs:
validate_orbs:
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ CircleCI orbs used at Artsy

## What's an Orb?

CircleCI 2.1 introduces [several new features](https://github.com/CircleCI-Public/config-preview-sdk/blob/master/docs/whats-new.md#whats-new-in-21-configuration) to make sharing configuration across projects easier. Straight from their docs:

> Orbs are packages of CircleCI configuration that can be shared across projects. Orbs allow you to make a single bundle of jobs, commands, and executors that can reference each other and can be imported into a CircleCI build configuration and invoked in their own namespace. Orbs are registered with CircleCI, with revisions expressed using the semver pattern.
For more info on Orbs, checkout their [docs](https://github.com/CircleCI-Public/config-preview-sdk/tree/master/docs)!
For more info on Orbs, checkout their [docs](https://circleci.com/docs/orb-intro/)!

(The TL;DR is there's an `orb` yml configuration file that's used to share things like [executors][orb-executors], [commands][orb-commands], and [jobs][orb-jobs] across your CircleCi builds.)
(The TLDR is there's an `orb` yml configuration file that's used to share things like [executors][orb-executors], [commands][orb-commands], and [jobs][orb-jobs] across your CircleCi builds.)

## Getting Started

Expand Down
6 changes: 3 additions & 3 deletions scripts/publish_orb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ fi

# Build CircleCI token argument
TOKEN=""
if [ -n "${CIRCLECI_API_KEY:-}" ]; then
TOKEN="--token $CIRCLECI_API_KEY"
if [ -n "${CIRCLE_TOKEN:-}" ]; then
TOKEN="--token $CIRCLE_TOKEN"
elif [ -z "$DRY_RUN" ]; then
echo "$(RED "Must provide CIRCLECI_API_KEY env var")"
echo "$(RED "Must provide CIRCLE_TOKEN env var")"
echo ""
exit 1
fi
Expand Down
8 changes: 4 additions & 4 deletions src/orb-tools/orb-tools.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Orb Version 0.5.0
# Orb Version 0.5.1

version: 2.1
description: A simple set of tools for managing orbs by Artsy
description: A simple set of tools for managing orbs at Artsy.

executors:
orb-scripts:
docker:
- image: artsy/orb-scripts
- image: artsy/orb-scripts:latest

commands:
check-for-env-vars:
Expand Down Expand Up @@ -56,7 +56,7 @@ commands:
- run:
name: Set orb scripts path
command: |
if [ ! -d "./scripts" ]; then
if [ ! -d "./scripts" ]; then
ln -s /tmp/orb-scripts scripts
fi
Expand Down

0 comments on commit 0ddd3ef

Please sign in to comment.