.gitlab-ci.yml 700 Bytes
Newer Older
julien dehos's avatar
julien dehos committed
1
build:
julien dehos's avatar
julien dehos committed
2
    type: build
julien dehos's avatar
julien dehos committed
3 4 5 6 7
    image: juliendehos/misomorphic:latest
    artifacts:
        untracked: true
    script:
        - nix-build nix/docker.nix
julien dehos's avatar
julien dehos committed
8
        - cp result app.tar.gz
julien dehos's avatar
julien dehos committed
9 10 11 12 13
    only:
        - master

production:
    type: deploy
julien dehos's avatar
julien dehos committed
14
    image: docker:stable
julien dehos's avatar
julien dehos committed
15 16
    services:
        - docker:dind
julien dehos's avatar
julien dehos committed
17
    before_script:
julien dehos's avatar
julien dehos committed
18
        - apk add curl bash nodejs
julien dehos's avatar
julien dehos committed
19
        - curl https://cli-assets.heroku.com/install.sh | sh
julien dehos's avatar
julien dehos committed
20
    script:
julien dehos's avatar
julien dehos committed
21
        - docker load < app.tar.gz
julien dehos's avatar
julien dehos committed
22
        - heroku container:login
julien dehos's avatar
julien dehos committed
23 24 25
        - docker tag $APP_NAME registry.heroku.com/$APP_NAME/web
        - docker push registry.heroku.com/$APP_NAME/web
        - heroku container:release web --app $APP_NAME
julien dehos's avatar
julien dehos committed
26 27 28 29
    only:
        - master