2021-03-27 06:47:21 +00:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- bundle
|
|
|
|
|
2021-03-27 07:24:17 +00:00
|
|
|
variables:
|
2021-03-30 02:02:04 +00:00
|
|
|
VERSION: 0.0.3
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|