Adding post stage to gitlab pipeline to sync argo if helm/* was changed, also updating the test script to format your code
This commit is contained in:
parent
619f68d23e
commit
d2fc70b946
@ -40,10 +40,16 @@ build_and_push_container:
|
||||
- docker build -t ldooks/dragon-bot:$CI_PIPELINE_ID -t ldooks/dragon-bot:latest .
|
||||
- docker push ldooks/dragon-bot:latest
|
||||
- docker push ldooks/dragon-bot:$CI_PIPELINE_ID
|
||||
- wget https://github.com/argoproj/argo-cd/releases/download/v2.2.5/argocd-linux-amd64 -O /tmp/argocd && chmod +x /tmp/argocd
|
||||
- /tmp/argocd --insecure --server 192.168.1.205 --auth-token $ARGOCD_TOKEN app sync dragon-bot
|
||||
#- docker run --rm daangn/argocd-cli sh -c "/usr/local/bin/argocd --insecure --server 192.168.1.205 --auth-token $ARGOCD_TOKEN app sync dragon-bot"
|
||||
rules:
|
||||
- changes:
|
||||
- app/*
|
||||
- Dockerfile
|
||||
|
||||
sync_argo:
|
||||
stage: .post
|
||||
script:
|
||||
- wget https://github.com/argoproj/argo-cd/releases/download/v2.2.5/argocd-linux-amd64 -O /tmp/argocd && chmod +x /tmp/argocd
|
||||
- /tmp/argocd --insecure --server 192.168.1.205 --auth-token $ARGOCD_TOKEN app sync dragon-bot
|
||||
rules:
|
||||
- changes:
|
||||
- helm/*
|
||||
|
@ -1 +1 @@
|
||||
docker run --rm -ti -v $(pwd):/tmp/python/app python bash -c "cd /tmp/python ; pip install black; black ."
|
||||
docker run --rm -ti -v $(pwd):/tmp/python/app python:alpine sh -c "cd /tmp/python ; pip install black; black ."
|
||||
|
@ -1,4 +1,8 @@
|
||||
# Remove the running container so we cna re-use the container name 'dragon-bot'
|
||||
printf "\n[-] Formatting code\n"
|
||||
./format_code.sh
|
||||
printf "[+] Done\n"
|
||||
|
||||
printf "\n[-] Deleting old dragon-bot container from system\n"
|
||||
docker rm -f dragon-bot-test
|
||||
printf "[+] Done\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user