22 Commits

Author SHA1 Message Date
a9621cb31b Argo: Changed deployed version to 6966df2868a406f46347bc49a296458582872c8f 2025-08-02 17:53:09 +00:00
4676091b3e Argo: Changed deployed version to d33e107efb234e78fbba89d7993a6472eda73f4e 2025-08-02 17:50:00 +00:00
595a8d02c0 Argo: Changed deployed version to de360b10cc2b57e6bed8d860ced4d30c9730c8a5 2025-08-02 17:46:57 +00:00
2d03498232 Argo: Changed deployed version to e558baa265f8dbda2a9faf6dd2c3f7e7a5e66c3c 2025-08-02 17:44:09 +00:00
be9ce58b17 Argo: Changed deployed version to e8361548ff7f6f410b277643106f39406542f45c 2025-08-02 17:41:46 +00:00
30b8f0ed3f Argo: Changed deployed version to c75e7de0532ec0350866026f83cc0b5f0eba3dd0 2025-08-02 17:39:34 +00:00
df3db82cfe Argo: Changed deployed version to 157c451ba4df3492ac6d06060e23cf4c4ea31b75 2025-08-02 17:36:48 +00:00
20da47165f Argo: Changed deployed version to 4930bbe45cca68efcf3d04e9cf037734dfd158d8 2025-08-02 17:34:28 +00:00
72d97db784 Argo: Changed deployed version to c0469ca0c2b4c6be02902e98bfa0bb6ba9aceeca 2025-08-02 17:31:43 +00:00
c69b0294fc Argo: Changed deployed version to 77551add1ea2ff58fcc7adc8e4b299e302f5b4dc 2025-08-02 17:29:20 +00:00
062a08efc9 Argo: Changed deployed version to 9e4c747df571620cc7bbd90593d32c2306514d8c 2025-08-02 17:27:00 +00:00
94466300ed Argo: Changed deployed version to f28d9dd27fca269a9463e170dd8dabda7c3b4fbb 2025-08-02 17:24:02 +00:00
6ba8b091b4 Argo: Changed deployed version to 4224a6be739ea860175d4b9f851d5f94505d24fb 2025-08-02 17:21:40 +00:00
868b503813 Argo: Changed deployed version to f69be74a4526fb9ff1c39b7c3bfcd8b45b21b115 2025-08-02 17:19:07 +00:00
c70ec36e90 Argo: Changed deployed version to d3908d8d6653da0bc095c669acb1417fdfe07d44 2025-08-02 17:16:28 +00:00
f5c62e0b5e Argo: Changed deployed version to 43c168aaf2dceba6a06c482c91ceb0db226ed1b6 2025-08-02 17:13:19 +00:00
9256356a61 Argo: Changed deployed version to fa6a653e73f5c43b1680134098c6d0d688fe831d 2025-08-02 17:10:26 +00:00
d3cc9a2775 Argo: Changed deployed version to be606b61348622f68c121eee38a20a7550ad8488 2025-08-02 17:07:55 +00:00
8884a61575 Argo: Changed deployed version to 2c3774ba0971c1a01c013769a62fdf19f29e4b55 2025-08-02 17:05:09 +00:00
c22fddffff Argo: Changed deployed version to e623daad67fedbd2d1c3080eee464085488d0edf 2025-08-02 17:00:57 +00:00
68194995ff Argo: Changed deployed version to 721bb3f628542540d1ad8e065ac6cbc545a47021 2025-08-02 16:46:14 +00:00
6d9602c961 Removed Jenkins files 2025-07-30 23:04:24 +02:00
4 changed files with 1 additions and 143 deletions

View File

@ -1,32 +0,0 @@
FROM debian:bookworm-slim
# Zapobiega interaktywnym promptom
ENV DEBIAN_FRONTEND=noninteractive
# Instalacja zależności systemowych
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release \
apt-transport-https \
software-properties-common \
unzip \
bash \
&& rm -rf /var/lib/apt/lists/*
# Instalacja Azure CLI
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
# Instalacja kubectl (najświeższa stabilna wersja)
RUN curl -sLo /usr/local/bin/kubectl https://dl.k8s.io/release/v1.33.1/bin/linux/amd64/kubectl \
&& chmod +x /usr/local/bin/kubectl
# Instalacja kubelogin
RUN curl -sLo /tmp/kubelogin.zip https://github.com/Azure/kubelogin/releases/latest/download/kubelogin-linux-amd64.zip \
&& unzip -j /tmp/kubelogin.zip -d /usr/local/bin \
&& chmod +x /usr/local/bin/kubelogin \
&& rm /tmp/kubelogin.zip
# Domyślna komenda po starcie kontenera
CMD ["bash"]

86
.jenkins/Jenkinsfile vendored
View File

@ -1,86 +0,0 @@
pipeline {
agent {
kubernetes {
yamlFile '.jenkins/podTemplate.yaml'
}
}
environment {
RESOURCE_GROUP = 'tst-aks-rg'
CLUSTER_NAME = 'build'
DEPLOY_FILES = 'namespace.yaml secret-store.yaml deploy.yaml ingress.yaml'
NAMESPACE = 'user-microservice'
DEPLOYMENT = 'api'
CLIENT_ID = 'c302726f-fafb-4143-94c1-67a70975574a'
}
stages {
stage('Checkout') {
steps {
container('kubectl') {
checkout scm
}
}
}
stage('Login to Azure & Get Kubeconfig') {
steps {
container('kubectl') {
sh '''
az login --identity --client-id ${CLIENT_ID}
az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --overwrite-existing
kubelogin convert-kubeconfig -l azurecli
'''
}
}
}
stage('Apply Kubernetes Resources') {
steps {
container('kubectl') {
script {
def files = DEPLOY_FILES.tokenize()
for (file in files) {
sh "kubectl apply -f ${file}"
}
}
}
}
}
stage('Verify Deployment') {
steps {
container('kubectl') {
script {
// Waiting until all pods reach "ready" status
sh '''
echo "Waiting for deployment rollout..."
kubectl rollout status deployment/$DEPLOYMENT -n $NAMESPACE --timeout=60s
'''
}
}
}
}
stage('Health Check') {
steps {
container('kubectl') {
script {
// Check if app is healthy
def ingressUrl = "https://user-microservice.marcin00.pl/health"
sh """
echo "Checking app health ${ingressUrl}..."
for i in {1..30}; do
if curl -sf $ingressUrl; then
echo "Health check OK"
exit 0
else
echo "Health check failed. Retry \$i..."
sleep 5
fi
done
echo "Health check failed."
exit 1
"""
}
}
}
}
}
}

View File

@ -1,24 +0,0 @@
apiVersion: v1
kind: Pod
metadata:
labels:
some-label: jenkins-agent
spec:
containers:
- name: kubectl
image: marcin00.azurecr.io/azure-cli-kubectl:latest
command:
- cat
tty: true
volumeMounts:
- name: workspace-volume
mountPath: /home/jenkins/agent
volumes:
- name: workspace-volume
emptyDir: {}
nodeSelector:
kubernetes.io/os: linux
restartPolicy: Never

View File

@ -81,7 +81,7 @@ spec:
spec: spec:
containers: containers:
- name: api - name: api
image: marcin00.azurecr.io/user-microservice:a79ae2d50f2fc3dfcf976eb2a8ebe32511ae4a33 image: marcin00.azurecr.io/user-microservice:6966df2868a406f46347bc49a296458582872c8f
ports: ports:
- containerPort: 80 - containerPort: 80
env: env: