diff --git a/argocd-install/template-values-override.yaml b/argocd-install/template-values-override.yaml index a32e165..99d2c4c 100644 --- a/argocd-install/template-values-override.yaml +++ b/argocd-install/template-values-override.yaml @@ -39,7 +39,7 @@ server: source: path: decapod-apps repoURL: ${DECAPOD_BOOTSTRAP_GIT_REPO_URL} - targetRevision: HEAD + targetRevision: ${GIT_REVISION} directory: recurse: true jsonnet: {} @@ -56,7 +56,7 @@ server: source: path: decapod-projects repoURL: ${DECAPOD_BOOTSTRAP_GIT_REPO_URL} - targetRevision: HEAD + targetRevision: ${GIT_REVISION} directory: recurse: true jsonnet: {} diff --git a/argocd-install/values-override.yaml b/argocd-install/values-override.yaml index 868c5d2..86df032 100644 --- a/argocd-install/values-override.yaml +++ b/argocd-install/values-override.yaml @@ -39,7 +39,7 @@ server: source: path: decapod-apps repoURL: https://github.com/openinfradev/decapod-bootstrap.git - targetRevision: HEAD + targetRevision: release-v2 directory: recurse: true jsonnet: {} @@ -56,7 +56,7 @@ server: source: path: decapod-projects repoURL: https://github.com/openinfradev/decapod-bootstrap.git - targetRevision: HEAD + targetRevision: release-v2 directory: recurse: true jsonnet: {} diff --git a/decapod-apps-templates/template-argo-workflows-crds.yaml b/decapod-apps-templates/template-argo-workflows-crds.yaml index f360556..6a64416 100644 --- a/decapod-apps-templates/template-argo-workflows-crds.yaml +++ b/decapod-apps-templates/template-argo-workflows-crds.yaml @@ -11,7 +11,7 @@ spec: source: path: ${DECAPOD_SITE_NAME}/decapod-controller/argo-workflows-operator-crds repoURL: ${DECAPOD_MANIFESTS_GIT_REPO_URL} - targetRevision: HEAD + targetRevision: ${GIT_REVISION} syncPolicy: syncOptions: - CreateNamespace=false diff --git a/decapod-apps-templates/template-argo-workflows.yaml b/decapod-apps-templates/template-argo-workflows.yaml index 9ff4114..e30a11b 100644 --- a/decapod-apps-templates/template-argo-workflows.yaml +++ b/decapod-apps-templates/template-argo-workflows.yaml @@ -11,7 +11,7 @@ spec: source: path: ${DECAPOD_SITE_NAME}/decapod-controller/argo-workflows-operator repoURL: ${DECAPOD_MANIFESTS_GIT_REPO_URL} - targetRevision: HEAD + targetRevision: ${GIT_REVISION} syncPolicy: syncOptions: - CreateNamespace=false diff --git a/decapod-apps-templates/template-db-secret-argo.yaml b/decapod-apps-templates/template-db-secret-argo.yaml index 0303317..3fbaa7a 100644 --- a/decapod-apps-templates/template-db-secret-argo.yaml +++ b/decapod-apps-templates/template-db-secret-argo.yaml @@ -11,7 +11,7 @@ spec: source: path: ${DECAPOD_SITE_NAME}/decapod-controller/db-secret-argo repoURL: ${DECAPOD_MANIFESTS_GIT_REPO_URL} - targetRevision: HEAD + targetRevision: ${GIT_REVISION} syncPolicy: syncOptions: - CreateNamespace=false diff --git a/decapod-apps-templates/template-db-secret-decapod-db.yaml b/decapod-apps-templates/template-db-secret-decapod-db.yaml index 32a70e1..0f74979 100644 --- a/decapod-apps-templates/template-db-secret-decapod-db.yaml +++ b/decapod-apps-templates/template-db-secret-decapod-db.yaml @@ -11,7 +11,7 @@ spec: source: path: ${DECAPOD_SITE_NAME}/decapod-controller/db-secret-decapod-db repoURL: ${DECAPOD_MANIFESTS_GIT_REPO_URL} - targetRevision: HEAD + targetRevision: ${GIT_REVISION} syncPolicy: syncOptions: - CreateNamespace=false diff --git a/decapod-apps/argo-workflows-crds.yaml b/decapod-apps/argo-workflows-crds.yaml index d89dd04..36e63cd 100644 --- a/decapod-apps/argo-workflows-crds.yaml +++ b/decapod-apps/argo-workflows-crds.yaml @@ -11,7 +11,7 @@ spec: source: path: decapod-reference/decapod-controller/argo-workflows-operator-crds repoURL: https://github.com/openinfradev/decapod-manifests.git - targetRevision: HEAD + targetRevision: release-v2 syncPolicy: syncOptions: - CreateNamespace=false diff --git a/decapod-apps/argo-workflows.yaml b/decapod-apps/argo-workflows.yaml index 345466f..d37a1e8 100644 --- a/decapod-apps/argo-workflows.yaml +++ b/decapod-apps/argo-workflows.yaml @@ -11,7 +11,7 @@ spec: source: path: decapod-reference/decapod-controller/argo-workflows-operator repoURL: https://github.com/openinfradev/decapod-manifests.git - targetRevision: HEAD + targetRevision: release-v2 syncPolicy: syncOptions: - CreateNamespace=false diff --git a/decapod-apps/db-secret-argo.yaml b/decapod-apps/db-secret-argo.yaml index 1bd4bb8..e9a9bc5 100644 --- a/decapod-apps/db-secret-argo.yaml +++ b/decapod-apps/db-secret-argo.yaml @@ -11,7 +11,7 @@ spec: source: path: decapod-reference/decapod-controller/db-secret-argo repoURL: https://github.com/openinfradev/decapod-manifests.git - targetRevision: HEAD + targetRevision: release-v2 syncPolicy: syncOptions: - CreateNamespace=false diff --git a/decapod-apps/db-secret-decapod-db.yaml b/decapod-apps/db-secret-decapod-db.yaml index a26b4df..f08e7ff 100644 --- a/decapod-apps/db-secret-decapod-db.yaml +++ b/decapod-apps/db-secret-decapod-db.yaml @@ -11,7 +11,7 @@ spec: source: path: decapod-reference/decapod-controller/db-secret-decapod-db repoURL: https://github.com/openinfradev/decapod-manifests.git - targetRevision: HEAD + targetRevision: release-v2 syncPolicy: syncOptions: - CreateNamespace=false diff --git a/genereate_yamls.sh b/genereate_yamls.sh index 50ee4cd..abcbd60 100755 --- a/genereate_yamls.sh +++ b/genereate_yamls.sh @@ -10,13 +10,15 @@ DOCKER_IMAGE_REPO="docker.io" QUAY_IMAGE_REPO="quay.io" GITHUB_IMAGE_REPO="ghcr.io" +GIT_REVISION="HEAD" + function usage { - echo -e "\nUsage: $0 [--site SITE_NAME] [--bootstrap-git BOOTSTRAP_GIT_URL ] [--manifests-git MANIFESTS_GIT_URL] [--registry REGISTRY_URL]" + echo -e "\nUsage: $0 [--site SITE_NAME] [--bootstrap-git BOOTSTRAP_GIT_URL ] [--manifests-git MANIFESTS_GIT_URL] [--git-rev GIT_REVISION] [--registry REGISTRY_URL]" exit 1 } # We use "$@" instead of $* to preserve argument-boundary information -ARGS=$(getopt -o 's:b:m:r:h' --long 'site:,bootstrap-git:,manifests-git:,registry:,help' -- "$@") || usage +ARGS=$(getopt -o 's:b:m:g:r:h' --long 'site:,bootstrap-git:,manifests-git:,git-rev:,registry:,help' -- "$@") || usage eval "set -- $ARGS" while true; do @@ -29,6 +31,8 @@ while true; do DECAPOD_BOOTSTRAP_GIT_REPO_URL=$2; shift 2;; (-m|--manifests-git) DECAPOD_MANIFESTS_GIT_REPO_URL=$2; shift 2;; + (-g|--git-rev) + GIT_REVISION=$2; shift 2;; (-r|--registry) DOCKER_IMAGE_REPO=$2 QUAY_IMAGE_REPO=$2 @@ -41,6 +45,7 @@ done export DECAPOD_SITE_NAME export DECAPOD_BOOTSTRAP_GIT_REPO_URL export DECAPOD_MANIFESTS_GIT_REPO_URL +export GIT_REVISION export DOCKER_IMAGE_REPO export QUAY_IMAGE_REPO export GITHUB_IMAGE_REPO @@ -49,6 +54,7 @@ echo "=== Create YAML files using the following Decapod configuration. For help, echo " Site: "$DECAPOD_SITE_NAME echo " Bootstrap Git: "$DECAPOD_BOOTSTRAP_GIT_REPO_URL echo " Manifests Git: "$DECAPOD_MANIFESTS_GIT_REPO_URL +echo " Git Revision: "$GIT_REVISION DIRS="argocd-install decapod-apps-templates" for dir in $DIRS