chef / anka-buildkite-plugin Goto Github PK
View Code? Open in Web Editor NEWRun Buildkite steps inside Veertu Anka Virtual Machines
License: Apache License 2.0
Run Buildkite steps inside Veertu Anka Virtual Machines
License: Apache License 2.0
Turns out you need four spaces for options under the plugins which are defined as a list item:
Two spaces works if not a list item. Problem is that plugins can be loaded out of order.
steps:
- command: make test
plugins:
chef/anka#v0.5.1:
vm-name: macos-base-10.14
Two spaces does not work if it's a list item
steps:
- command: make test
plugins:
- chef/anka#v0.5.1:
vm-name: macos-base-10.14
Four spaces does work if list item.
steps:
- command: make test
plugins:
- chef/anka#v0.5.1:
vm-name: macos-base-10.14
Need to update the readme.
anka run --volume /tmp/test --workdir /tmp/test
shows: -anka: /tmp/test: Invalid argument
These need to be quoted
2.0.0 has a new feature which allows you to extend an images hard-drive: anka modify vmname set hard-drive 0 -s xG
Anka supports running tests on physical devices. To do so, you must setup the device to be claimed and then start the VM with its name or ID such as:
anka start -d iOS12iPhone [VMName]
Currently the plugin does not invoke the start command and instead simply uses anka run
which implicitly invokes start
, preventing the use of the device option.
The plugin would instead need to call start
with the device option if supplied before calling run
. The user should be able to supply the device name(s) in the configuration (you can supply multiple devices if you need more than one, such as -d 337641472 -d 339738624 -d 341835776
).
We have a single host in the cluster today and multiple jobs are failing with race conditions related the DMGs when verifying builds.
:anka: Cloning macos-omnibus-10.14 to macos-omnibus-10.14-e0fba51a-1f5c-41fa-b7b9-88b2b1aab0b8
Executing . ./.omnibus-buildkite-plugin/test-settings.sh && ./omnibus/omnibus-test.sh in macos-omnibus-10.14-e0fba51a-1f5c-41fa-b7b9-88b2b1aab0b8
Installing unstable chefdk 4.3.7
No receipt for 'com.getchef.pkg.chefdk' found at '/'.
-anka: unmount /private/var/tmp/ankafs.0: Resource busy
Support for multi-line command execution like:
- command: |
if [[ ${BUILDKITE_PULL_REQUEST} != "false" ]]; then
source ~/.bash_profile && npm i [email protected] && npm i chai && bash ./scripts/selenium/wait-for-appium.sh && ./scripts/selenium/run-selenium-ios.sh
fi
label: "Running Selenium iOS tests"
Likely just needs to sed \n to be [:space:];
instead
Problem: Disk space is limited. The Anka design by default presumes you're not going to be changing tags often and if you are it has plenty of disk space to store multiple tags. The way I've designed our pipeline is for on-demand pulling of tags when a pipeline starts and we frequently have new tags. I'm resorting to using -s (shrink) for pulls for now but that adds a few minutes to each pipeline.
Request: I'm contacting anka now.
Requests:
- I would like to see anka describe show layer information like anka registry describe TEMPLATE -t TAG does but also indicate the last time the tag was used on the machine.
- Then, the anka registry describe should show the last time the tag was pulled.
- In addition to 1 and 2, It would be nice if there was a anka CLI option allowing me to delete the specific tag locally or in the registry (anka delete TEMPLATE -t TAG & anka registry remove TEMPLATE -t TAG). I can script something to do this with 1 and 2, but I would rather trust the anka CLI tool to do the cleanup.
I'm trying to get anka folks to add this as behavior to anka pull, but if they tell me no, we'll need to add it to the plugin. My disk space is limited on the mac minis I use for anka and I can only store 2 VM templates locally. If I add a third in the near future, I'll end up running out of disk space. Anka pulling should do a disk space check and delete one unused template before doing the actual download.
CICDM01:nightly cicd$ anka registry check-download-size base-10.14.4_6C_16G_30G
+------------------------------+-------------+
| bytes | 21119329296 |
+------------------------------+-------------+
| sufficient space to download | yes |
+------------------------------+-------------+
I'll reply in a few days with what they say.
Admin: Please assign this to me.
When cancelling a job through buildkite, it will cause the anka suspend command to fail (should you be using cleanup: false).
I've opened https://forum.buildkite.community/t/problems-with-anka-plugin-and-pre-exit/365/6 for help from buildkite. Anka support seems to think buildkite isn't giving enough time for the tasks inside of the VM to finish.
I've noticed that only the first command is run by buildkite within the anka run command. For example:
- label: ":darwin: High Sierra Build"
command:
- "env"
- "env"
# - "$ANKA_WORKDIR/scripts/build.sh -y"
# - "tar -pczf /Network/AFP/NAS/buildkite-artifacts/build-$BUILDKITE_BUILD_ID.tar.gz build"
plugins:
chef/anka#v0.1.1:
vm-name: $ANKA_IMAGE_NAME
vm-registry-tag: $ANKA_IMAGE_TAG
workdir: $ANKA_WORKDIR
always-pull: true
debug: true
agents:
- "role=anka-tester"
timeout: 60
retry:
automatic:
# Agent was lost
- exit_status: -1
limit: 2
# Forced agent shutdown
- exit_status: 255
limit: 2
The first ENV in the logs shows USER=anka
. However, the second shows the host machine's user and not the VM.
The pipeline ENV for the failed build shows:
BUILDKITE_COMMAND="env
env"
It would be great if the plugin handled this.
Hi, I'm interested in starting a discussion about archiving this repo and maintaining it fully under https://github.com/veertuinc/anka-buildkite-plugin. It would be easier for Veertu going forward to ensure full access to all of the pieces of this plugin, and doing this under our organization makes sense to us.
Who would I need to discuss this with?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.