Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple sources for applications #1

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ac71ec8
chore(deps): bump github.com/valyala/fasttemplate from 1.2.1 to 1.2.2…
dependabot[bot] Dec 5, 2022
44a4ec1
chore(deps): bump github.com/ktrysmt/go-bitbucket from 0.9.40 to 0.9.…
dependabot[bot] Dec 5, 2022
cbb4303
chore(deps): bump github.com/imdario/mergo from 0.3.12 to 0.3.13 (#11…
dependabot[bot] Dec 5, 2022
89792b4
docs: update how to access arrays in Go templates (#11562)
siliconsheep Dec 5, 2022
f25f0b2
add otel interceptor (#11561)
Frapschen Dec 5, 2022
5bb937c
fix: use repository GithubAppCreds proxy if set (#11422)
the-technat Dec 5, 2022
cf7bf14
feat: show app age in application list view (#11209) (#11502)
alexef Dec 6, 2022
d269988
fix: sidebar css (#11531)
ashutosh16 Dec 6, 2022
4018fd8
feat: Allow proxy to be saved when creating repoCreds (#11351) (#11425)
the-technat Dec 6, 2022
507bd9d
chore(deps): bump github.com/go-openapi/runtime from 0.19.4 to 0.25.0…
dependabot[bot] Dec 6, 2022
2e9f573
docs: Add skipCrds and ignoreMissingValueFiles to application.yaml ex…
michaelvl Dec 6, 2022
434f35e
chore: add Vinted to users list (#11214)
apsega Dec 6, 2022
5a8f64b
chore(deps): bump sigs.k8s.io/structured-merge-diff/v4 (#11580)
dependabot[bot] Dec 7, 2022
c9f5465
chore(deps): bump github.com/go-openapi/loads from 0.19.4 to 0.21.2 (…
dependabot[bot] Dec 7, 2022
6ecd70a
fix(helm): helm v3 doesn't have these flags (#11100) (#11540)
alexef Dec 7, 2022
13dd04f
fix(helm): login OCI Helm dependencies correctly (#8563) (#11327)
alexef Dec 7, 2022
30e37b7
fix: misc css fixes for mobile (#5705) (#11508)
alexef Dec 7, 2022
661afe0
feat: added deep links backend changes (#11401)
gdsoumya Dec 7, 2022
6c5da3f
chore(deps): bump github.com/Masterminds/semver/v3 from 3.1.1 to 3.2.…
dependabot[bot] Dec 8, 2022
74798a6
chore(deps): bump github.com/go-redis/redis/v8 from 8.11.3 to 8.11.5 …
dependabot[bot] Dec 8, 2022
9ceef4a
chore(deps): bump github.com/casbin/casbin/v2 from 2.57.1 to 2.59.0 (…
dependabot[bot] Dec 8, 2022
4462deb
chore: add Trusting Social users list (#11584)
cuong-ts Dec 8, 2022
a3a3e8d
fix: set baseURL in github_app client (#11613)
fty4 Dec 8, 2022
07c0ee5
fix: only add baseURL in github_app client for GHE client (#11622)
fty4 Dec 8, 2022
b414cb7
feat: support multiple sources for application
ishitasequeira May 17, 2022
74e951b
fix bug introduced after rebase
ishitasequeira Sep 15, 2022
7972f8c
rebase with master
ishitasequeira Sep 16, 2022
120d645
fix index out of bounds error
ishitasequeira Sep 26, 2022
1096025
ui fixes
ishitasequeira Sep 26, 2022
c36d4a6
add revisions to SyncOperation for rollback
ishitasequeira Sep 27, 2022
2f70ce5
fix ui failures
ishitasequeira Sep 27, 2022
196fe01
fixing lint errors
ishitasequeira Sep 27, 2022
dac9c5e
Retrigger CI pipeline
ishitasequeira Sep 28, 2022
5191312
ui fixes
ishitasequeira Sep 30, 2022
832c660
change Source to *ApplicationSource in ApplicationSpec
ishitasequeira Sep 30, 2022
56454eb
fix UI errors
ishitasequeira Oct 3, 2022
2b57a15
address PR comments
ishitasequeira Oct 4, 2022
6c2a49e
Retrigger CI pipeline
ishitasequeira Oct 13, 2022
70de2fc
rebased with master
ishitasequeira Oct 14, 2022
b299dbe
fix env variable read logic for ValueFiles
ishitasequeira Oct 16, 2022
0176ccb
Address PR comments
ishitasequeira Oct 24, 2022
a40b60e
fix lint
ishitasequeira Oct 24, 2022
e1d629b
update multiple sources doc
ishitasequeira Oct 24, 2022
61de05e
add repository lock and checkout target revision
ishitasequeira Nov 7, 2022
8bc7db9
checkout all sources before generating manifest
ishitasequeira Nov 9, 2022
0da205c
generate mock reposerverclient
ishitasequeira Nov 10, 2022
a5e1430
address comments
ishitasequeira Nov 27, 2022
d1e624d
update logic for returning ManifestResponse to avoid nil pointer issues
ishitasequeira Nov 29, 2022
305ee3b
fix nil reference and key mismatch bugs; add more logs (#6)
crenshaw-dev Dec 2, 2022
8172df8
update grpc field numbers
ishitasequeira Dec 9, 2022
cf244ef
path resolution tests (#12)
crenshaw-dev Dec 9, 2022
c8d624b
add regex check for value of source.ref
ishitasequeira Dec 9, 2022
f89a67d
updated version to test multiple sources
Dec 11, 2022
eee6f8a
ci image: push always
Dec 12, 2022
9dd0593
ci: image push fix login
Dec 12, 2022
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
70 changes: 35 additions & 35 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
permissions:
contents: write # for git to push upgrade commit if not already deployed
packages: write # for pushing packages to GHCR, which is used by cd.apps.argoproj.io to avoid polluting Quay with tags
if: github.repository == 'argoproj/argo-cd'
if: github.repository == 'similarweb/argo-cd'
runs-on: ubuntu-22.04
env:
GOPATH: /home/runner/work/argo-cd/argo-cd
Expand All @@ -43,14 +43,11 @@ jobs:

# login
- run: |
docker login ghcr.io --username $USERNAME --password-stdin <<< "$PASSWORD"
docker login quay.io --username "$DOCKER_USERNAME" --password-stdin <<< "$DOCKER_TOKEN"
docker login --username "$DOCKER_USERNAME" --password-stdin <<< "$DOCKER_TOKEN"
if: github.event_name == 'push'
env:
USERNAME: ${{ github.actor }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
DOCKER_USERNAME: ${{ secrets.RELEASE_QUAY_USERNAME }}
DOCKER_TOKEN: ${{ secrets.RELEASE_QUAY_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}

# build
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
Expand All @@ -61,38 +58,41 @@ jobs:
then
IMAGE_PLATFORMS=linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
fi
docker login --username "$DOCKER_USERNAME" --password-stdin <<< "$DOCKER_TOKEN"
echo "Building image for platforms: $IMAGE_PLATFORMS"
docker buildx build --platform $IMAGE_PLATFORMS --push="${{ github.event_name == 'push' }}" \
-t ghcr.io/argoproj/argo-cd/argocd:${{ steps.image.outputs.tag }} \
-t quay.io/argoproj/argocd:latest .
docker buildx build --platform $IMAGE_PLATFORMS --push \
-t swtrasformer/argo-cd:${{ steps.image.outputs.tag }} .
working-directory: ./src/github.com/argoproj/argo-cd
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}

# sign container images
- name: Install cosign
uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b # v2.8.1
with:
cosign-release: 'v1.13.0'
# - name: Install cosign
# uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b # v2.8.1
# with:
# cosign-release: 'v1.13.0'

- name: Sign Argo CD latest image
run: |
cosign sign --key env://COSIGN_PRIVATE_KEY quay.io/argoproj/argocd:latest
# Displays the public key to share.
cosign public-key --key env://COSIGN_PRIVATE_KEY
env:
COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
if: ${{ github.event_name == 'push' }}
# - name: Sign Argo CD latest image
# run: |
# cosign sign --key env://COSIGN_PRIVATE_KEY quay.io/argoproj/argocd:latest
# # Displays the public key to share.
# cosign public-key --key env://COSIGN_PRIVATE_KEY
# env:
# COSIGN_PRIVATE_KEY: ${{secrets.COSIGN_PRIVATE_KEY}}
# COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
# if: ${{ github.event_name == 'push' }}

# deploy
- run: git clone "https://$TOKEN@github.com/argoproj/argoproj-deployments"
if: github.event_name == 'push'
env:
TOKEN: ${{ secrets.TOKEN }}
- run: |
docker run -u $(id -u):$(id -g) -v $(pwd):/src -w /src --rm -t ghcr.io/argoproj/argo-cd/argocd:${{ steps.image.outputs.tag }} kustomize edit set image quay.io/argoproj/argocd=ghcr.io/argoproj/argo-cd/argocd:${{ steps.image.outputs.tag }}
git config --global user.email 'ci@argoproj.com'
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)
if: github.event_name == 'push'
working-directory: argoproj-deployments/argocd
# # deploy
# - run: git clone "https://$TOKEN@github.com/argoproj/argoproj-deployments"
# if: github.event_name == 'push'
# env:
# TOKEN: ${{ secrets.TOKEN }}
# - run: |
# docker run -u $(id -u):$(id -g) -v $(pwd):/src -w /src --rm -t ghcr.io/argoproj/argo-cd/argocd:${{ steps.image.outputs.tag }} kustomize edit set image quay.io/argoproj/argocd=ghcr.io/argoproj/argo-cd/argocd:${{ steps.image.outputs.tag }}
# git config --global user.email 'ci@argoproj.com'
# 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)
# if: github.event_name == '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
2 changes: 2 additions & 0 deletions USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Toss](https://toss.im/en)
1. [Trendyol](https://www.trendyol.com/)
1. [tru.ID](https://tru.id)
1. [Trusting Social](https://trustingsocial.com/)
1. [Twilio SendGrid](https://sendgrid.com)
1. [tZERO](https://www.tzero.com/)
1. [UBIO](https://ub.io/)
Expand All @@ -232,6 +233,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Unifonic Inc](https://www.unifonic.com/)
1. [Universidad Mesoamericana](https://www.umes.edu.gt/)
1. [Viaduct](https://www.viaduct.ai/)
1. [Vinted](https://vinted.com/)
1. [Virtuo](https://www.govirtuo.com/)
1. [VISITS Technologies](https://visits.world/en)
1. [Volvo Cars](https://www.volvocars.com/)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0
2.6.0
22 changes: 11 additions & 11 deletions applicationset/controllers/applicationset_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ func TestCreateOrUpdateInCluster(t *testing.T) {
Template: argov1alpha1.ApplicationSetTemplate{
Spec: argov1alpha1.ApplicationSpec{
Project: "project",
Source: argov1alpha1.ApplicationSource{Path: "path", TargetRevision: "revision", RepoURL: "repoURL"},
Source: &argov1alpha1.ApplicationSource{Path: "path", TargetRevision: "revision", RepoURL: "repoURL"},
Destination: argov1alpha1.ApplicationDestination{Server: "server", Namespace: "namespace"},
},
},
Expand Down Expand Up @@ -720,7 +720,7 @@ func TestCreateOrUpdateInCluster(t *testing.T) {
},
Spec: argov1alpha1.ApplicationSpec{
Project: "project",
Source: argov1alpha1.ApplicationSource{Path: "path", TargetRevision: "revision", RepoURL: "repoURL"},
Source: &argov1alpha1.ApplicationSource{Path: "path", TargetRevision: "revision", RepoURL: "repoURL"},
Destination: argov1alpha1.ApplicationDestination{Server: "server", Namespace: "namespace"},
},
},
Expand All @@ -740,7 +740,7 @@ func TestCreateOrUpdateInCluster(t *testing.T) {
},
Spec: argov1alpha1.ApplicationSpec{
Project: "project",
Source: argov1alpha1.ApplicationSource{Path: "path", TargetRevision: "revision", RepoURL: "repoURL"},
Source: &argov1alpha1.ApplicationSource{Path: "path", TargetRevision: "revision", RepoURL: "repoURL"},
Destination: argov1alpha1.ApplicationDestination{Server: "server", Namespace: "namespace"},
},
Status: argov1alpha1.ApplicationStatus{
Expand Down Expand Up @@ -917,7 +917,7 @@ func TestRemoveFinalizerOnInvalidDestination_FinalizerTypes(t *testing.T) {
},
Spec: argov1alpha1.ApplicationSpec{
Project: "project",
Source: argov1alpha1.ApplicationSource{Path: "path", TargetRevision: "revision", RepoURL: "repoURL"},
Source: &argov1alpha1.ApplicationSource{Path: "path", TargetRevision: "revision", RepoURL: "repoURL"},
// Destination is always invalid, for this test:
Destination: argov1alpha1.ApplicationDestination{Name: "my-cluster", Namespace: "namespace"},
},
Expand Down Expand Up @@ -1079,7 +1079,7 @@ func TestRemoveFinalizerOnInvalidDestination_DestinationTypes(t *testing.T) {
},
Spec: argov1alpha1.ApplicationSpec{
Project: "project",
Source: argov1alpha1.ApplicationSource{Path: "path", TargetRevision: "revision", RepoURL: "repoURL"},
Source: &argov1alpha1.ApplicationSource{Path: "path", TargetRevision: "revision", RepoURL: "repoURL"},
Destination: c.destinationField,
},
}
Expand Down Expand Up @@ -1588,7 +1588,7 @@ func TestValidateGeneratedApplications(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{},
Spec: argov1alpha1.ApplicationSpec{
Project: "default",
Source: argov1alpha1.ApplicationSource{
Source: &argov1alpha1.ApplicationSource{
RepoURL: "https://url",
Path: "/",
TargetRevision: "HEAD",
Expand All @@ -1611,7 +1611,7 @@ func TestValidateGeneratedApplications(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{},
Spec: argov1alpha1.ApplicationSpec{
Project: "default",
Source: argov1alpha1.ApplicationSource{
Source: &argov1alpha1.ApplicationSource{
RepoURL: "https://url",
Path: "/",
TargetRevision: "HEAD",
Expand All @@ -1635,7 +1635,7 @@ func TestValidateGeneratedApplications(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{},
Spec: argov1alpha1.ApplicationSpec{
Project: "DOES-NOT-EXIST",
Source: argov1alpha1.ApplicationSource{
Source: &argov1alpha1.ApplicationSource{
RepoURL: "https://url",
Path: "/",
TargetRevision: "HEAD",
Expand All @@ -1658,7 +1658,7 @@ func TestValidateGeneratedApplications(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{},
Spec: argov1alpha1.ApplicationSpec{
Project: "default",
Source: argov1alpha1.ApplicationSource{
Source: &argov1alpha1.ApplicationSource{
RepoURL: "https://url",
Path: "/",
TargetRevision: "HEAD",
Expand All @@ -1681,7 +1681,7 @@ func TestValidateGeneratedApplications(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{},
Spec: argov1alpha1.ApplicationSpec{
Project: "default",
Source: argov1alpha1.ApplicationSource{
Source: &argov1alpha1.ApplicationSource{
RepoURL: "https://url",
Path: "/",
TargetRevision: "HEAD",
Expand Down Expand Up @@ -1810,7 +1810,7 @@ func TestReconcilerValidationErrorBehaviour(t *testing.T) {
Namespace: "argocd",
},
Spec: argov1alpha1.ApplicationSpec{
Source: argov1alpha1.ApplicationSource{RepoURL: "https://github.com/argoproj/argocd-example-apps", Path: "guestbook"},
Source: &argov1alpha1.ApplicationSource{RepoURL: "https://github.com/argoproj/argocd-example-apps", Path: "guestbook"},
Project: "default",
Destination: argov1alpha1.ApplicationDestination{Server: "{{.url}}"},
},
Expand Down
4 changes: 3 additions & 1 deletion applicationset/services/internal/github_app/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ func Client(g github_app_auth.Authentication, url string) (*github.Client, error
url = g.EnterpriseBaseURL
}
var client *github.Client
httpClient := http.Client{Transport: rt}
if url == "" {
httpClient := http.Client{Transport: rt}
client = github.NewClient(&httpClient)
} else {
rt.BaseURL = url
httpClient := http.Client{Transport: rt}
client, err = github.NewEnterpriseClient(url, url, &httpClient)
if err != nil {
return nil, fmt.Errorf("failed to create github enterprise client: %w", err)
Expand Down
6 changes: 3 additions & 3 deletions applicationset/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestRenderTemplateParams(t *testing.T) {
Namespace: "default",
},
Spec: argoappsv1.ApplicationSpec{
Source: argoappsv1.ApplicationSource{
Source: &argoappsv1.ApplicationSource{
Path: "",
RepoURL: "",
TargetRevision: "",
Expand Down Expand Up @@ -220,7 +220,7 @@ func TestRenderTemplateParamsGoTemplate(t *testing.T) {
Namespace: "default",
},
Spec: argoappsv1.ApplicationSpec{
Source: argoappsv1.ApplicationSource{
Source: &argoappsv1.ApplicationSource{
Path: "",
RepoURL: "",
TargetRevision: "",
Expand Down Expand Up @@ -511,7 +511,7 @@ func TestRenderTemplateParamsFinalizers(t *testing.T) {

emptyApplication := &argoappsv1.Application{
Spec: argoappsv1.ApplicationSpec{
Source: argoappsv1.ApplicationSource{
Source: &argoappsv1.ApplicationSource{
Path: "",
RepoURL: "",
TargetRevision: "",
Expand Down
Loading