2021-03-27 06:47:21 +00:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- bundle
|
|
|
|
|
2021-03-27 07:24:17 +00:00
|
|
|
variables:
|
|
|
|
VERSION: 0.0.1
|
|
|
|
|
2021-03-27 06:47:21 +00:00
|
|
|
build-go:
|
|
|
|
image: golang:1.16.2
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- go build -o goscrobble cmd/go-scrobble/*.go
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 day
|
|
|
|
paths:
|
|
|
|
- goscrobble
|
|
|
|
- migrations
|
|
|
|
- init
|
|
|
|
|
|
|
|
build-react:
|
|
|
|
image: node:15.12.0
|
|
|
|
stage: build
|
|
|
|
variables:
|
|
|
|
REACT_APP_API_URL: "https://goscrobble.com"
|
|
|
|
script:
|
|
|
|
- cd web
|
|
|
|
- npm install
|
|
|
|
- npm run build
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 day
|
|
|
|
paths:
|
|
|
|
- web/build
|
|
|
|
- .env.example
|
|
|
|
|
|
|
|
bundle:
|
2021-03-27 07:24:17 +00:00
|
|
|
image: bash:latest
|
2021-03-27 06:47:21 +00:00
|
|
|
stage: bundle
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
2021-03-27 07:24:17 +00:00
|
|
|
before_script:
|
|
|
|
- apk add --no-cache zip tar
|
2021-03-27 06:47:21 +00:00
|
|
|
script:
|
2021-03-27 21:39:08 +00:00
|
|
|
- zip -r goscrobble.zip web/build goscrobble migrations init .env.example
|
|
|
|
- tar -czf goscrobble.tar.gz web/build goscrobble migrations init .env.example
|
2021-03-27 07:24:17 +00:00
|
|
|
artifacts:
|
|
|
|
expire_in: 6 months
|
|
|
|
paths:
|
|
|
|
- goscrobble.${VERSION}.zip
|
|
|
|
- goscrobble.${VERSION}.tar.gz
|