Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
a62610e
new pipeline dev
Danishain Nov 21, 2022
4efdfc1
fix docker file
Danishain Nov 21, 2022
f3ab4c5
fix docker file
Danishain Nov 21, 2022
34f1cae
fix docker file
Danishain Nov 21, 2022
cdc4e99
fix docker file
Danishain Nov 21, 2022
436bbb2
fix docker file
Danishain Nov 21, 2022
40f46f4
fix botbuild
Danishain Nov 21, 2022
b7b1276
fix botbuild
Danishain Nov 21, 2022
3706f33
fix botbuild
Danishain Nov 21, 2022
bae7685
fix botbuild
Danishain Nov 21, 2022
484f0da
fix botbuild
Danishain Nov 21, 2022
5376448
fix botbuild
Danishain Nov 21, 2022
29554ab
fix botbuild
Danishain Nov 21, 2022
0f6ccea
fix botbuild
Danishain Nov 21, 2022
9e74bbb
fix botbuild
Danishain Nov 21, 2022
96cc82c
fix botbuild
Danishain Nov 21, 2022
e8c9cb1
fix botbuild
Danishain Nov 21, 2022
f352b61
fix botbuild
Danishain Nov 21, 2022
576624b
fix botbuild
Danishain Nov 21, 2022
99189ba
fix botbuild
Danishain Nov 21, 2022
2cd8364
fix botbuild
Danishain Nov 21, 2022
e54eb5a
fix botbuild test
Danishain Nov 21, 2022
3dd7af3
fix botbuild test
Danishain Nov 21, 2022
e20d8a9
fix botbuild test
Danishain Nov 21, 2022
7fe4eb8
fix botbuild test
Danishain Nov 21, 2022
157604d
fix botbuild test
Danishain Nov 21, 2022
4f1be8f
fix botbuild test
Danishain Nov 21, 2022
30e99b5
fix botbuild
Danishain Nov 21, 2022
9eca4c9
fix botbuild common
Danishain Nov 21, 2022
2e523f3
fix botbuild common
Danishain Nov 21, 2022
235fb4f
fix botdeploy
Danishain Nov 21, 2022
138d2a8
fix botdeploy
Danishain Nov 24, 2022
5410cb0
fix value trigger deploy
Danishain Nov 24, 2022
e592651
fix value trigger deploy
Danishain Nov 24, 2022
c1b9695
fix value trigger deploy
Danishain Nov 24, 2022
ba847f5
fix kubeconfig secret
Danishain Nov 24, 2022
fdf80ce
fix kubeconfig secret
Danishain Nov 24, 2022
894a48f
fix kubeconfig secret
Danishain Nov 24, 2022
ccd5a58
workerbuild
Danishain Nov 24, 2022
f4cdb53
workerbuild
Danishain Nov 24, 2022
b85e41f
dev test
Danishain Nov 24, 2022
047a351
dev test
Danishain Nov 24, 2022
1bcff25
dev update
Danishain Nov 30, 2022
92b831c
dev update 1
Danishain Nov 30, 2022
e1b8ebe
dev update 3
Danishain Nov 30, 2022
d58d457
dev update 5 ecr worker
Danishain Nov 30, 2022
df01e31
dev update 6 ecr worker
Danishain Nov 30, 2022
d0eb05b
dev update 6 ecr worker
Danishain Nov 30, 2022
49031a6
dev update 6 ecr worker fix
Danishain Nov 30, 2022
3683969
dev update 6 ecr worker fix1
Danishain Nov 30, 2022
8d9218a
dev update 6 ecr worker fix 05
Danishain Dec 12, 2022
5790f55
new k0s fix 2
Danishain Dec 12, 2022
e966ddc
new k0s fix 2
Danishain Dec 12, 2022
64405e9
new k0s fix 4
Danishain Dec 12, 2022
c8975cd
new k0s fix 4
Danishain Dec 12, 2022
23d3e36
new k0s fix 4
Danishain Dec 12, 2022
3f24d5f
new k0s fix 4
Danishain Dec 12, 2022
3701531
new k0s fix 5 public
Danishain Dec 12, 2022
4e4c728
new k0s fix 5 public
Danishain Dec 12, 2022
85b5056
new k0s fix 5 public
Danishain Dec 12, 2022
c377b9f
new k0s fix 5 public
Danishain Dec 12, 2022
1d9daaf
new k0s fix 6 public
Danishain Dec 12, 2022
5d8cb91
new k0s fix 6 public
Danishain Dec 12, 2022
e8b9be1
new k0s fix 6 public
Danishain Dec 12, 2022
28ed51f
new k0s fix 7 public
Danishain Dec 12, 2022
1e7d5ea
new k0s fix 7 public
Danishain Jan 11, 2023
9808920
new k0s fix 7 public
Danishain Jan 11, 2023
1b4f7bd
new k0s fix 7 public
Danishain Jan 11, 2023
579722c
new k0s fix 7 public
Danishain Jan 11, 2023
42300ff
new k0s fix 7 public
Danishain Jan 11, 2023
aad356d
test PR
Danishain Jan 11, 2023
c65418c
Merge branch 'feature/greeting_msg' into dev
Danishain Jan 11, 2023
3848918
eks test 11
Danishain Jan 15, 2023
d483845
eks test 11
Danishain Jan 15, 2023
4c70ecf
eks test 11
Danishain Jan 15, 2023
45e2062
eks test 12
Danishain Jan 15, 2023
e2025d8
eks test 3
Danishain Jan 15, 2023
e69f020
eks test 4
Danishain Jan 15, 2023
cdb1287
eks test 5
Danishain Jan 16, 2023
afc6da9
eks test 5
Danishain Jan 16, 2023
16d0d7e
eks test 5
Danishain Jan 16, 2023
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
1 change: 0 additions & 1 deletion .telegramToken

