Skip to content

Commit

Permalink
Merge branch 'fix-missing-helm-params' of https://github.com/crenshaw…
Browse files Browse the repository at this point in the history
…-dev/argo-cd into fix-missing-helm-params

Signed-off-by: Michael Crenshaw <[email protected]>
  • Loading branch information
crenshaw-dev committed Jun 2, 2022
2 parents 9f87324 + 46367e3 commit a4149d7
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 125 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,6 @@ jobs:
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1

- name: Setup cache for argocd-ui docker layer
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-single-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-single-buildx
- name: Build cache for argocd-ui stage
uses: docker/build-push-action@v2
with:
context: ./src/github.com/argoproj/argo-cd
target: argocd-ui
push: false
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'test-arm-image')

- name: Run non-container Snyk scans
if: github.event_name == 'push'
working-directory: ./src/github.com/argoproj/argo-cd
Expand All @@ -88,7 +70,6 @@ jobs:
fi
echo "Building image for platforms: $IMAGE_PLATFORMS"
docker buildx build --platform $IMAGE_PLATFORMS --push="${{ github.event_name == 'push' }}" \
--cache-from "type=local,src=/tmp/.buildx-cache" \
-t ghcr.io/argoproj/argocd:${{ steps.image.outputs.tag }} \
-t quay.io/argoproj/argocd:latest .
working-directory: ./src/github.com/argoproj/argo-cd
Expand All @@ -101,15 +82,6 @@ jobs:
run: |
snyk container test quay.io/argoproj/argocd:latest --org=argoproj --file=Dockerfile --severity-threshold=high
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Clean up build cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'test-arm-image')

# deploy
- run: git clone "https://[email protected]/argoproj/argoproj-deployments"
if: github.event_name == 'push'
Expand Down
47 changes: 0 additions & 47 deletions reposerver/repository/repository_norace_test.go

This file was deleted.

24 changes: 0 additions & 24 deletions reposerver/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,28 +355,6 @@ func TestGenerateJsonnetLibOutside(t *testing.T) {
require.Contains(t, err.Error(), "value file '../../../testdata/jsonnet/vendor' resolved to outside repository root")
}

func TestGenerateHelmChartWithDependencies(t *testing.T) {
service := newService("../..")

cleanup := func() {
_ = os.Remove(filepath.Join("../../util/helm/testdata/dependency", helmDepUpMarkerFile))
_ = os.RemoveAll(filepath.Join("../../util/helm/testdata/dependency", "charts"))
}
cleanup()
defer cleanup()

helmRepo := argoappv1.Repository{Name: "bitnami", Type: "helm", Repo: "https://charts.bitnami.com/bitnami"}
q := apiclient.ManifestRequest{
Repo: &argoappv1.Repository{},
ApplicationSource: &argoappv1.ApplicationSource{
Path: "./util/helm/testdata/dependency",
},
Repos: []*argoappv1.Repository{&helmRepo},
}
res1, err := service.GenerateManifest(context.Background(), &q)
assert.Nil(t, err)
assert.Len(t, res1.Manifests, 10)
}
func TestManifestGenErrorCacheByNumRequests(t *testing.T) {

// Returns the state of the manifest generation cache, by querying the cache for the previously set result
Expand Down Expand Up @@ -1717,8 +1695,6 @@ func TestFindManifests_Exclude_NothingMatches(t *testing.T) {
[]string{"nginx-deployment", "nginx-deployment-sub"}, []string{objs[0].GetName(), objs[1].GetName()})
}



func Test_findManifests(t *testing.T) {
logCtx := log.WithField("test", "test")
noRecurse := argoappv1.ApplicationSourceDirectory{Recurse: false}
Expand Down
6 changes: 3 additions & 3 deletions server/application/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ func (s *terminalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {

podName := q.Get("pod")
container := q.Get("container")
app := q.Get("app")
project := q.Get("project")
app := q.Get("appName")
project := q.Get("projectName")
namespace := q.Get("namespace")

if podName == "" || container == "" || app == "" || project == "" || namespace == "" {
Expand Down Expand Up @@ -123,7 +123,7 @@ func (s *terminalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Namespace name is not valid", http.StatusBadRequest)
return
}
shell := q.Get("shell") // No need to validate. Will only buse used if it's in the allow-list.
shell := q.Get("shell") // No need to validate. Will only buse used if it's in the allow-list.

ctx := r.Context()

Expand Down
23 changes: 0 additions & 23 deletions util/helm/helm_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package helm

import (
"fmt"
"os"
"path/filepath"
"testing"

Expand Down Expand Up @@ -126,27 +124,6 @@ func TestHelmGetParamsValueFilesThatExist(t *testing.T) {
assert.Equal(t, "3", slaveCountParam)
}

func TestHelmDependencyBuild(t *testing.T) {
helmRepos := []HelmRepository{{Name: "bitnami", Repo: "https://charts.bitnami.com/bitnami"}}
chart := "dependency"
clean := func() {
_ = os.RemoveAll("./testdata/dependency/charts")
_ = os.RemoveAll("./testdata/dependency/Chart.lock")
}
clean()
defer clean()
h, err := NewHelmApp(fmt.Sprintf("./testdata/%s", chart), helmRepos, false, "", "", false)
assert.NoError(t, err)
err = h.Init()
assert.NoError(t, err)
_, err = h.Template(&TemplateOpts{Name: "wordpress"})
assert.Error(t, err)
err = h.DependencyBuild()
assert.NoError(t, err)
_, err = h.Template(&TemplateOpts{Name: "wordpress"})
assert.NoError(t, err)
}

func TestHelmTemplateReleaseNameOverwrite(t *testing.T) {
h, err := NewHelmApp("./testdata/redis", nil, false, "", "", false)
assert.NoError(t, err)
Expand Down

0 comments on commit a4149d7

Please sign in to comment.