This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.gitlab-ci.yml
64 lines (60 loc) · 1.76 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
include:
- project: SocialGouv/gitlab-ci-yml
file: /autodevops.yml
ref: v20.7.3
variables:
AUTO_DEVOPS_RELEASE_AUTO: "🔖"
AUTO_DEVOPS_PRODUCTION_AUTO: "🚀"
AUTO_DEVOPS_ENABLE_KAPP: "🚀"
AUTO_DEVOPS_KANIKO: "🕹️"
PROJECT_PATH: "socialgouv/sample-next-app" # for notify
Register Kaniko image:
extends: .autodevops_register_kaniko_image
variables:
IMAGE_NAME: app
Register hasura image:
extends: .autodevops_register_kaniko_image
dependencies: []
needs: []
variables:
DOCKER_BUILD_ARGS: >-
--dockerfile=hasura/Dockerfile
CONTEXT: hasura
IMAGE_NAME: hasura
E2E test on deployed branch:
stage: Deploy
image: registry.gitlab.factory.social.gouv.fr/socialgouv/docker/puppeteer:1.60.0
allow_failure: true
except:
refs:
# Don't run on release
- tags
- master
variables:
# Don't run when deploying in production
- $PRODUCTION
# Don't run when releasing
- $RELEASE
environment:
name: ${CI_COMMIT_REF_NAME}-dev2
url: https://${CI_ENVIRONMENT_SLUG}-${CI_PROJECT_NAME}.${KUBE_INGRESS_BASE_DOMAIN}
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- optional/e2e/runners/puppeteer/node_modules
- $CI_PROJECT_DIR/.yarn
before_script:
- export CODECEPT_BASEURL=${CI_ENVIRONMENT_URL}
- cd ./optional/e2e/runners/puppeteer
- |-
retry=180;
while
! wget -q -O - "$@" "${CODECEPT_BASEURL}" | grep -i "Welcome" &&
[[ $(( retry-- )) -gt 0 ]];
do echo "Waiting for ${CODECEPT_BASEURL} to be ready" ; sleep 3 ; done ;
[ "$retry" -eq "-1" ] && exit 1
script:
- yarn config set cache-folder $CI_PROJECT_DIR/.yarn
- yarn --frozen-lockfile
- "echo CODECEPT_BASEURL: $CODECEPT_BASEURL"
- yarn test