summaryrefslogtreecommitdiff
path: root/.expeditor/habitat-test.pipeline.yml
blob: 859d4eb1f117c08b4f02113dccf3a27eff3bc658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
expeditor:
  defaults:
    buildkite:
      timeout_in_minutes: 60
      retry:
        automatic:
          limit: 1

steps:

- label: ":linux: Validate Linux"
  commands:
    - sudo ./.expeditor/scripts/install-hab.sh x86_64-linux
    - 'echo "--- :hammer_and_wrench: Installing $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUX"'
    - sudo hab pkg install $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUX
    - sudo ./habitat/tests/test.sh $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUX
  expeditor:
    executor:
      linux:
        privileged: true
        single-use: true

- label: ":linux: Validate Linux (kernel2)"
  commands:
    - sudo ./.expeditor/scripts/install-hab.sh x86_64-linux-kernel2
    - 'echo "--- :hammer_and_wrench: Installing $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUXKERNEL2"'
    - sudo hab pkg install $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUXKERNEL2
    - sudo ./habitat/tests/test.sh $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUXKERNEL2
  expeditor:
    executor:
      linux:
        privileged: true
        single-use: true

- label: ":windows: Validate Habitat Builds of Chef Infra"
  commands:
    - powershell -File ./.expeditor/scripts/ensure-minimum-viable-hab.ps1
    - 'Write-Host "--- :hammer_and_wrench: Installing $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS"'
    - hab pkg install $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS
    - powershell -File ./habitat/tests/test.ps1 -PackageIdentifier $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS
  expeditor:
    executor:
      windows:
        privileged: true
        single-use: true

# Wait for the package testing to succeed before promoting whatever was tested.
- wait

- label: ":habicat: Promoting packages to the current channel."
  commands:
    - hab pkg promote $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUX current x86_64-linux
    - hab pkg promote $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64LINUXKERNEL2 current x86_64-linux-kernel2
    - hab pkg promote $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS current x86_64-windows
  expeditor:
    executor:
      docker:
    secrets:
      HAB_AUTH_TOKEN:
        path: account/static/habitat/chef-ci
        field: auth_token