1
1
variables :
2
- DOCKER_DRIVER : overlay2
3
- DOCKER_TLS_CERTDIR : " "
4
- DOCKER_HOST : tcp://docker:2375
5
2
SONAR_HOST_URL : https://sonarcloud.io
6
3
7
4
image : $CI_REGISTRY/autowp/runner-base-image
@@ -24,28 +21,23 @@ build:
24
21
- npx ng lint
25
22
- npx stylelint "src/**/*.scss"
26
23
- sonar-scanner -Dsonar.login=$SONAR_TOKEN
27
- - ./node_modules/.bin/ng build --configuration production --no-progress --base-href=/ --extra-webpack-config webpack.extra.js
24
+ - ./node_modules/.bin/ng build --configuration production --no-progress --base-href=/
28
25
- npx semantic-release
29
26
rules :
30
27
- if : $CI_COMMIT_TAG !~ /^v\d.*/
31
28
32
29
deploy :
33
30
stage : deploy
34
- services :
35
- - name : docker:dind
36
- alias : docker
37
- before_script :
38
- - waitforit -address=tcp://docker:2375 -timeout=30
39
31
script :
40
32
- npm ci || npm cache clear --force && npm ci
41
33
- " jq -n --arg release \" $CI_COMMIT_TAG\" '{release: $release}' > src/version.json"
42
- - ./node_modules/.bin/ng build --configuration production --no-progress --base-href=/ --extra-webpack-config webpack.extra.js
34
+ - ./node_modules/.bin/ng build --configuration production --no-progress --base-href=/
43
35
44
- - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
45
- - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY_IMAGE "
46
- - docker pull "$CI_REGISTRY_IMAGE" || true
47
- - docker build . -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
48
- - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
36
+ - echo "$DOCKER_PASSWORD" | buildah login -u "$DOCKER_USERNAME" --password-stdin docker.io
37
+ - echo "$CI_REGISTRY_PASSWORD" | buildah login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY "
38
+ - buildah pull "$CI_REGISTRY_IMAGE" || true
39
+ - buildah build . -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
40
+ - buildah push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
49
41
50
42
- sentry-cli releases new "$CI_COMMIT_TAG" || true
51
43
- git config --global user.email "$GITLAB_USER_EMAIL"
@@ -58,11 +50,9 @@ deploy:
58
50
- git push origin master
59
51
- sentry-cli releases finalize "$CI_COMMIT_TAG" || true
60
52
61
- - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
62
- - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY_IMAGE"
63
- - docker pull "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
64
- - docker tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" autowp/autowp-frontend:$CI_COMMIT_TAG
65
- - docker push autowp/autowp-frontend:$CI_COMMIT_TAG
53
+ - buildah pull "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
54
+ - buildah tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" autowp/autowp-frontend:$CI_COMMIT_TAG
55
+ - buildah push autowp/autowp-frontend:$CI_COMMIT_TAG
66
56
rules :
67
57
- if : $CI_COMMIT_TAG =~ /^v\d.*/
68
58
environment :
0 commit comments