pianello-web-app/.woodpecker/.build.yml

22 lines
785 B
YAML
Raw Normal View History

2023-05-28 12:56:31 +02:00
pipeline:
build:
2023-05-31 16:01:47 +02:00
image: node:20.2.0-alpine3.16
2023-05-28 12:56:31 +02:00
secrets: [docker_password, docker_username]
commands:
# Install deps
- apk add docker docker-compose jq
2023-05-31 16:01:47 +02:00
# Build app
2023-05-31 18:01:23 +02:00
- yarn install --frozen-lockfile
- yarn build
2023-05-28 12:56:31 +02:00
# Log into docker registry
- echo "$${DOCKER_PASSWORD}" | docker login --password-stdin --username "$${DOCKER_USERNAME}" git.webdeploy.it
2023-05-31 17:59:52 +02:00
- echo "TAG=$(jq -r .version ./package.json)" >> .env
2023-05-28 12:56:31 +02:00
# Build image
2023-05-31 17:58:13 +02:00
- docker-compose -f docker-compose.build.yml build
2023-05-28 12:56:31 +02:00
- docker push git.webdeploy.it/pianello/pianello-web-app:latest
2023-05-31 16:26:03 +02:00
- docker push git.webdeploy.it/pianello/pianello-web-app:$(jq -r .version ./package.json)
2023-05-28 12:56:31 +02:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2023-05-31 16:01:47 +02:00
branches: main