Skip to content

Commit 1aeb323

Browse files
committed
Change circleci configs
1 parent bd5453a commit 1aeb323

File tree

3 files changed

+155
-113
lines changed

3 files changed

+155
-113
lines changed

.circleci/config.yml

Lines changed: 27 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,32 @@
11
version: 2.1
2+
3+
# this allows you to use CircleCI's dynamic configuration feature
4+
setup: true
5+
26
orbs:
3-
slack: circleci/[email protected]
4-
jq: circleci/[email protected]
7+
continuation: circleci/[email protected]
8+
slack: circleci/[email protected]
9+
jq: circleci/[email protected]
510
jobs:
6-
test-dev-tag-as-not-passed:
7-
docker:
8-
- image: rishabhpoddar/supertokens_go_driver_testing
9-
steps:
10-
- checkout
11-
- run: (cd .circleci/ && ./markDevTagAsTestNotPassed.sh)
12-
test-unit:
13-
docker:
14-
- image: rishabhpoddar/supertokens_go_driver_testing
15-
resource_class: large
16-
steps:
17-
- checkout
18-
- run: apt-get install lsof
19-
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
20-
- run: go version
21-
- run: rm -rf /etc/alternatives/java
22-
- run: ln -s /usr/java/jdk-15.0.1/bin/java /etc/alternatives/java
23-
- run: go get ./...
24-
- run: (cd .circleci/ && ./doUnitTests.sh)
25-
- slack/status
26-
test-website:
27-
docker:
28-
- image: rishabhpoddar/supertokens_go_driver_testing
29-
resource_class: large
30-
steps:
31-
- checkout
32-
- run: apt-get install lsof
33-
- run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
34-
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
35-
- run: go version
36-
- run: rm -rf /etc/alternatives/java
37-
- run: ln -s /usr/java/jdk-15.0.1/bin/java /etc/alternatives/java
38-
- run: go get ./...
39-
- run: (cd .circleci/ && ./website.sh)
40-
- slack/status
41-
test-authreact:
42-
docker:
43-
- image: rishabhpoddar/supertokens_go_driver_testing
44-
resource_class: large
45-
steps:
46-
- checkout
47-
- run: apt-get install lsof
48-
- run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
49-
- run: curl -fsSL https://deb.nodesource.com/setup_16.x | bash
50-
- run: apt install -y nodejs
51-
- run: node --version
52-
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
53-
- run: go version
54-
- run: rm -rf /etc/alternatives/java
55-
- run: ln -s /usr/java/jdk-15.0.1/bin/java /etc/alternatives/java
56-
- run: go get ./...
57-
- run: (cd .circleci/ && ./authReact.sh)
58-
- slack/status
59-
test-success:
60-
docker:
61-
- image: rishabhpoddar/supertokens_go_driver_testing
62-
steps:
63-
- checkout
64-
- run: (cd .circleci/ && ./markAsSuccess.sh)
65-
- slack/status
11+
setup:
12+
machine:
13+
image: ubuntu-2204:2022.04.1
14+
steps:
15+
- checkout
16+
- run:
17+
name: Generate config
18+
command: |
19+
cd .circleci && ./generateConfig.sh
20+
- continuation/continue:
21+
configuration_path: .circleci/config_continue.yml # use newly generated config to continue
6622

6723
workflows:
68-
version: 2
69-
tagged-build:
70-
jobs:
71-
- test-dev-tag-as-not-passed:
72-
filters:
73-
tags:
74-
only: /dev-v[0-9]+(\.[0-9]+)*/
75-
branches:
76-
ignore: /.*/
77-
- test-unit:
78-
requires:
79-
- test-dev-tag-as-not-passed
80-
context:
81-
- slack-notification
82-
filters:
83-
tags:
84-
only: /dev-v[0-9]+(\.[0-9]+)*/
85-
branches:
86-
ignore: /.*/
87-
- test-website:
88-
requires:
89-
- test-dev-tag-as-not-passed
90-
context:
91-
- slack-notification
92-
filters:
93-
tags:
94-
only: /dev-v[0-9]+(\.[0-9]+)*/
95-
branches:
96-
ignore: /.*/
97-
- test-authreact:
98-
requires:
99-
- test-dev-tag-as-not-passed
100-
context:
101-
- slack-notification
102-
filters:
103-
tags:
104-
only: /dev-v[0-9]+(\.[0-9]+)*/
105-
branches:
106-
ignore: /.*/
107-
- test-success:
108-
requires:
109-
- test-unit
110-
- test-website
111-
- test-authreact
112-
context:
113-
- slack-notification
114-
filters:
115-
tags:
116-
only: /dev-v[0-9]+(\.[0-9]+)*/
117-
branches:
118-
ignore: /.*/
24+
version: 2
25+
tagged-build:
26+
jobs:
27+
- setup:
28+
filters:
29+
tags:
30+
only: /dev-v[0-9]+(\.[0-9]+)*/
31+
branches:
32+
ignore: /.*/

