Commit b56d985e authored by Hordur Freyr Yngvason's avatar Hordur Freyr Yngvason
Browse files

Merge branch 'feat-bundling-chart' into 'beta'

[v1.0.0.beta] chore: Bundling charts

See merge request gitlab-org/cluster-integration/auto-deploy-image!90
parents a6262553 d713bc98
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -17,3 +17,4 @@ include:
  - local: .gitlab/ci/shellcheck.gitlab-ci.yml
  - local: .gitlab/ci/test.gitlab-ci.yml
  - local: .gitlab/ci/release.gitlab-ci.yml
  - local: .gitlab/ci/chart.gitlab-ci.yml
+59 −0
Original line number Diff line number Diff line
variables:
  SAST_DISABLE_DIND: "true"
  SCAN_KUBERNETES_MANIFESTS: "true"
  SAST_DEFAULT_ANALYZERS: "kubesec,secrets"

include:
  - template: SAST.gitlab-ci.yml

stages:
  - build
  - test
  - release

.chart-job:
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:alpine-helm"
  before_script:
    - cd assets/auto-deploy-app

chart:compile_manifests:
  extends: .chart-job
  stage: build
  script:
    - mkdir manifests
    - helm init --client-only
    - helm dependency build .
    - helm template -f values.yaml --output-dir manifests .
  artifacts:
    paths:
      - manifests

chart:lint:
  extends: .chart-job
  stage: test
  script:
    - helm lint .

kubesec-sast:
  needs: ["chart:compile_manifests"]

chart:test:
  extends: .chart-job
  stage: test
  script:
    - apk add --no-cache build-base go
    - helm init --client-only
    - helm dependency build .
    - cd test && GO111MODULE=auto go test .

# auto-deploy-image doesn't need to release the chart to https://charts.gitlab.io/,
# as it bundles a chart by default.
# release-chart:
#   stage: release
#   script:
#     - curl --fail --request POST --form "token=${CHARTS_TRIGGER_TOKEN}" --form ref=master
#         --form "variables[CHART_NAME]=$CI_PROJECT_NAME"
#         --form "variables[RELEASE_REF]=$CI_COMMIT_REF_NAME"
#         https://gitlab.com/api/v4/projects/2860651/trigger/pipeline
#   only:
#     - /\Av[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?\Z/@gitlab-org/charts/auto-deploy-app
+53 −0
Original line number Diff line number Diff line
## Contributing

Thank you for your interest in contributing to this GitLab project! We welcome
all contributions. By participating in this project, you agree to abide by the
[code of conduct](#code-of-conduct).


## Developer Certificate of Origin + License

By contributing to GitLab B.V., You accept and agree to the following terms and
conditions for Your present and future Contributions submitted to GitLab B.V.
Except for the license granted herein to GitLab B.V. and recipients of software
distributed by GitLab B.V., You reserve all right, title, and interest in and to
Your Contributions. All Contributions are subject to the following DCO + License
terms.

[DCO + License](https://gitlab.com/gitlab-org/dco/blob/master/README.md)

_This notice should stay as the first item in the CONTRIBUTING.md file._

## Code of conduct

We want to create a welcoming environment for everyone who is interested
in contributing. Please visit our [Code of Conduct
page](https://about.gitlab.com/contributing/code-of-conduct) to learn
more about our commitment to an open and welcoming environment.

## Merge request guidelines

Below are some guidelines for merge requests:

- Any new configuration option should be documented in
  the `Configuration` section in README.md.
- For any template changes, we encourage a test case be added or
  updated in the
  [template tests](https://gitlab.com/gitlab-org/charts/auto-deploy-app/-/blob/master/test/template_test.go).

### Working with the tests

The tests are written in [Go](https://golang.org) (version 1.13 or later,
with [modules enabled](https://golang.org/cmd/go/#hdr-Module_support)) using
the [Terratest](https://github.com/gruntwork-io/terratest) library. To work
on the tests, you need to have [Helm 2](https://v2.helm.sh/docs/) and
[Go](https://golang.org) installed.

To run the tests, run the following commands from the root of your copy of `auto-deploy-app`:

```shell
helm init --client-only               # required only once
helm dependency build .               # required only once
cd test
GO111MODULE=auto go test .            # required for every change to the tests or the template
```
+5 −0
Original line number Diff line number Diff line
apiVersion: v1
description: GitLab's Auto-deploy Helm Chart
name: auto-deploy-app
version: 1.0.0-beta.0
icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png
+19 −0
Original line number Diff line number Diff line
Copyright GitLab B.V.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading