@datarailsshared/dr_renderer 1.2.7 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,66 +1,85 @@
1
1
  version: 2.1
2
+
2
3
  orbs:
3
4
  datarails-cicd-orb: datarails-ns/datarails-cicd-orb@dev:primary
4
- defaults:
5
+
6
+ defaults: &defaults
5
7
  working_directory: ~/repo
6
- docker: &id001
7
- - image: circleci/node:14.16.1
8
+ docker:
9
+ - image: circleci/node:14.16.1
10
+
8
11
  jobs:
9
12
  deploy:
10
- working_directory: ~/repo
11
- docker: *id001
13
+ <<: *defaults
12
14
  steps:
13
- - checkout
14
- - attach_workspace:
15
- at: ~/repo
16
- - run:
17
- name: Prepare publish version
18
- command: "postfix=\"\"\nif [[ \"${CIRCLE_BRANCH}\" != master ]] ; then\n \
19
- \ postfix=\"-$CIRCLE_BRANCH\"\nfi\n\nVERSION=\"1.2.$CIRCLE_BUILD_NUM$postfix\"\
20
- \nsed -i s/{{cicd_version}}/$VERSION/g ./package.json\ncat ./package.json\n"
21
- - run:
22
- name: Authenticate with registry
23
- command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/repo/.npmrc
24
- - run:
25
- name: Install dependencies
26
- command: npm install
27
- - run:
28
- name: Run npm test
29
- command: npm test
30
- - run:
31
- name: Publish package
32
- command: npm publish . --access=public
33
- - datarails-cicd-orb/add-ssh-id:
34
- private_key_env_var: github_deploy_private_encoded
35
- public_key_env_var: github_deploy_pub_encoded
36
- is_public_key_encoded: true
37
- is_private_key_encoded: true
38
- - run:
39
- name: prepare git tag
40
- command: "postfix=\"\"\nif [[ \"${CIRCLE_BRANCH}\" != prod ]] ; then\n postfix=\"\
41
- -$CIRCLE_BRANCH\"\nfi\n\nVERSION=\"1.2.$CIRCLE_BUILD_NUM$postfix\"\ngit\
42
- \ config --global user.email noreplay@circleci.com\ngit config --global\
43
- \ user.name circleci\ngit config --global -l\ngit tag -a \"$CIRCLE_BRANCH/$VERSION\"\
44
- \ -m \"circleci build\"\n# Test SSH connection to GitHub\noutput=$(ssh -o\
45
- \ \"StrictHostKeyChecking no\" -T git@github.com 2>&1 || true)\necho \"\
46
- $output\"\nif ! echo \"$output\" | grep -q \"Hi.*You've successfully authenticated\"\
47
- ; then\n echo \"Failed to authenticate with GitHub\"\n exit 1\nfi\n# Push\
48
- \ the tag after successful authentication\ngit push origin \"$CIRCLE_BRANCH/$version\"\
49
- \n"
15
+ - checkout
16
+
17
+ - attach_workspace:
18
+ at: ~/repo
19
+ - run:
20
+ name: Prepare publish version
21
+ command: |
22
+ postfix=""
23
+ if [[ "${CIRCLE_BRANCH}" != master ]] ; then
24
+ postfix="-$CIRCLE_BRANCH"
25
+ fi
26
+
27
+ VERSION="1.2.$CIRCLE_BUILD_NUM$postfix"
28
+ sed -i s/{{cicd_version}}/$VERSION/g ./package.json
29
+ cat ./package.json
30
+ - run:
31
+ name: Authenticate with registry
32
+ command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/repo/.npmrc
33
+ - run:
34
+ name: Install dependencies
35
+ command: npm install
36
+ - run:
37
+ name: Run npm test
38
+ command: npm test
39
+ - run:
40
+ name: Publish package
41
+ command: npm publish . --access=public
42
+ - datarails-cicd-orb/add-ssh-id:
43
+ private_key_env_var: github_deploy_private_encoded
44
+ public_key_env_var: github_deploy_pub_encoded
45
+ is_public_key_encoded: true
46
+ is_private_key_encoded: true
47
+ - run:
48
+ name: prepare git tag
49
+ command: |
50
+ postfix=""
51
+ if [[ "${CIRCLE_BRANCH}" != prod ]] ; then
52
+ postfix="-$CIRCLE_BRANCH"
53
+ fi
54
+
55
+ VERSION="1.2.$CIRCLE_BUILD_NUM$postfix"
56
+ git config --global user.email noreplay@circleci.com
57
+ git config --global user.name circleci
58
+ git config --global -l
59
+ git tag -a "$CIRCLE_BRANCH/$VERSION" -m "circleci build"
60
+ # Test SSH connection to GitHub
61
+ output=$(ssh -o "StrictHostKeyChecking no" -T git@github.com 2>&1 || true)
62
+ echo "$output"
63
+ if ! echo "$output" | grep -q "Hi.*You've successfully authenticated"; then
64
+ echo "Failed to authenticate with GitHub"
65
+ exit 1
66
+ fi
67
+ # Push the tag after successful authentication
68
+ git push origin "$CIRCLE_BRANCH/$VERSION"
50
69
  workflows:
51
70
  version: 2
52
71
  npm-publish:
53
72
  jobs:
54
- - deploy:
55
- context:
56
- - metadata
57
- filters:
58
- branches:
59
- only:
60
- - /master/
61
- - /tigers/
62
- - /bratans/
63
- - /dragons/
64
- - /tigers/
65
- - /wizards/
66
- - /rocket/
73
+ - deploy:
74
+ context:
75
+ - metadata
76
+ filters:
77
+ branches:
78
+ only:
79
+ - /master/
80
+ - /tigers/
81
+ - /bratans/
82
+ - /dragons/
83
+ - /tigers/
84
+ - /wizards/
85
+ - /rocket/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",