# Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved. # # 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. default: image: docker services: - name: docker:dind command: ["--experimental"] variables: GIT_SUBMODULE_STRATEGY: recursive BUILD_MULTI_ARCH_IMAGES: "true" stages: - pull - scan - release - sign .pipeline-trigger-rules: rules: # We trigger the pipeline if started manually - if: $CI_PIPELINE_SOURCE == "web" # We trigger the pipeline on the main branch - if: $CI_COMMIT_BRANCH == "main" # We trigger the pipeline on the release- branches - if: $CI_COMMIT_BRANCH =~ /^release-.*$/ # We trigger the pipeline on tags - if: $CI_COMMIT_TAG && $CI_COMMIT_TAG != "" workflow: rules: # We trigger the pipeline on a merge request - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # We then add all the regular triggers - !reference [.pipeline-trigger-rules, rules] # Download the regctl binary for use in the release steps .regctl-setup: before_script: - export REGCTL_VERSION=v0.4.5 - apk add --no-cache curl - mkdir -p bin - curl -sSLo bin/regctl https://github.com/regclient/regclient/releases/download/${REGCTL_VERSION}/regctl-linux-amd64 - chmod a+x bin/regctl - export PATH=$(pwd)/bin:${PATH}