Code Monkey home page Code Monkey logo

anka-buildkite-plugin's Introduction

Chef Infra

Code Climate Build Status Gem Version

Umbrella Project: Chef Infra

Project State: Active

Issues Response Time Maximum: 14 days

Pull Request Response Time Maximum: 14 days

Getting Started

Chef Infra is a configuration management tool designed to bring automation to your entire infrastructure.

Want to try Chef Infra?

For Chef Infra usage, please refer to Learn Chef, our self-paced, entirely free learning platform. Learn Chef also includes module-based training for Chef Infra, as well as Chef Automate, Chef Habitat, and Chef InSpec.

Other useful resources for Chef Infra users:

Reporting Issues

Issues can be reported by using GitHub Issues.

Note that this repository is primarily for reporting issues in the chef-client itself. For reporting issues against other Chef projects, please look up the appropriate repository. If you're unsure where to submit an issue, please ask in the #chef-dev channel in Chef Community Slack.

How We Build & Release Chef

For information on how a contribution goes from PR to released package, see How Chef Infra Is Built

To learn more about our monthly feature releases and yearly major releases, see Chef Infra Release and Support Schedule.

Getting Involved

We'd love to have your help developing Chef Infra. See our Contributing Document for more information on getting started.

License and Copyright

Copyright 2008-2020, Chef Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

anka-buildkite-plugin's People

Contributors

bigfish24 avatar chef-ci avatar chef-expeditor[bot] avatar mimaslanka avatar skeshari12 avatar tduffield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anka-buildkite-plugin's Issues

[Feature] Cleanup tags which are no longer in use

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:

  1. 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.
  2. Then, the anka registry describe should show the last time the tag was pulled.
  3. 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.

Anka run only happens for the first command in the list

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.

Overloaded hosts lead to race conditions in pipelines

Describe the problem

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

See https://buildkite.com/chef/chef-chef-dk-master-omnibus-release/builds/54#e0fba51a-1f5c-41fa-b7b9-88b2b1aab0b8

Software Version

Replication Case

Stacktrace

``` ```

Possible Solution

workdir and volume options should be quoted

Describe the problem

anka run --volume /tmp/test --workdir /tmp/test shows: -anka: /tmp/test: Invalid argument

These need to be quoted

Software Version

Replication Case

Stacktrace

``` ```

Possible Solution

4 spaces needed in readme example

Describe the problem

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.

[Feature] Check / Cleanup disk space before pull

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.

[Feature] Support "command: |"

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

[Feature] Support physical devices with -d option to start VM

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.