|
|
@ -30,9 +30,17 @@ stages:
|
|
|
|
build-image.nginx:
|
|
|
|
build-image.nginx:
|
|
|
|
<<: *docker_definition
|
|
|
|
<<: *docker_definition
|
|
|
|
stage: build-frontend
|
|
|
|
stage: build-frontend
|
|
|
|
|
|
|
|
artifacts:
|
|
|
|
|
|
|
|
name: "${CI_JOB_NAME}_${CI_JOB_ID}_assets"
|
|
|
|
|
|
|
|
expire_in: 1 day
|
|
|
|
|
|
|
|
paths:
|
|
|
|
|
|
|
|
- ./public/assets
|
|
|
|
script:
|
|
|
|
script:
|
|
|
|
- docker build --pull -t "${TEST_IMAGE}-nginx" -f contrib/nginx/Dockerfile .
|
|
|
|
- docker build --pull -t "${TEST_IMAGE}-nginx" -f contrib/nginx/Dockerfile .
|
|
|
|
- docker push "${TEST_IMAGE}-nginx"
|
|
|
|
- docker push "${TEST_IMAGE}-nginx"
|
|
|
|
|
|
|
|
- instance=$(docker create "${TEST_IMAGE}-nginx")
|
|
|
|
|
|
|
|
- docker cp "${instance}:/var/www/public/assets" public/
|
|
|
|
|
|
|
|
- docker rm "${instance}"
|
|
|
|
|
|
|
|
|
|
|
|
build-image:
|
|
|
|
build-image:
|
|
|
|
<<: *docker_definition
|
|
|
|
<<: *docker_definition
|
|
|
@ -40,7 +48,7 @@ build-image:
|
|
|
|
script:
|
|
|
|
script:
|
|
|
|
- apk -q add git
|
|
|
|
- apk -q add git
|
|
|
|
- VERSION="$(git describe --abbrev=0 --tags)-${CI_COMMIT_REF_NAME}+${CI_PIPELINE_ID}.${CI_COMMIT_SHORT_SHA}"
|
|
|
|
- VERSION="$(git describe --abbrev=0 --tags)-${CI_COMMIT_REF_NAME}+${CI_PIPELINE_ID}.${CI_COMMIT_SHORT_SHA}"
|
|
|
|
- docker build --pull --build-arg NGINX_IMAGE="${TEST_IMAGE}-nginx" --build-arg VERSION="${VERSION}" -t "${TEST_IMAGE}" -f contrib/Dockerfile .
|
|
|
|
- docker build --pull --build-arg VERSION="${VERSION}" -t "${TEST_IMAGE}" -f contrib/Dockerfile .
|
|
|
|
- docker push "${TEST_IMAGE}"
|
|
|
|
- docker push "${TEST_IMAGE}"
|
|
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
test:
|
|
|
@ -114,6 +122,7 @@ build-release-file:
|
|
|
|
- ./release/
|
|
|
|
- ./release/
|
|
|
|
script:
|
|
|
|
script:
|
|
|
|
- rsync -vAax "${DOCROOT}" release/
|
|
|
|
- rsync -vAax "${DOCROOT}" release/
|
|
|
|
|
|
|
|
- rsync -vAax public/assets release/public/
|
|
|
|
|
|
|
|
|
|
|
|
deploy-staging:
|
|
|
|
deploy-staging:
|
|
|
|
<<: *deploy_definition
|
|
|
|
<<: *deploy_definition
|
|
|
|