.gitlab-ci.yml 789 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
Jean-Francois Rey committed
14
15
    - vagrant up > vagrantup.log
    - vagrant snapshot bootR4
Jean-Francois Rey's avatar
up CI    
Jean-Francois Rey committed
16
    - vagrant halt windows10R4
Jean-Francois Rey's avatar
Jean-Francois Rey committed
17
18
19
  artifacts:
    paths:
      - vagrantup.log
20
21
22
23
24
25
26
27

Deploy-VM:
  tags:
    - "virtualbox"
    - "ansible"
    - "vagrant"
  stage: deploy
  when: on_success
Jean-Francois Rey's avatar
Jean-Francois Rey committed
28
  script:
Jean-Francois Rey's avatar
up ci    
Jean-Francois Rey committed
29
30
31
32
    - 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
33
    - sudo vboxmanage registervm "/home/VirtualBox VMs/win10R4/win10R4.vbox"