diff --git a/apps/demo-nginx/Jenkinsfile b/apps/demo-nginx/Jenkinsfile index 81997c8..94734d7 100644 --- a/apps/demo-nginx/Jenkinsfile +++ b/apps/demo-nginx/Jenkinsfile @@ -52,15 +52,70 @@ pipeline { steps { echo "Checking out application source code..." - sh ''' + // Create Dockerfile with actual version + sh """ cat > Dockerfile << 'EOF' FROM nginx:1.25.3-alpine -RUN echo "
Environment: Production
Version: ${IMAGE_TAG}
" > /usr/share/nginx/html/index.html +COPY index.html /usr/share/nginx/html/index.html COPY nginx.conf /etc/nginx/nginx.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] EOF - ''' + """ + + // Create index.html with actual version + sh """ + cat > index.html << EOF + + + +Environment: Production
+Version: ${IMAGE_TAG}
++ Image: ${DOCKER_REGISTRY}/${DOCKER_REPO}/${APP_NAME}:${IMAGE_TAG} +
+