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

Add git rev #13

Merged
merged 2 commits into from
Apr 21, 2022
Merged
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
4 changes: 2 additions & 2 deletions argocd-install/template-values-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ server:
source:
path: decapod-apps
repoURL: ${DECAPOD_BOOTSTRAP_GIT_REPO_URL}
targetRevision: HEAD
targetRevision: ${GIT_REVISION}
directory:
recurse: true
jsonnet: {}
Expand All @@ -56,7 +56,7 @@ server:
source:
path: decapod-projects
repoURL: ${DECAPOD_BOOTSTRAP_GIT_REPO_URL}
targetRevision: HEAD
targetRevision: ${GIT_REVISION}
directory:
recurse: true
jsonnet: {}
Expand Down
4 changes: 2 additions & 2 deletions argocd-install/values-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand All @@ -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: {}
Expand Down
2 changes: 1 addition & 1 deletion decapod-apps-templates/template-argo-workflows-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion decapod-apps-templates/template-argo-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion decapod-apps-templates/template-db-secret-argo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion decapod-apps-templates/template-db-secret-decapod-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion decapod-apps/argo-workflows-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
ktkfree marked this conversation as resolved.
Show resolved Hide resolved
syncPolicy:
syncOptions:
- CreateNamespace=false
Expand Down
2 changes: 1 addition & 1 deletion decapod-apps/argo-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion decapod-apps/db-secret-argo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion decapod-apps/db-secret-decapod-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions genereate_yamls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down