.circleci/config_continue.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
version: 2.1
2+
orbs:
3+
continuation: circleci/[email protected]
4+
slack: circleci/[email protected]
5+
jq: circleci/[email protected]
6+
jobs:
7+
test-dev-tag-as-not-passed:
8+
docker:
9+
- image: rishabhpoddar/supertokens_go_driver_testing
10+
steps:
11+
- checkout
12+
- run: (cd .circleci/ && ./markDevTagAsTestNotPassed.sh)
13+
test-unit:
14+
docker:
15+
- image: rishabhpoddar/supertokens_go_driver_testing
16+
resource_class: large
17+
steps:
18+
- checkout
19+
- run: apt-get install lsof
20+
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
21+
- run: go version
22+
- run: rm -rf /etc/alternatives/java
23+
- run: ln -s /usr/java/jdk-15.0.1/bin/java /etc/alternatives/java
24+
- run: go get ./...
25+
- run: (cd .circleci/ && ./doUnitTests.sh << parameters.cdi-version >>)
26+
- slack/status
27+
test-website:
28+
docker:
29+
- image: rishabhpoddar/supertokens_go_driver_testing
30+
resource_class: large
31+
steps:
32+
- checkout
33+
- run: apt-get install lsof
34+
- run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
35+
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
36+
- run: go version
37+
- run: rm -rf /etc/alternatives/java
38+
- run: ln -s /usr/java/jdk-15.0.1/bin/java /etc/alternatives/java
39+
- run: go get ./...
40+
- run: (cd .circleci/ && ./website.sh)
41+
- slack/status
42+
test-authreact:
43+
docker:
44+
- image: rishabhpoddar/supertokens_go_driver_testing
45+
resource_class: large
46+
steps:
47+
- checkout
48+
- run: apt-get install lsof
49+
- run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/
50+
- run: curl -fsSL https://deb.nodesource.com/setup_16.x | bash
51+
- run: apt install -y nodejs
52+
- run: node --version
53+
- run: echo "127.0.0.1 localhost.org" >> /etc/hosts
54+
- run: go version
55+
- run: rm -rf /etc/alternatives/java
56+
- run: ln -s /usr/java/jdk-15.0.1/bin/java /etc/alternatives/java
57+
- run: go get ./...
58+
- run: (cd .circleci/ && ./authReact.sh)
59+
- slack/status
60+
test-success:
61+
docker:
62+
- image: rishabhpoddar/supertokens_go_driver_testing
63+
steps:
64+
- checkout
65+
- run: (cd .circleci/ && ./markAsSuccess.sh)
66+
- slack/status
67+
68+
workflows:
69+
version: 2
70+
tagged-build:
71+
jobs:
72+
- test-dev-tag-as-not-passed:
73+
filters:
74+
tags:
75+
only: /dev-v[0-9]+(\.[0-9]+)*/
76+
branches:
77+
ignore: /.*/
78+
- test-unit:
79+
requires:
80+
- test-dev-tag-as-not-passed
81+
context:
82+
- slack-notification
83+
filters:
84+
tags:
85+
only: /dev-v[0-9]+(\.[0-9]+)*/
86+
branches:
87+
ignore: /.*/
88+
- test-website:
89+
requires:
90+
- test-dev-tag-as-not-passed
91+
context:
92+
- slack-notification
93+
filters:
94+
tags:
95+
only: /dev-v[0-9]+(\.[0-9]+)*/
96+
branches:
97+
ignore: /.*/
98+
- test-authreact:
99+
requires:
100+
- test-dev-tag-as-not-passed
101+
context:
102+
- slack-notification
103+
filters:
104+
tags:
105+
only: /dev-v[0-9]+(\.[0-9]+)*/
106+
branches:
107+
ignore: /.*/
108+
- test-success:
109+
requires:
110+
- test-unit
111+
- test-website
112+
- test-authreact
113+
context:
114+
- slack-notification
115+
filters:
116+
tags:
117+
only: /dev-v[0-9]+(\.[0-9]+)*/
118+
branches:
119+
ignore: /.*/

.circleci/generateConfig.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
coreDriverJson=`cat ../coreDriverInterfaceSupported.json`
2+
coreDriverArray=`echo $coreDriverJson | jq ".versions"`
3+
4+
if [ -z "$SUPERTOKENS_API_KEY" ]; then
5+
echo "SUPERTOKENS_API_KEY missing"
6+
exit 1;
7+
fi
8+
9+
sed -i -e 's/cdi-version: placeholder/cdi-version: '`printf "%q" $coreDriverArray`'/' config_continue.yml

0 commit comments

Comments
 (0)