1 # Template for uploading artifacts to Google Storage
3 # To upload artifacts to Google Storage, include this file in your
4 # .gitlab-ci.yml file with the following stanza:
7 # - project: anuket/releng
8 # file: '/gitlab-templates/GoogleStorage.gitlab-ci.yml'
10 # And append the following "- !reference.." line to the script portion
11 # of a job where artifacts should be uploaded:
15 # - !reference [.gsutil-install, script]
18 # After the script has been included `gsutil` will have access to the
19 # necessary Google Storage bucket.
22 GS_URL: "artifacts.opnfv.org/$CI_PROJECT_NAME"
23 WORKSPACE: $CI_PROJECT_DIR
25 .gsutil-install: &gsutil-install
27 - dnf -y install python3-pip
28 - python3 -m pip install -U pip
29 - python3 -m pip install gsutil
30 - echo "$GSUTIL_CONFIG" > ~/.boto