summaryrefslogtreecommitdiffstats
path: root/gitlab-templates/GoogleStorage.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab-templates/GoogleStorage.gitlab-ci.yml')
-rw-r--r--gitlab-templates/GoogleStorage.gitlab-ci.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/gitlab-templates/GoogleStorage.gitlab-ci.yml b/gitlab-templates/GoogleStorage.gitlab-ci.yml
new file mode 100644
index 000000000..be941a81e
--- /dev/null
+++ b/gitlab-templates/GoogleStorage.gitlab-ci.yml
@@ -0,0 +1,30 @@
+# Template for uploading artifacts to Google Storage
+#
+# To upload artifacts to Google Storage, include this file in your
+# .gitlab-ci.yml file with the following stanza:
+#
+# include:
+# - project: anuket/releng
+# file: '/gitlab-templates/GoogleStorage.gitlab-ci.yml'
+#
+# And append the following "- !reference.." line to the script portion
+# of a job where artifacts should be uploaded:
+#
+# script:
+# ...
+# - !reference [.gsutil-install, script]
+# ...
+#
+# After the script has been included `gsutil` will have access to the
+# necessary Google Storage bucket.
+---
+variables:
+ GS_URL: "artifacts.opnfv.org/$CI_PROJECT_NAME"
+ WORKSPACE: $CI_PROJECT_DIR
+
+.gsutil-install: &gsutil-install
+ script:
+ - dnf -y install python3-pip
+ - python3 -m pip install -U pip
+ - python3 -m pip install gsutil
+ - echo "$GSUTIL_CONFIG" > ~/.boto