2021-03-27 06:47:21 +00:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- bundle
|
|
|
|
|
2021-03-27 07:24:17 +00:00
|
|
|
variables:
|
2021-04-02 12:44:11 +00:00
|
|
|
VERSION: 0.0.13
|
2021-03-27 07:24:17 +00:00
|
|
|
|
2021-03-27 06:47:21 +00:00
|
|
|
build-go:
|
|
|
|
image: golang:1.16.2
|
|
|
|
stage: build
|
2021-03-31 08:40:20 +00:00
|
|
|
only:
|
|
|
|
- master
|
2021-03-27 06:47:21 +00:00
|
|
|
script:
|
|
|
|
- go build -o goscrobble cmd/go-scrobble/*.go
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 day
|
|
|
|
paths:
|
|
|
|
- goscrobble
|
|
|
|
- migrations
|
|
|
|
- init
|
2021-03-27 22:01:58 +00:00
|
|
|
- .env.example
|
2021-03-27 06:47:21 +00:00
|
|
|
|
|
|
|
build-react:
|
|
|
|
image: node:15.12.0
|
|
|
|
stage: build
|
2021-03-31 08:40:20 +00:00
|
|
|
only:
|
|
|
|
- master
|
2021-03-27 06:47:21 +00:00
|
|
|
script:
|
|
|
|
- cd web
|
|
|
|
- npm install
|
2021-03-27 22:01:58 +00:00
|
|
|
- npm run build --env production
|
2021-03-27 06:47:21 +00:00
|
|
|
artifacts:
|
|
|
|
expire_in: 1 day
|
|
|
|
paths:
|
|
|
|
- web/build
|
|
|
|
|
|
|
|
bundle:
|
2021-03-27 07:24:17 +00:00
|
|
|
image: bash:latest
|
2021-03-27 06:47:21 +00:00
|
|
|
stage: bundle
|
2021-03-31 08:40:20 +00:00
|
|
|
only:
|
|
|
|
- master
|
2021-03-27 06:47:21 +00:00
|
|
|
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 22:01:58 +00:00
|
|
|
- zip -r goscrobble.${VERSION}.zip web/build goscrobble migrations init .env.example
|
|
|
|
- tar -czf goscrobble.${VERSION}.tar.gz web/build goscrobble migrations init .env.example
|
2021-03-27 07:24:17 +00:00
|
|
|
artifacts:
|
2021-03-27 22:01:58 +00:00
|
|
|
expire_in: 1 week
|
2021-03-27 07:24:17 +00:00
|
|
|
paths:
|
|
|
|
- goscrobble.${VERSION}.zip
|
|
|
|
- goscrobble.${VERSION}.tar.gz
|