Compare commits

..

50 Commits

Author SHA1 Message Date
2fd8fa7753 remove the kaniko ci files 2021-08-19 12:06:05 -04:00
62d2e1dd17 fix indent 2021-08-19 11:45:55 -04:00
18765e6391 import the app builds 2021-08-19 11:43:31 -04:00
8ea77cff6b tests for the rests 2021-08-19 11:41:49 -04:00
fc19d0b709 finish cleaning up cache 2021-08-19 11:13:03 -04:00
5cd3924b92 login moved 2021-08-19 10:59:48 -04:00
6e7b3c92a1 oh this is the tag change 2021-08-19 10:47:41 -04:00
71223ef8ea fix image name 2021-08-19 10:41:19 -04:00
5b2b81c39b stage order matters, maybe 2021-08-19 10:34:23 -04:00
285407bf79 drop the app rule 2021-08-19 10:33:30 -04:00
eb38035bea the needs things 2021-08-19 10:31:20 -04:00
d4837226b6 cache mr build and test 2021-08-19 10:25:58 -04:00
abaf97d7b8 cicada mount 2021-08-18 20:14:32 -04:00
11735b2bc4 use postgres config 2021-08-18 13:56:25 -04:00
f738689096 Merge remote-tracking branch 'origin/master' into bvander/integration-tests-on-docker 2021-08-18 11:40:15 -04:00
a774036715 remove debugging files 2021-08-17 15:05:38 -04:00
4176c02022 raise the ethtx files up a level software development is so fuuuuuun 2021-08-17 15:05:38 -04:00
cca82a32da update readme 2021-08-17 15:05:38 -04:00
695d2ff3a0 show me the files names 2021-08-17 15:05:38 -04:00
9c59e310a5 does everything else build 2021-08-17 15:05:38 -04:00
db6f80c6da add staging to browser target 2021-08-17 15:05:38 -04:00
24dfeaaa02 this is fubar 2021-08-17 15:05:38 -04:00
9d07f06ab9 maybe these stupid paths are being overwritten 2021-08-17 15:05:38 -04:00
4956271ebb git strat 2021-08-17 15:05:37 -04:00
13b9035c4e blocal 2021-08-17 15:05:37 -04:00
bab83e32ab ints to strings 2021-08-17 15:05:37 -04:00
4278e485bc maybe bump the versions 2021-08-17 15:05:37 -04:00
52254abf01 I am done with trying to debug this 2021-08-17 15:05:37 -04:00
79d68c2350 our registry image 2021-08-17 15:05:37 -04:00
8685726c7c debugging 2021-08-17 15:05:37 -04:00
afb4811a06 the runner needs the image 2021-08-17 15:05:36 -04:00
71114efd58 maybe this will be work better 2021-08-17 15:05:36 -04:00
cc74a50a99 staging in package.json 2021-08-17 15:05:36 -04:00
914df67be6 prod for cicada 2021-08-17 15:05:36 -04:00
0fcb4454fe adding staging and dev build configs for cicada 2021-08-17 15:05:36 -04:00
85f50b5097 cicada build arg in override too 2021-08-17 15:05:36 -04:00
5b19d0e551 change cicada build arg 2021-08-17 15:05:35 -04:00
aaeccfd52f add angular env file 2021-08-17 15:05:35 -04:00
e5447be47f down rev docker compose version 2021-08-17 15:05:35 -04:00
306f9ca184 updated staging deploys 2021-08-17 15:05:35 -04:00
f82730db85 added cicada and routes 2021-08-17 15:05:35 -04:00
b27b12f192 traefik and dev overrides 2021-08-17 15:05:34 -04:00
98687e6d56 data seeding waits on contract migration 2021-08-17 15:05:34 -04:00
430517ea35 builds wo dind should work since we are bind-ed to the docker.sock 2021-08-17 15:05:34 -04:00
2e5fe30e8a maybe use dind 2021-08-17 15:05:34 -04:00
15da00b902 buildkit 2021-08-17 15:05:34 -04:00
bb8d3191d2 can run with buildkit 2021-08-17 15:05:34 -04:00
d240872aa4 fx typo 2021-08-17 15:05:33 -04:00
f6530e5370 integration testing 2021-08-17 15:05:33 -04:00
4e6a9f87fe builds for swarm 2021-08-17 15:05:33 -04:00
24 changed files with 3463 additions and 29205 deletions

