Skip to content
Snippets Groups Projects
Commit 5a5d23b3 authored by Harry Milne's avatar Harry Milne
Browse files

add fe review apps template

parent fbd6cd7b
Branches
Tags 3.0.2
No related merge requests found
# USAGE
# --
# include:
# - project: 'devops/ci'
# ref: 3.0.2
# file: gitlab/fe-review-apps.yml
# fe-review-app:
# extends: .fe-review-app-template
# script:
# - ./setup-fe-review-app.sh
.fe-review-app-template:
environment:
name: review/$CI_COMMIT_SHORT_SHA
url: https://iwoca-dev-public-frontend-bucket.s3-eu-west-1.amazonaws.com/$CI_PROJECT_PATH/$CI_COMMIT_SHORT_SHA/
variables:
FE_REVIEW_BUCKET_URI: "s3://iwoca-dev-public-frontend-bucket/${CI_PROJECT_PATH}/${CI_COMMIT_SHORT_SHA}/"
before_script:
- curl https://git.iwoca.co.uk/devops/ci/raw/3.0.2/scripts/setup-fe-review-app.sh > setup-fe-review-app.sh
- chmod +x setup-fe-review-app.sh
#! /bin/bash
set -e
build_path="${1}"
# job variables
FE_REVIEW_BUCKET_URI="${FE_REVIEW_BUCKET_URI}"
function usage {
echo "Usage: setup-fe-review-app.sh <BUILD_PATH>"
echo
echo "Sync BUILD_PATH to FE_REVIEW_BUCKET_URI."
echo
echo "Example:"
echo
echo " ./setup-fe-review-app.sh dist"
exit 1
}
if [ -z "${build_path}" ]; then
usage
fi
aws s3 sync "${build_path}" "${FE_REVIEW_BUCKET_URI}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment