@@ -18,38 +18,6 @@ executors:
18
18
- image : gofunky/orbtools:alpine<< parameters.alpine_version >>
19
19
20
20
commands :
21
- env-publish :
22
- description : Uses the CLI to publish an orb to the registry.
23
- parameters :
24
- orb-path :
25
- description : The path to the orb file.
26
- type : string
27
- orb-ref :
28
- description : >
29
- A fully-qualified reference to an orb. This takes the form <namespace>/<orb-name>@<version>
30
- NOTE: To publish a dev version prefix the version with 'dev:' like this: <namespace>/<orb-name>@dev:<label>
31
- type : string
32
- token-variable :
33
- description : >
34
- The env var containing your token. Pass this as a literal string such
35
- as `$ORB_PUBLISHING_TOKEN`. Do not paste the actual token into your
36
- configuration. If omitted it's assumed the CLI has already been setup
37
- with a valid token.
38
- type : string
39
- default : " "
40
- steps :
41
- - run :
42
- name : >
43
- Publish orb at << parameters.orb-path >> to << parameters.orb-ref >>
44
- NOTE: this currently assumes you are publishing to the registry at circleci.com
45
- command : |
46
- source /usr/local/bin/envload
47
- export REPOSITORY_ORGANIZATION=$(git config --get remote.origin.url | rev | tr '.:' '/' | cut -d'/' -f3 | rev)
48
- echo "SET REPOSITORY_ORGANIZATION: ${REPOSITORY_ORGANIZATION}"
49
- export REPOSITORY_NAME=$(git config --get remote.origin.url | rev | tr '.:' '/' | cut -d'/' -f2 | rev)
50
- echo "SET REPOSITORY_NAME: ${REPOSITORY_NAME}"
51
- circleci orb publish << parameters.orb-path >> << parameters.orb-ref >> <<# parameters.token-variable >>--token << parameters.token-variable >> <</ parameters.token-variable >>
52
-
53
21
pack :
54
22
description : >
55
23
*Experimental*
@@ -413,107 +381,3 @@ jobs:
413
381
steps :
414
382
- store_artifacts :
415
383
path : << parameters.destination-file >>
416
-
417
- env-pack-publish :
418
- description : Pack the contents of an orb for publishing and publish it.
419
- parameters :
420
- << : [*alpine_params]
421
- source-dir :
422
- description : >
423
- Path to the root of the orb source directory to be packed.
424
- By default, `src/` is assumed.
425
- type : string
426
- default : src/
427
- destination-file :
428
- description : Path including filename of where the packed orb will be written.
429
- type : string
430
- default : ./.orbspace/orb.yml
431
- validate :
432
- description : Boolean for whether or not to do validation on the orb. Default is true.
433
- type : boolean
434
- default : true
435
- checkout :
436
- description : Boolean for whether or not to checkout as a first step. Default is true.
437
- type : boolean
438
- default : true
439
- attach-at :
440
- description : >
441
- Workspace root path that is either an absolute path or a path relative
442
- to the working directory. Defaults to '.' (the working directory).
443
- type : string
444
- default : " ."
445
- persist :
446
- description : If enabled, the destination-file will be persisted.
447
- type : boolean
448
- default : false
449
- store-artifact :
450
- description : If enabled, the destination-file will be stored as artifact.
451
- type : boolean
452
- default : true
453
- namespace :
454
- description : >
455
- The namespace of your orb.
456
- Environment variables from an envorb are accepted.
457
- By default, the git organization is assumed.
458
- type : string
459
- default : " ${REPOSITORY_ORGANIZATION}"
460
- orb-name :
461
- description : >
462
- The name of your orb.
463
- Environment variables from an envorb are accepted.
464
- By default, the git repository name is assumed.
465
- type : string
466
- default : " ${REPOSITORY_NAME}"
467
- version :
468
- description : >
469
- The publishing version of your orb.
470
- Either use an incrementing semantic version (e.g., 1.0.0), or a development version as `dev:<label>`,
471
- where `label` can be any alphanumeric string.
472
- Environment variables from an envorb are accepted.
473
- By default, the environment variable `$ORB_PUBLISHING_VERSION` is assumed.
474
- type : string
475
- default : " ${ORB_PUBLISHING_VERSION}"
476
- publish-token-variable :
477
- description : >
478
- The env var containing your publish token. Pass this as a literal string such
479
- as `$ORB_PUBLISHING_TOKEN`. DO NOT paste the actual token into your
480
- configuration. If omitted it's assumed the CLI has already been setup
481
- with a valid token.
482
- By default, an environment variable `$ORB_PUBLISHING_TOKEN` is expected.
483
- Make sure to pass a context to this job that contains the variable.
484
- type : string
485
- default : " ${ORB_PUBLISHING_TOKEN}"
486
- executor :
487
- name : default
488
- << : *alpine_args
489
- steps :
490
- - when :
491
- condition : << parameters.checkout >>
492
- steps :
493
- - checkout
494
- - attach_workspace :
495
- at : << parameters.attach-at >>
496
- - pack :
497
- source : << parameters.source-dir >>
498
- destination : << parameters.destination-file >>
499
- - when :
500
- condition : << parameters.validate >>
501
- steps :
502
- - validate :
503
- orb-path : << parameters.destination-file >>
504
- - env-publish :
505
- orb-path : << parameters.destination-file >>
506
- orb-ref : " << parameters.namespace >>/<< parameters.orb-name >>@<< parameters.version >>"
507
- token-variable : << parameters.publish-token-variable >>
508
- - when :
509
- condition : << parameters.persist >>
510
- steps :
511
- - persist_to_workspace :
512
- root : << parameters.attach-at >>
513
- paths :
514
- - << parameters.destination-file >>
515
- - when :
516
- condition : << parameters.store-artifact >>
517
- steps :
518
- - store_artifacts :
519
- path : << parameters.destination-file >>
0 commit comments