Skip to content

Commit 164c4f2

Browse files
committed
fix(deorbify): ditch orb due auth bug
see cypress-io/circleci-orb#317
1 parent b5f0430 commit 164c4f2

File tree

1 file changed

+84
-56
lines changed

1 file changed

+84
-56
lines changed

.circleci/config.yml

Lines changed: 84 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,95 @@
11
version: 2.1
22

3-
# TODO(DP): the following context declaration does not appear to be working
4-
context: FusionDB_images
3+
# TODO(DP): cache all the things (yarn, xar, images, ... )
54

6-
executors:
7-
node14-exist:
5+
jobs:
6+
build:
87
docker:
9-
- image: 'cypress/base-14'
10-
auth:
11-
username: duncdrum
12-
password: $DOCKER_TMP_PW
13-
- image: 'existdb/existdb:latest'
8+
- image: "cimg/python:3.9-browsers"
149
auth:
1510
username: duncdrum
1611
password: $DOCKER_TMP_PW
17-
18-
19-
# see https://circleci.com/developer/orbs/orb/cypress-io/cypress
20-
orbs:
21-
cypress: cypress-io/[email protected]
22-
# TODO(DP): There is a bug here somewhere as we can run neither with nor without authentication creds.
23-
# executors:
24-
# node12-exist:
25-
# docker:
26-
# - image: 'cypress/base-14'
27-
# auth:
28-
# username: duncdrum
29-
# password: $DOCKER_TMP_PW
30-
# - image: 'existdb/existdb:latest'
31-
# auth:
32-
# username: duncdrum
33-
# password: $DOCKER_TMP_PW
34-
12+
# - image: "existdb/existdb:latest"
13+
# name: exist-top
14+
# auth:
15+
# username: duncdrum
16+
# password: $DOCKER_TMP_PW
17+
steps:
18+
- checkout
19+
- run: |
20+
sudo apt-get update
21+
sudo apt-get --yes install libx11-dev libxkbfile-dev
22+
- setup_remote_docker:
23+
version: 20.10.2
24+
docker_layer_caching: false
25+
- run:
26+
name: install dockerize
27+
command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
28+
environment:
29+
DOCKERIZE_VERSION: v0.3.0
30+
- run: |
31+
wget https://github.com/evolvedbinary/fusion-studio-api/releases/download/1.2.0/fusion-studio-api-1.2.0.xar
32+
docker create -v /exist/autodeploy --name pkg alpine:3.4 /bin/true
33+
docker cp *.xar pkg:/exist/autodeploy
34+
docker run -dit -p 8080:8080 --name exist-ci --rm --volumes-from pkg existdb/existdb:latest
35+
- run:
36+
name: Wait for db
37+
command: dockerize -wait http://localhost:8080 -timeout 1m
38+
- run: docker ps
39+
- run: node --version
40+
- run: yarn
41+
- run:
42+
working_directory: browser-app
43+
command: yarn start
44+
background: true
45+
- run:
46+
command: npx cypress run
47+
no_output_timeout: 1m
3548
workflows:
36-
build:
49+
browser_build:
3750
jobs:
38-
- cypress/run:
39-
executor: node14-exist
51+
- build:
4052
context: FusionDB_images
41-
yarn: true
42-
post-checkout:
43-
- run: |
44-
apt-get update
45-
apt-get --yes install libx11-dev libxkbfile-dev
46-
wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce-cli_20.10.6~3-0~ubuntu-bionic_amd64.deb
47-
dpkg -i *.deb
48-
- setup_remote_docker:
49-
version: 20.10.2
50-
docker_layer_caching: false
51-
start: cd browser-app && yarn theia start --hostname 0.0.0.0 --port 3000
52-
post-install:
53-
- run: |
54-
wget https://github.com/evolvedbinary/fusion-studio-api/releases/download/1.2.0/fusion-studio-api-1.2.0.xar
55-
docker create -v /exist/autodeploy --name pkg alpine:3.4 /bin/true
56-
docker cp *.xar pkg:/exist/autodeploy
57-
docker run -dit -p 8080:8080 --name exist-ci --rm --volumes-from pkg existdb/existdb:latest
58-
- run: curl --retry 5 http://localhost:8080
59-
# TODO(DP):
60-
# - see #379 use e.g. -e API_PORT=8080, or context/executor declaration to set working (!) env variables
61-
# - s.a. to sidestep auth bug: docker login repo.evolvedbinary.com:9543 -u FDB_NIGHTLY_DOCKER_USER -p FDB_NIGHTLY_DOCKER_PASS
62-
command: npx cypress run
63-
no-workspace: false
64-
record: true
65-
store_artifacts: true
66-
tags: 'eXist-db,latest'
53+
54+
# see https://circleci.com/developer/orbs/orb/cypress-io/cypress
55+
56+
57+
# ------------------
58+
# TODO(DP): There is a known bug preventing us from using the more modern concise approach below
59+
# https://support.circleci.com/hc/en-us/articles/360051099071-Docker-Hub-Authentication-With-Orb-Executors
60+
61+
# version: 2.1
62+
# see https://circleci.com/developer/orbs/orb/cypress-io/cypress
63+
# see https://github.com/cypress-io/circleci-orb/issues/317
64+
# orbs:
65+
# cypress: cypress-io/cypress@1
6766

67+
# workflows:
68+
# build:
69+
# jobs:
70+
# - cypress/run:
71+
# executor: cypress/base-14
72+
# context: FusionDB_images
73+
# yarn: true
74+
# post-checkout:
75+
# - run: |
76+
# apt-get update
77+
# apt-get --yes install libx11-dev libxkbfile-dev
78+
# wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce-cli_20.10.6~3-0~ubuntu-bionic_amd64.deb
79+
# dpkg -i *.deb
80+
# - setup_remote_docker:
81+
# version: 20.10.2
82+
# docker_layer_caching: false
83+
# start: cd browser-app && yarn start
84+
# post-install:
85+
# - run: |
86+
# wget https://github.com/evolvedbinary/fusion-studio-api/releases/download/1.2.0/fusion-studio-api-1.2.0.xar
87+
# docker create -v /exist/autodeploy --name pkg alpine:3.4 /bin/true
88+
# docker cp *.xar pkg:/exist/autodeploy
89+
# docker run -dit -p 8080:8080 --name exist-ci --rm --volumes-from pkg existdb/existdb:latest
90+
# - run: curl --retry 5 http://localhost:8080
91+
# command: npx cypress run
92+
# no-workspace: false
93+
# record: true
94+
# store_artifacts: true
95+
# tags: "eXist-db,latest"

0 commit comments

Comments
 (0)