Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iGEM
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iGEM Websites
iGEM
Commits
62eba2bc
Commit
62eba2bc
authored
3 years ago
by
Fabio Maschi
Browse files
Options
Downloads
Patches
Plain Diff
Upgrade CI/CD infrastructure
parent
4cb82862
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2598
passed
3 years ago
Stage: build
Stage: test
Stage: deploy
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+3
-79
3 additions, 79 deletions
.gitlab-ci.yml
support/change-homepage.sh
+0
-1
0 additions, 1 deletion
support/change-homepage.sh
with
3 additions
and
80 deletions
.gitlab-ci.yml
+
3
−
79
View file @
62eba2bc
# node image
image
:
node:16.13.1-alpine
# cache dependencies
cache
:
-
key
:
files
:
-
yarn.lock
paths
:
-
.yarn-cache/
-
when
:
'
on_success'
.build
:
stage
:
build
script
:
-
echo 'yarn-offline-mirror ".yarn-cache/"' >> .yarnrc
-
echo 'yarn-offline-mirror-pruning
true
' >> .yarnrc
-
yarn install --production --frozen-lockfile --no-progress
-
chmod +x support/change-homepage.sh
-
./support/change-homepage.sh
-
yarn build
-
rm ./public -rf
-
mv ./build ./public
-
cp ./public/index.html ./public/404.html
artifacts
:
paths
:
-
public
build-prod
:
environment
:
name
:
production
extends
:
.build
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
!=
$CI_DEFAULT_BRANCH'
when
:
never
-
if
:
'
$CI_COMMIT_TAG
||
$CI_COMMIT_BRANCH'
build-dev
:
environment
:
name
:
development
extends
:
.build
variables
:
AWS_DEPLOY_PREFIX
:
$CI_PROJECT_NAME
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
when
:
never
-
if
:
'
$CI_COMMIT_TAG
||
$CI_COMMIT_BRANCH'
lint
:
stage
:
test
script
:
-
yarn
-
yarn lint
pages
:
stage
:
deploy
environment
:
name
:
production
script
:
-
echo "Deploy to GitLab pages";
artifacts
:
paths
:
-
public
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
!=
$CI_DEFAULT_BRANCH'
when
:
never
-
if
:
'
$CI_COMMIT_TAG
||
$CI_COMMIT_BRANCH'
pages-dev
:
stage
:
deploy
environment
:
name
:
development
image
:
'
registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest'
script
:
-
aws s3 sync ./public s3://$AWS_FRONTENDS_BUCKET_DEV/$CI_PROJECT_NAME --delete
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
when
:
never
-
if
:
'
$CI_COMMIT_TAG
||
$CI_COMMIT_BRANCH'
include
:
-
project
:
'
hq-tech/ci-cd-templates'
file
:
'
/websites.gitlab-ci.yml'
This diff is collapsed.
Click to expand it.
support/change-homepage.sh
deleted
100644 → 0
+
0
−
1
View file @
4cb82862
sed
-i
's/"homepage": "\/",/"homepage": "\/'
$AWS_DEPLOY_PREFIX
'",/g'
./package.json
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment