Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Copyright © 2021 Bedag Informatik AG
#
# 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.
# This is a basic workflow to help you get started with Actions
#
name: docker-test
on:
pull_request:
jobs:
build-test:
if: ${{ github.event.issue.pull_request }} && ! contains(github.event.head_commit.message, 'ci skip')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: image-build-action
uses: bedag/image-build-action@main
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: bedag/e2g
format: 'table'
output: 'trivy'
severity: 'CRITICAL,HIGH'
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,18 @@ jobs:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: image-build-action
uses: bedag/image-build-action@main
with:
push: true
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_password: ${{ secrets.DOCKERHUB_TOKEN}}



35 changes: 35 additions & 0 deletions Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Copyright © 2021 Bedag Informatik AG
# 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.
#
## Build Kusible
FROM golang AS build

#LABEL \{% for tag in _dest['tags']|list %}
# "tag.{{ tag }}.repository"="{{ _dest['namespace'] }}/{{ _dest['name'] }}" \
# "tag.{{ tag }}.source"="{{ _source["name"] }}:{{ _source["tag"] }}" \
# "tag.{{ tag }}.git.repo"="{{ git_repo }}" \
# "tag.{{ tag }}.git.ref"="{{ git_ref }}" \
# "tag.{{ tag }}.git.commit"="{{ git_commit }}" \
#{%- endfor %}
# "maintainer"="{{ maintainer }}"

WORKDIR /build
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o kusible .

## Actual Kusible COntainer
FROM scratch
COPY --from=build /build/kusible /kusible
RUN chmod +x /kusible
CMD [ "kusible" ]
11 changes: 7 additions & 4 deletions pkg/wrapper/helm/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ func (h *Helm) runInstall(args []string, vals map[string]interface{}, client *ac
}

if req := chartRequested.Metadata.Dependencies; req != nil {
// If CheckDependencies returns an error, we have unfulfilled dependencies.
// As of Helm 2.4.0, this is treated as a stopping condition:
// https://github.com/helm/helm/issues/2209
if err := action.CheckDependencies(chartRequested, req); err != nil {
if client.DependencyUpdate {
man := &downloader.Manager{
Out: out,
Expand All @@ -117,6 +113,13 @@ func (h *Helm) runInstall(args []string, vals map[string]interface{}, client *ac
} else {
return nil, err
}
Comment on lines 113 to 115
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This else clause must be removed, as it is actually the err != nil part of the action.CheckDependencies(...) call, which is already handled below.


// If CheckDependencies returns an error, we have unfulfilled dependencies.
// As of Helm 2.4.0, this is treated as a stopping condition:
// https://github.com/helm/helm/issues/2209
if err := action.CheckDependencies(chartRequested, req); err != nil {
return nil, err
}
}
}

Expand Down