Skip to content

Commit

Permalink
update syntax
Browse files Browse the repository at this point in the history
use 18.04 and setup snapcraft
  • Loading branch information
TravisEz13 committed Mar 25, 2019
1 parent 57af84c commit db53810
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .vsts-ci/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ resources:
- repo: self
clean: true

phases:
jobs:

- phase: Set_Build_Name
- job: Set_Build_Name
# displayName: Set Build Name
condition: ne(variables['Build.Reason'], 'PullRequest')
queue:
pool:
name: Hosted Ubuntu 1604
steps:
- powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhss"))"
Expand Down
22 changes: 18 additions & 4 deletions .vsts-ci/phase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,32 @@ parameters:
queue: 'Hosted Ubuntu 1604'
snapChannel: 'stable'

phases:
- phase: ${{ parameters.SnapChannel }}
jobs:
- job: ${{ parameters.SnapChannel }}
displayName: ${{ parameters.SnapChannel }}

queue:
name: ${{ parameters.queue }}
container: ubuntu:18.04

pool: ${{ parameters.queue }}

variables:
SnapChannel: ${{ parameters.SnapChannel }}

steps:

- bash: |
apt-get update
apt-get dist-upgrade --yes
apt-get install --yes curl sudo jq squashfs-tools
curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/core' | jq '.download_url' -r) --output core.snap
mkdir -p /snap/core && unsquashfs -d /snap/core/current core.snap && rm core.snap
curl -L $(curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/snapcraft?channel=edge' | jq '.download_url' -r) --output snapcraft.snap
mkdir -p /snap/snapcraft && unsquashfs -d /snap/snapcraft/current snapcraft.snap && rm snapcraft.snap
apt remove --yes --purge curl jq squashfs-tools
apt-get autoclean --yes
apt-get clean --yes
displayName: 'Setup Snapcraft'
- powershell: 'dir env:'
displayName: 'Capture Environment'

Expand Down

0 comments on commit db53810

Please sign in to comment.