22 Commits

Author SHA1 Message Date
0bf37463a5 WOODPECKER: Changed deployed version to 37aa5692eff627f19cc5f7a37d882bf6126c9d13 2025-07-27 11:52:58 +00:00
118165902a WOODPECKER: Changed deployed version to c266121cb9e00a14e26d62e839fd19704f071e18 2025-07-27 11:47:14 +00:00
dbeea52cc2 WOODPECKER: Changed deployed version to 7c5845b059f13ba8d5c3315be6699f74051af4e2 2025-07-27 11:40:40 +00:00
c73772fc88 WOODPECKER: Changed deployed version to de2211d3240cfdaa22991cf87f60d716d0af0d55 2025-07-27 11:34:45 +00:00
f64388221a WOODPECKER: Changed deployed version to 59ce5f21590993e6760680e5dad545c0f09d2935 2025-07-27 11:28:26 +00:00
54148ca45c WOODPECKER: Changed deployed version to a01e83f40c06fa172f4aeaaf38d06dd89b20f239 2025-07-27 11:22:13 +00:00
aaf2a667fc WOODPECKER: Changed deployed version to e6f5f61ccdad7afab033a7ac7733f09819b3c504 2025-07-27 11:14:29 +00:00
7c4cfdd6ed WOODPECKER: Changed deployed version to aeb137fb20c907c7a58691135b00e0672a8619e1 2025-07-27 11:08:25 +00:00
c4550fd73d WOODPECKER: Changed deployed version to ff5d0773c801ba7340f6aae8686741d8af9d6a07 2025-07-27 11:02:16 +00:00
eac2dca410 WOODPECKER: Changed deployed version to 42e2812f42d14fae533ea0a21503dee1a67a3d1c 2025-07-27 10:56:20 +00:00
b936180e8f WOODPECKER: Changed deployed version to f284adc21333474f3bf7c9ac5701a561378a6461 2025-07-27 10:50:27 +00:00
90839f6d6d WOODPECKER: Changed deployed version to c3014d63aa246751557ffc0eb244d47d4062dfb2 2025-07-27 10:44:37 +00:00
7c6cf97704 WOODPECKER: Changed deployed version to 552278e47af2a1eaab18b1219c7687f0fd90d854 2025-07-27 10:38:05 +00:00
32cb0e1bd1 WOODPECKER: Changed deployed version to 97f3b3432a904da70ef1f53f4f871b0a6e101b7f 2025-07-27 10:31:04 +00:00
1b94139517 WOODPECKER: Changed deployed version to c08099f81bb59f2e77a137b728e31f397779cbfc 2025-07-27 10:23:55 +00:00
da65261d71 WOODPECKER: Changed deployed version to e06466e54a814e165dc53bfdaf7ccac0f48c0525 2025-07-27 10:06:43 +00:00
8c2523eb19 WOODPECKER: Changed deployed version to 27cdaa7c0ed3bafa37fd578bd2e596799c3aff2d 2025-07-27 09:59:12 +00:00
6aac0b86e4 WOODPECKER: Changed deployed version to feefee6cc921b34343e3b89e018f590d7ed4c2ea 2025-07-27 09:44:00 +00:00
6f33ab7297 WOODPECKER: Changed deployed version to 8ed4522df3c02627ce8e73b35004579275a3450b 2025-07-27 09:34:14 +00:00
62b61856a8 WOODPECKER: Changed deployed version to 3d82736e2da32bb70d0a7eeb76d97ade799a05be 2025-07-27 09:21:56 +00:00
11ad241758 WOODPECKER: Changed deployed version to 156c475b825eb033f2e0b9e415417900dc2f38c2 2025-07-27 09:04:27 +00:00
bd629b4244 Removed Jenkins pipeline 2025-07-26 15:41:12 +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:
containers:
- name: api
image: marcin00.azurecr.io/user-microservice:a79ae2d50f2fc3dfcf976eb2a8ebe32511ae4a33
image: marcin00.azurecr.io/user-microservice:37aa5692eff627f19cc5f7a37d882bf6126c9d13
ports:
- containerPort: 80
env: