Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
whats-open-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
whats-open-web
Commits
6d4586ce
Commit
6d4586ce
authored
Jun 03, 2018
by
Andrew Hrdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Environment variables fixed. Using npm in gitlab-ci.
parent
c1e447d0
Pipeline
#2486
failed with stage
in 4 minutes and 29 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
.gitlab-ci.yml
.gitlab-ci.yml
+4
-6
src/actions/api.js
src/actions/api.js
+1
-1
webpack/webpack.config.prod.js
webpack/webpack.config.prod.js
+4
-0
No files found.
.gitlab-ci.yml
View file @
6d4586ce
...
...
@@ -9,9 +9,8 @@ build:
variables
:
API_GET_FACILITIES
:
"
https://api.srct.gmu.edu/whatsopen/v2/facilities/"
script
:
-
npm install -g yarn
-
yarn install
-
CI=false REACT_APP_API_GET_FACILITIES=$API_GET_FACILITIES npm run build
-
npm install
-
CI=false API_GET_FACILITIES=$API_GET_FACILITIES npm run build
artifacts
:
paths
:
-
build
...
...
@@ -21,9 +20,8 @@ build_shopmason:
variables
:
API_GET_FACILITIES
:
"
https://api.srct.gmu.edu/whatsopen/v2/facilities/?facility_classifier=shopmason"
script
:
-
npm install -g yarn
-
yarn install
-
CI=false REACT_APP_API_GET_FACILITIES=$API_GET_FACILITIES npm run build
-
npm install
-
CI=false API_GET_FACILITIES=$API_GET_FACILITIES npm run build
artifacts
:
paths
:
-
build
...
...
src/actions/api.js
View file @
6d4586ce
import
{
GET_ALERTS
,
GET_FACILITIES
,
SET_ALERTS
,
SET_FACILITIES
,
SORT_FACILITY_CARDS
,
VIEW_ALERT
}
from
'
./action-types
'
;
const
API_GET_FACILITIES
=
process
.
env
.
REACT_APP_API_GET_FACILITIES
?
process
.
env
.
REACT_APP_
API_GET_FACILITIES
:
const
API_GET_FACILITIES
=
process
.
env
.
API_GET_FACILITIES
?
process
.
env
.
API_GET_FACILITIES
:
'
https://api.srct.gmu.edu/whatsopen/v2/facilities/
'
;
const
API_GET_ALERTS
=
'
https://api.srct.gmu.edu/whatsopen/v2/alerts/?ordering=urgency_tag
'
;
export
const
getFacilities
=
()
=>
(
dispatch
)
=>
{
...
...
webpack/webpack.config.prod.js
View file @
6d4586ce
const
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
);
const
webpack
=
require
(
'
webpack
'
);
const
SWPrecacheWebpackPlugin
=
require
(
'
sw-precache-webpack-plugin
'
);
const
MiniCssExtractPlugin
=
require
(
'
mini-css-extract-plugin
'
);
const
CleanWebpackPlugin
=
require
(
'
clean-webpack-plugin
'
);
...
...
@@ -77,6 +78,9 @@ module.exports = {
new
MiniCssExtractPlugin
({
filename
:
'
[name].css
'
,
chunkFilename
:
'
[id].css
'
}),
new
webpack
.
DefinePlugin
({
'
process.env.API_GET_FACILITIES
'
:
process
.
env
.
API_GET_FACILITIES
})
]
};
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment