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

kargo pipeline update fix #6

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
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
37 changes: 11 additions & 26 deletions .kargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,15 @@ jobs:
commands:
- TAG=PRE-{{.PR}} deployment/deploy.kargo.sh

{{ if eq .PR "main"}}
- name: release
noAgent: true
- name: tag-{{.PR}}
when:
branch: main
node: build
triggers:
upstream: deploy-main
pipeline: |
node("build") {
git(branch: 'main', credentialsId: 'lokalise-engineering', url: '[email protected]:lokalise/ce-connector-clevertap.git')
properties([
[$class: 'BuildBlockerProperty', useBuildBlocker: false],
disableConcurrentBuilds(),
])

echo "Release started..."

stage("Create a git tag") {
withCredentials([
string(credentialsId: 'GH_TOKEN', variable: 'GITHUB_TOKEN'),
string(credentialsId: 'DOCKER_PASSWORD', variable: 'REGISTRY_PASSWORD')
]) {
sh '''
docker/scripts/release.sh git_tag $(git rev-parse HEAD)
'''
}
}
}
{{ end }}
upstream: deploy-{{.PR}}
pipeline:
kind: tag
parameters:
onlyECR: true
services:
- app
2 changes: 1 addition & 1 deletion Jenkinsfile.tags
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pipeline {
steps {
sh 'echo ${TAG}'
build(
job: 'expert/ce-connector-clevertap/promote',
job: 'cteng/conn-clevertap/promote',
wait: false,
parameters: [
[$class: 'StringParameterValue', name: 'TAG', value: "${TAG}"],
Expand Down
2 changes: 1 addition & 1 deletion deployment/deploy.kargo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cd "$SCRIPT_DIR" || :

COMPOSE_FILE=docker-compose.kargo.yml
export COMPOSE_FILE
PROJECT=$(git config --get remote.origin.url | cut -d"/" -f2 | sed 's/\.git$//')
PROJECT=$(git config --get remote.origin.url | awk -F/ '{print $NF}' | sed 's/\.git$//')
export PROJECT

docker-compose pull
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ -z "${TAG}" ] && echo "No tag specified" && exit 1
[ -z "${GIT_COMMIT}" ] && echo "No GIT_COMMIT specified" && exit 1

PROJECT=$(git config --get remote.origin.url | cut -d"/" -f2 | sed 's/\.git$//')
PROJECT=$(git config --get remote.origin.url | awk -F/ '{print $NF}' | sed 's/\.git$//')
SERVICE="app"

DOCKER_BUILDKIT=1 docker build -f Dockerfile \
Expand Down