Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: scripts/slave/recipe_modules/cipd/example.py

Issue 1193813004: cipd recipe_module (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: coverage -> 100% Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipe_modules/cipd/example.py
diff --git a/scripts/slave/recipe_modules/cipd/example.py b/scripts/slave/recipe_modules/cipd/example.py
new file mode 100644
index 0000000000000000000000000000000000000000..2de9da66d099dc09051799daa73d8d48969cc2d1
--- /dev/null
+++ b/scripts/slave/recipe_modules/cipd/example.py
@@ -0,0 +1,36 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+DEPS = [
+ 'file',
+ 'path',
+ 'platform',
+ 'step',
+ 'cipd',
+]
+
+def RunSteps(api):
+ # Prepare files.
+ temp = api.path.mkdtemp('cipd-example')
+
+ api.cipd.install_client("install cipd")
+
+ pkgs = {
+ "infra/monitoring/dispatcher/linux-amd64": {
+ 'version': '7f751b2237df2fdf3c1405be00590fefffbaea2d',
+ },
+ }
+
+ api.cipd.ensure_installed(temp.join('bin'), pkgs)
+
+ api.cipd.platform_tag()
+
+ # Clean up.
+ api.file.rmtree('cleanup', temp)
+
+
+def GenTests(api):
+ yield api.test('basic')
+ yield api.test('install-failed') + api.step_data('install cipd', retcode=1)
+
« no previous file with comments | « scripts/slave/recipe_modules/cipd/api.py ('k') | scripts/slave/recipe_modules/cipd/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698