18 lines
698 B
YAML
18 lines
698 B
YAML
pipeline:
|
|
build:
|
|
image: alpine:3.14
|
|
secrets: [docker_password, docker_username]
|
|
commands:
|
|
# Install deps
|
|
- apk add docker docker-compose jq
|
|
# Log into docker registry
|
|
- echo "$${DOCKER_PASSWORD}" | docker login --password-stdin --username "$${DOCKER_USERNAME}" git.webdeploy.it
|
|
- echo "TAG=$(jq -r .version ./package.json)" >> .env
|
|
# Build image
|
|
- docker-compose -f docker-compose.build.yml build
|
|
- docker push git.webdeploy.it/pianello/pianello-web-app:latest
|
|
- docker push git.webdeploy.it/pianello/pianello-web-app:$(jq -r .version ./package.json)
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
branches: main
|