Compare commits

...

6 Commits

Author SHA1 Message Date
Isaac Gaskin
c6cd7c5e32 chore: helm2 verison bump (#4724)
* chore: helm2 verison bump
2021-02-26 09:00:53 -08:00
jannfis
dd26b73e40 chore: Replace deprecated GH actions directives for integration tests (#4589)
* chore: Replace deprecated set-env directives

* revert lint version change

* Revert go.mod and go.sum changes

* Fix typo

* Update golangci-lint-action to v2

* Fix golangci-lint version

* Skip new lint complaints in test

* Skip more new lint complaints in test

* Exclude new SA5011 check in lint
2021-02-25 22:42:24 -08:00
jannfis
b8910f943d chore: Replace deprecated commands for release action (#4593) 2021-02-25 22:22:01 -08:00
Alexander Matyushentsev
fe80a4072e fix: API server should not print resource body when resource update fails (#5617)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-02-25 19:26:52 -08:00
jannfis
d4d767d831 chore: Update golang to v1.14.12 [backport to release-1.6] (#4835)
* chore: Update golang to v1.14.12 [backport to release-1.6]

Signed-off-by: jannfis <jann@mistrust.net>
2020-11-16 09:10:15 -08:00
Alexander Matyushentsev
f282a33e59 fix: kustomize-version flag is not working on 'argocd app set' command (#4040) 2020-08-04 15:05:22 -07:00
11 changed files with 58 additions and 37 deletions

View File

@@ -9,6 +9,7 @@ on:
pull_request:
branches:
- 'master'
- 'release-1.6'
jobs:
check-go:
@@ -20,7 +21,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: '1.14.2'
go-version: '1.14.12'
- name: Download all Go modules
run: |
go mod download
@@ -38,7 +39,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: '1.14.2'
go-version: '1.14.12'
- name: Restore go build cache
uses: actions/cache@v1
with:
@@ -57,10 +58,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v1
uses: golangci/golangci-lint-action@v2
with:
version: v1.26
args: --timeout 5m
version: v1.29
args: --timeout 5m --exclude SA5011
test-go:
name: Run unit tests for Go packages
@@ -77,7 +78,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: '1.14.2'
go-version: '1.14.12'
- name: Install required packages
run: |
sudo apt-get install git -y
@@ -89,9 +90,11 @@ jobs:
run: |
git fetch --prune --no-tags --depth=1 origin +refs/heads/*:refs/remotes/origin/*
- name: Add ~/go/bin to PATH
run: echo "::add-path::/home/runner/go/bin"
run: |
echo "/home/runner/go/bin" >> $GITHUB_PATH
- name: Add /usr/local/bin to PATH
run: echo "::add-path::/usr/local/bin"
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Restore go build cache
uses: actions/cache@v1
with:
@@ -129,15 +132,17 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: '1.14.2'
go-version: '1.14.12'
- name: Create symlink in GOPATH
run: |
mkdir -p ~/go/src/github.com/argoproj
cp -a ../argo-cd ~/go/src/github.com/argoproj
- name: Add /usr/local/bin to PATH
run: echo "::add-path::/usr/local/bin"
- name: Add ~/go/bin to PATH
run: echo "::add-path::/home/runner/go/bin"
run: |
echo "/home/runner/go/bin" >> $GITHUB_PATH
- name: Add /usr/local/bin to PATH
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Download & vendor dependencies
run: |
# We need to vendor go modules for codegen yet
@@ -281,7 +286,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: '1.14.2'
go-version: '1.14.12'
- name: Install K3S
env:
INSTALL_K3S_VERSION: v0.5.0
@@ -298,10 +303,12 @@ jobs:
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }}
- name: Add /usr/local/bin to PATH
run: echo "::add-path::/usr/local/bin"
- name: Add ~/go/bin to PATH
run: echo "::add-path::/home/runner/go/bin"
run: |
echo "/home/runner/go/bin" >> $GITHUB_PATH
- name: Add /usr/local/bin to PATH
run: |
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Download Go dependencies
run: |
go mod download
@@ -339,4 +346,4 @@ jobs:
- name: Run E2E testsuite
run: |
set -x
make test-e2e-local
make test-e2e-local

View File

@@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/setup-go@v1
with:
go-version: '1.14.1'
go-version: '1.14.12'
- uses: actions/checkout@master
with:
path: src/github.com/argoproj/argo-cd
@@ -47,4 +47,4 @@ jobs:
git config --global user.name 'CI'
git diff --exit-code && echo 'Already deployed' || (git commit -am 'Upgrade argocd to ${{ steps.image.outputs.tag }}' && git push)
working-directory: argoproj-deployments/argocd
# TODO: clean up old images once github supports it: https://github.community/t5/How-to-use-Git-and-GitHub/Deleting-images-from-Github-Package-Registry/m-p/41202/thread-id/9811
# TODO: clean up old images once github supports it: https://github.community/t5/How-to-use-Git-and-GitHub/Deleting-images-from-Github-Package-Registry/m-p/41202/thread-id/9811

View File

@@ -78,10 +78,10 @@ jobs:
fi
# Make the variables available in follow-up steps
echo "::set-env name=TARGET_VERSION::${TARGET_VERSION}"
echo "::set-env name=TARGET_BRANCH::${TARGET_BRANCH}"
echo "::set-env name=RELEASE_TAG::${RELEASE_TAG}"
echo "::set-env name=PRE_RELEASE::${PRE_RELEASE}"
echo "TARGET_VERSION=${TARGET_VERSION}" >> $GITHUB_ENV
echo "TARGET_BRANCH=${TARGET_BRANCH}" >> $GITHUB_ENV
echo "RELEASE_TAG=${RELEASE_TAG}" >> $GITHUB_ENV
echo "PRE_RELEASE=${PRE_RELEASE}" >> $GITHUB_ENV
- name: Check if our release tag has a correct annotation
run: |
@@ -136,12 +136,12 @@ jobs:
# We store path to temporary release notes file for later reading, we
# need it when creating release.
echo "::set-env name=RELEASE_NOTES::$RELEASE_NOTES"
echo "RELEASE_NOTES=${RELEASE_NOTES}" >> $GITHUB_ENV
- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: '1.14.2'
go-version: '1.14.12'
- name: Setup Git author information
run: |
@@ -286,4 +286,4 @@ jobs:
run: |
set -ue
git push --delete origin ${SOURCE_TAG}
if: ${{ always() }}
if: ${{ always() }}

View File

@@ -4,7 +4,7 @@ ARG BASE_IMAGE=debian:10-slim
# Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image
# Also used as the image in CI jobs so needs all dependencies
####################################################################################################
FROM golang:1.14.1 as builder
FROM golang:1.14.12 as builder
RUN echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list
@@ -97,7 +97,7 @@ RUN NODE_ENV='production' yarn build
####################################################################################################
# Argo CD Build stage which performs the actual build of Argo CD binaries
####################################################################################################
FROM golang:1.14.1 as argocd-build
FROM golang:1.14.12 as argocd-build
COPY --from=builder /usr/local/bin/packr /usr/local/bin/packr

View File

@@ -761,7 +761,7 @@ func addAppFlags(command *cobra.Command, opts *appOptions) {
command.Flags().BoolVar(&opts.selfHeal, "self-heal", false, "Set self healing when sync is automated")
command.Flags().StringVar(&opts.namePrefix, "nameprefix", "", "Kustomize nameprefix")
command.Flags().StringVar(&opts.nameSuffix, "namesuffix", "", "Kustomize namesuffix")
command.Flags().StringVar(&opts.nameSuffix, "kustomize-version", "", "Kustomize version")
command.Flags().StringVar(&opts.kustomizeVersion, "kustomize-version", "", "Kustomize version")
command.Flags().BoolVar(&opts.directoryRecurse, "directory-recurse", false, "Recurse directory")
command.Flags().StringVar(&opts.configManagementPlugin, "config-management-plugin", "", "Config management plugin name")
command.Flags().StringArrayVar(&opts.jsonnetTlaStr, "jsonnet-tla-str", []string{}, "Jsonnet top level string arguments")

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# The checksum of this file is used as cache key in our integratoin toolchain
#
helm2_version=2.15.2
helm2_version=2.17.0
helm3_version=3.2.0
jq_version=1.6
ksonnet_version=0.13.1

View File

@@ -843,6 +843,10 @@ func (s *Server) PatchResource(ctx context.Context, q *application.ApplicationRe
manifest, err := s.kubectl.PatchResource(config, res.GroupKindVersion(), res.Name, res.Namespace, types.PatchType(q.PatchType), []byte(q.Patch))
if err != nil {
// don't expose real error for secrets since it might contain secret data
if res.Kind == kube.SecretKind && res.Group == "" {
return nil, fmt.Errorf("failed to patch Secret %s/%s", res.Namespace, res.Name)
}
return nil, err
}
manifest, err = replaceSecretValues(manifest)

View File

@@ -2,7 +2,7 @@ FROM redis:5.0.3 as redis
FROM node:11.15.0 as node
FROM golang:1.14.1 as golang
FROM golang:1.14.12 as golang
FROM debian:10-slim
@@ -93,4 +93,4 @@ RUN mkdir -p /home/user && chmod 777 /home/user && \
ln -s /opt/yarn-v1.15.2/bin/yarn /usr/local/bin/yarn && \
ln -s /opt/yarn-v1.15.2/bin/yarnpkg /usr/local/bin/yarnpkg
ENTRYPOINT ["/usr/local/bin/uid_entrypoint.sh"]
ENTRYPOINT ["/usr/local/bin/uid_entrypoint.sh"]

View File

@@ -20,6 +20,7 @@ import (
"github.com/argoproj/pkg/errors"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
v1 "k8s.io/api/core/v1"
networkingv1beta "k8s.io/api/networking/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -378,6 +379,15 @@ func TestAppWithSecrets(t *testing.T) {
diffOutput := FailOnErr(RunCli("app", "diff", app.Name)).(string)
assert.Empty(t, diffOutput)
// make sure resource update error does not print secret details
_, err = RunCli("app", "patch-resource", "test-app-with-secrets", "--resource-name", "test-secret",
"--kind", "Secret", "--patch", `{"op": "add", "path": "/data", "value": "hello"}'`,
"--patch-type", "application/json-patch+json")
require.Error(t, err)
assert.Contains(t, err.Error(), fmt.Sprintf("failed to patch Secret %s/test-secret", DeploymentNamespace()))
assert.NotContains(t, err.Error(), "username")
assert.NotContains(t, err.Error(), "password")
// patch secret and make sure app is out of sync and diff detects the change
FailOnErr(KubeClientset.CoreV1().Secrets(DeploymentNamespace()).Patch(
"test-secret", types.JSONPatchType, []byte(`[

View File

@@ -1,6 +1,6 @@
dependencies:
- name: mariadb
repository: https://kubernetes-charts.storage.googleapis.com/
version: 4.3.1
digest: sha256:82a0e5374376169d2ecf7d452c18a2ed93507f5d17c3393a1457f9ffad7e9b26
generated: 2018-08-02T22:07:51.905271776Z
repository: https://charts.helm.sh/stable
version: 4.4.2
digest: sha256:c07f89818ebcd92a4dbaff719ebedc14e2569ee27447d3abf739e2dd11d13fcb
generated: "2020-11-03T09:04:00.781031-08:00"

View File

@@ -1,7 +1,7 @@
dependencies:
- name: mariadb
version: 4.x.x
repository: https://kubernetes-charts.storage.googleapis.com/
repository: https://charts.helm.sh/stable
condition: mariadb.enabled
tags:
- wordpress-database