.gitlab-ci.yml 697 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
stages:
  - build
  - deploy

Gen-VM:
  tags:
    - "virtualbox"
    - "ansible"
    - "vagrant"
  stage: build
Jean-Francois Rey's avatar
Jean-Francois Rey committed
11
  script:
Jean-Francois Rey's avatar
up ci    
Jean-Francois Rey committed
12
13
    - vboxmanage controlvm windows10R4 poweroff || true
    - vboxmanage unregistervm --delete windows10R4 || true
Jean-Francois Rey's avatar
up CI    
Jean-Francois Rey committed
14
15
    - vagrant up
    - vagrant halt windows10R4
16
17
18
19
20
21
22
23

Deploy-VM:
  tags:
    - "virtualbox"
    - "ansible"
    - "vagrant"
  stage: deploy
  when: on_success
Jean-Francois Rey's avatar
Jean-Francois Rey committed
24
  script:
Jean-Francois Rey's avatar
up ci    
Jean-Francois Rey committed
25
26
27
28
    - vboxmanage controlvm win10R4 poweroff || true
    - vboxmanage unregistervm --delete win10R4 || true
    - vboxmanage modifyvm windows10R4 --name win10R4 || true
    - sudo vboxmanage unregistervm win10R4 || true
Jean-Francois Rey's avatar
Jean-Francois Rey committed
29
    - sudo vboxmanage registervm "/home/VirtualBox VMs/win10R4/win10R4.vbox"