This file was deleted.

45 changes: 0 additions & 45 deletions BotDeploy.Jenkinsfile

This file was deleted.

Binary file removed Drake - Falling Back-sOreUnGoIMg.mp4
Binary file not shown.
1 change: 0 additions & 1 deletion JenkinsAgent.Dockerfile

This file was deleted.

46 changes: 0 additions & 46 deletions Jenkinsfile

This file was deleted.

19 changes: 0 additions & 19 deletions botDeploy.yaml

This file was deleted.

16 changes: 13 additions & 3 deletions infra/jenkins/dev/BotBuild.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,35 @@ pipeline {
agent {
docker {
// TODO build & push your Jenkins agent image, place the URL here
image '<jenkins-agent-image>'
label 'danishain'
image '352708296901.dkr.ecr.eu-north-1.amazonaws.com/danishain-jenkins-ex1:latest'
args '--user root -v /var/run/docker.sock:/var/run/docker.sock'
}
}

environment {
REGISTRY_URL = "public.ecr.aws/r7m7o9d4"
IMAGE_TAG = "0.0.$BUILD_NUMBER"
IMAGE_NAME = "danishain-bot-dev"
}
stages {
stage('Build') {
steps {
// TODO dev bot build stage
sh '''
echo "building..."
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin $REGISTRY_URL
docker build -t $IMAGE_NAME:$IMAGE_TAG . -f services/bot/Dockerfile
docker tag $IMAGE_NAME:$IMAGE_TAG $REGISTRY_URL/$IMAGE_NAME:$IMAGE_TAG
docker push $REGISTRY_URL/$IMAGE_NAME:$IMAGE_TAG
echo "done"
'''
}
}

stage('Trigger Deploy') {
steps {
build job: 'BotDeploy', wait: false, parameters: [
string(name: 'BOT_IMAGE_NAME', value: "<image-name>")
string(name: 'BOT_IMAGE_NAME', value: "${REGISTRY_URL}/${IMAGE_NAME}:${IMAGE_TAG}")
]
}
}
Expand Down
7 changes: 4 additions & 3 deletions infra/jenkins/dev/BotDeploy.Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
pipeline {
agent {
docker {
// TODO build & push your Jenkins agent image, place the URL here
image '<jenkins-agent-image>'
// TODO build & push your Jenkins agent image, place the URL heree
label 'danishain'
image '352708296901.dkr.ecr.eu-north-1.amazonaws.com/danishain-jenkins-ex1:latest'
args '--user root -v /var/run/docker.sock:/var/run/docker.sock'
}
}
Expand All @@ -28,7 +29,7 @@ pipeline {
# replace placeholders in YAML k8s files
bash common/replaceInFile.sh $K8S_CONFIGS/bot.yaml APP_ENV $APP_ENV
bash common/replaceInFile.sh $K8S_CONFIGS/bot.yaml BOT_IMAGE $BOT_IMAGE_NAME
bash common/replaceInFile.sh $K8S_CONFIGS/bot.yaml TELEGRAM_TOKEN $(echo $TELEGRAM_TOKEN | base64)
bash common/replaceInFile.sh $K8S_CONFIGS/bot.yaml TELEGRAM_TOKEN $(echo -n $TELEGRAM_TOKEN | base64)

# apply the configurations to k8s cluster
kubectl apply --kubeconfig ${KUBECONFIG} -f $K8S_CONFIGS/bot.yaml
Expand Down
32 changes: 30 additions & 2 deletions infra/jenkins/dev/WorkerBuild.Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
pipeline {
agent {
docker {
// TODO build & push your Jenkins agent image, place the URL here
image '<jenkins-agent-image>'
// TODO build & push your Jenkins agent image, place the URL heree
image '352708296901.dkr.ecr.eu-north-1.amazonaws.com/danishain-jenkins-ex1:latest'
args '--user root -v /var/run/docker.sock:/var/run/docker.sock'
}
}

// TODO dev worker build stage
environment {
REGISTRY_URL = "public.ecr.aws/r7m7o9d4"
IMAGE_TAG = "0.0.$BUILD_NUMBER"
IMAGE_NAME = "danishain-worker-dev"
}
stages {
stage('Build') {
steps {
// TODO dev bot build stage
sh '''
echo "building..."
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin $REGISTRY_URL
docker build -t $IMAGE_NAME:$IMAGE_TAG . -f services/worker/Dockerfile
docker tag $IMAGE_NAME:$IMAGE_TAG $REGISTRY_URL/$IMAGE_NAME:$IMAGE_TAG
docker push $REGISTRY_URL/$IMAGE_NAME:$IMAGE_TAG
echo "done"
'''
}
}

stage('Trigger Deploy') {
steps {
build job: 'WorkerDeploy', wait: false, parameters: [
string(name: 'WORKER_IMAGE_NAME', value: "${REGISTRY_URL}/${IMAGE_NAME}:${IMAGE_TAG}")
]
}
}
}
}
2 changes: 1 addition & 1 deletion infra/jenkins/dev/WorkerDeploy.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pipeline {
agent {
docker {
// TODO build & push your Jenkins agent image, place the URL here
image '<jenkins-agent-image>'
image '352708296901.dkr.ecr.eu-north-1.amazonaws.com/danishain-jenkins-ex1:latest'
args '--user root -v /var/run/docker.sock:/var/run/docker.sock'
}
}
Expand Down
32 changes: 0 additions & 32 deletions prepare_ansible_inv.py

This file was deleted.

3 changes: 1 addition & 2 deletions services/bot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ WORKDIR /app
ENV APP_PATH=services/bot
COPY . .
RUN pip install -r $APP_PATH/requirements.txt

CMD ["python3", "services/bot/app.py"]
CMD ["python3","-m", "services/bot/app.py"]
2 changes: 1 addition & 1 deletion services/bot/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _message_handler(self, update, context):
'chat_id': {'StringValue': chat_id, 'DataType': 'String'}
}
)
logger.info(f'msg {response.get("MessageId")} has been sent to queue')
logger.info(f'msg {response.get("MessageId")} has been sent to queue this is a check PR')
self.send_text(update, f'Your message is being processed...', chat_id=chat_id)

except botocore.exceptions.ClientError as error:
Expand Down