1
.env
View File

@@ -6,6 +6,7 @@ TRAEFIK_PUBLIC_NETWORK=traefik-public
TRAEFIK_TAG=cic.net
TRAEFIK_PUBLIC_TAG=traefik-public
TAG=localhost
FRONTEND_ENV=dev
# Flower

View File

@@ -95,10 +95,10 @@ root@7f2607af31c3:/app#
#### Test running stack
If your stack is already up and you just want to run the tests, you can use:
```bash
docker-compose exec -T some-container bash /script/start-tests.sh
docker-compose exec data-seeding /script/run_ussd_user_imports.sh
```

View File

@@ -10,7 +10,7 @@ COPY requirements.txt .
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
RUN --mount=type=cache, id=pip, mode=0755,target=/root/.cache/pip \
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
-r requirements.txt

View File

@@ -14,7 +14,7 @@ ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages
# --extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
# -r requirements.txt
COPY *requirements.txt ./
RUN --mount=type=cache,id=pip,mode=0755,target=/root/.cache/pip \
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \
--extra-index-url $GITLAB_PYTHON_REGISTRY \
--extra-index-url $EXTRA_INDEX_URL \

View File

@@ -8,7 +8,7 @@ RUN apk add --no-cache postgresql bash
# copy the dependencies
COPY package.json package-lock.json .
RUN --mount=type=cache,id=npm,mode=0755,target=/root/.npm \
RUN --mount=type=cache,mode=0755,target=/root/.npm \
npm set cache /root/.npm && \
npm ci

View File

@@ -7,7 +7,7 @@ ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
COPY requirements.txt .
RUN --mount=type=cache,id=pip,mode=0755,target=/root/.cache/pip \
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
-r requirements.txt

View File

@@ -1,2 +0,0 @@
8623625b230f01ecccf2ac4f6536a66608beb436 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/npm","integrity":"sha512-G4vAzedojYXic2YrMdq+vWpvZ+Zc/gSFai+AY2lCKCSNCEOFjgTjzk+wp8j66OfEMBawP7JevWz6ANLjaHUJpQ==","time":1629402913363,"size":1653772,"metadata":{"time":1629402912560,"url":"https://registry.npmjs.org/npm","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Thu, 19 Aug 2021 19:55:12 GMT","etag":"\"bd87307eb91c51dccc1b6e0985432183\"","last-modified":"Thu, 19 Aug 2021 17:32:03 GMT","vary":"accept-encoding, accept"}}}

View File

@@ -1,47 +0,0 @@
0 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'start:dev' ]
1 info using npm@7.20.3
2 info using node@v16.7.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 6ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 4ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/app/.npmrc Completed in 2ms
10 timing config:load:project Completed in 5ms
11 timing config:load:file:/root/.npmrc Completed in 4ms
12 timing config:load:user Completed in 4ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 2ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 26ms
19 timing npm:load:configload Completed in 26ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 1ms
22 timing npm:load:cleanupLog Completed in 3ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 6ms
25 timing npm:load Completed in 40ms
26 timing config:load:flatten Completed in 8ms
27 timing command:run-script Completed in 176849ms
28 notice New minor version of npm available! 7.20.3 -> 7.21.0
28 notice Changelog: <https://github.com/npm/cli/releases/tag/v7.21.0>
28 notice Run `npm install -g npm@7.21.0` to update!
29 verbose stack Error: command failed
29 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
29 verbose stack at ChildProcess.emit (node:events:394:28)
29 verbose stack at maybeClose (node:internal/child_process:1064:16)
29 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
30 verbose pkgid cic-staff-client@0.0.0
31 verbose cwd /app
32 verbose Linux 5.10.25-linuxkit
33 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start:dev"
34 verbose node v16.7.0
35 verbose npm v7.20.3
36 error path /app
37 error command failed
38 error signal SIGTERM
39 error command sh -c ng serve -c dev
40 verbose exit 1

View File

@@ -1,44 +0,0 @@
0 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'start:dev' ]
1 info using npm@7.20.3
2 info using node@v16.7.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 6ms
6 timing config:load:builtin Completed in 7ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/app/.npmrc Completed in 9ms
10 timing config:load:project Completed in 15ms
11 timing config:load:file:/root/.npmrc Completed in 2ms
12 timing config:load:user Completed in 2ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 32ms
19 timing npm:load:configload Completed in 33ms
20 timing npm:load:setTitle Completed in 1ms
21 timing npm:load:setupLog Completed in 1ms
22 timing npm:load:cleanupLog Completed in 3ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 4ms
25 timing npm:load Completed in 43ms
26 timing config:load:flatten Completed in 7ms
27 timing command:run-script Completed in 450289ms
28 verbose stack Error: command failed
28 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
28 verbose stack at ChildProcess.emit (node:events:394:28)
28 verbose stack at maybeClose (node:internal/child_process:1064:16)
28 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
29 verbose pkgid cic-staff-client@0.0.0
30 verbose cwd /app
31 verbose Linux 5.10.25-linuxkit
32 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start:dev"
33 verbose node v16.7.0
34 verbose npm v7.20.3
35 error path /app
36 error command failed
37 error signal SIGTERM
38 error command sh -c ng serve -c dev
39 verbose exit 1

View File

@@ -1,8 +1,6 @@
# defining version of the base image
FROM node:alpine as build
RUN apk add --no-cache bash
# defining work directory
WORKDIR /app
@@ -11,7 +9,7 @@ COPY package*.json .
COPY patch-webpack.js .
# copying rest of project
RUN --mount=type=cache,id=npm,target=/app/.npm \
RUN --mount=type=cache,target=/app/.npm \
npm set cache /app/.npm && \
npm ci
@@ -23,7 +21,7 @@ RUN npm run build:${FRONTEND_ENV}
### STAGE 2: Setup ###
# defining nginx image version
FROM nginx:alpine as server
FROM nginx:alpine
## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*

View File

@@ -1,25 +0,0 @@
# defining version of the base image
FROM node:alpine
RUN apk add --no-cache bash
# defining work directory
WORKDIR /app
# copying the json files into the image
COPY package*.json .
COPY patch-webpack.js .
# copying rest of project
RUN --mount=type=cache,id=npm,target=/app/.npm \
npm set cache /app/.npm && \
npm ci
COPY . .
EXPOSE 4200
ARG FRONTEND_ENV=dev
# running build script

View File

@@ -1,6 +1,5 @@
# CICADA
An angular admin web client for managing users and transactions in the CIC network.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.0.

File diff suppressed because it is too large Load Diff

View File

@@ -19,6 +19,7 @@
"e2e": "ng e2e",
"precommit": "npm run format:fix && npm run lint",
"postinstall": "node patch-webpack.js",
"prepare": "husky install",
"compodoc": "npx compodoc -p tsconfig.doc.json -d docs/compodoc -n CICADA",
"typedoc": "npx typedoc --tsconfig tsconfig.json --exclude **/*.spec.ts --out docs/typedoc --name CICADA src",
"docs": "npm run typedoc && npm run compodoc"
@@ -65,7 +66,7 @@
"codelyzer": "^6.0.0",
"dotenv": "^8.2.0",
"husky": "^6.0.0",
"jasmine-core": "~3.8.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
@@ -89,7 +90,7 @@
"yargs": "^13.3.2"
},
"lint-staged": {
"src/**/*.{js,ts,scss,md,html,json}": ["prettier --write"],
"src/**/*.{js,ts,scss,md,html,json}": ["prettier --write", "git add"],
"*.scss": ["stylelint src/**/*.scss"]
},
"husky": {

View File

@@ -17,6 +17,9 @@
"importHelpers": true,
"target": "es2015",
"module": "es2020",
"lib": ["es2018", "dom"]
"lib": [
"es2018",
"dom"
]
}
}

View File

@@ -12,7 +12,7 @@ ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
COPY requirements.txt .
RUN --mount=type=cache,id=pip,mode=0755,target=/root/.cache/pip \
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
-r requirements.txt

View File

@@ -33,7 +33,7 @@ ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG EXTRA_PIP_ARGS=""
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
ARG pip_trusted_host=pypi.org
RUN --mount=type=cache,id=pip,mode=0755,target=/root/.cache/pip \
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \
--force-reinstall \
--trusted-host $pip_trusted_host \

View File

@@ -155,6 +155,9 @@ if [[ -n "${ETH_PROVIDER}" ]]; then
>&2 echo "set faucet as token minter"
giftable-token-minter $gas_price_arg -w -y $DEV_ETH_KEYSTORE_FILE -a $DEV_RESERVE_ADDRESS -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -vv $DEV_FAUCET_ADDRESS
else
echo "\$ETH_PROVIDER not set!"
exit 1

View File

@@ -15,7 +15,7 @@ COPY requirements.txt .
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
RUN --mount=type=cache,id=pip,mode=0755,target=/root/.cache/pip pip install \
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install \
--extra-index-url $GITLAB_PYTHON_REGISTRY \
--extra-index-url $EXTRA_INDEX_URL -r requirements.txt

View File

@@ -63,15 +63,12 @@ services:
cicada:
build:
dockerfile: Dockerfile.local
args:
FRONTEND_ENV: dev
ports:
- 4200:4200
target: build
command: npm run start:dev
#command: bash -c "while true; do sleep 1; done" # Infinite loop to keep container live doing nothing
volumes:
- ./apps/cic-staff-client:/app
- ./apps/cic-staff-client:/app/
labels:
- traefik.enable=true
- traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}
@@ -88,6 +85,7 @@ services:
- traefik.http.services.${STACK_NAME?Variable not set}-cache.loadbalancer.server.port=63313
cic-meta-server:
image: $REGISTRY:$TAG
ports:
- ${HTTP_PORT_CIC_META:-63380}:8000
#depends_on:

View File

@@ -732,23 +732,3 @@ services:
restart_policy:
condition: on-failure
command: "/root/start_cic_user_tasker.sh -q cic-ussd -vv"
auth-proxy-meta:
image: registry.gitlab.com/grassrootseconomics/cic-auth-proxy:latest
environment:
PROXY_HOST: cic-meta-server
PROXY_PORT: "80"
PROXY_PATH_PREFIX: "/"
HTTP_AUTH_ORIGIN: https://meta-auth.dev.grassrootseconomics.net:443
HTTP_AUTH_REALM: GE
ACL_CREDENTIALS_ENDPOINT: http://key-server:8081/
ACL_PATH: /data/acls/F3FAF668E82EF5124D5187BAEF26F4682343F692
GPG_PUBLICKEYS_ENDPOINT: http://key-server:8080/.well-known/publickeys/
GPG_SIGNATURE_ENDPOINT: http://key-server:8080/.well-known/signature/
GPG_TRUSTED_PUBLICKEY_FINGERPRINT: CCE2E1D2D0E36ADE0405E2D0995BB21816313BD5
GPG_HOMEDIR: /usr/local/etc/cic-auth-proxy/.gnupg/
GPG_IMPORT_DIR: /usr/local/etc/cic-auth-proxy/import/
GPG_PUBLICKEY_FILENAME: publickeys.asc
GPG_SIGNATURE_FILENAME: signature.asc
GPG_TRUSTED_PUBLICKEY_MATERIAL: /usr/local/etc/cic-auth-proxy/trusted/trustedpublickey.asc