initial commit

This commit is contained in:
Uwe Jakobeit
2026-03-29 15:42:50 +02:00
commit bd7ab233bb
4 changed files with 59 additions and 0 deletions

13
CMakeLists.txt Normal file
View File

@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.16)
project(hello_cpp LANGUAGES CXX)
# Set C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Define the executable
add_executable(hello_app src/main.cpp)
# Optional: Link libraries if needed
# find_package(Boost REQUIRED)
# target_link_libraries(hello_app Boost::boost)

38
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,38 @@
pipeline {
agent any // Or use 'dockerfile' if running in a container
stages {
stage('Checkout') {
steps {
// Checks out the source code from the configured Gitea SCM
checkout scm
}
}
stage('Clean') {
steps {
//sh 'rm -rf build'
echo "Building branch ${env.BRANCH_NAME}"
}
}
stage('Configure') {
steps {
// Configure CMake to generate build files in the 'build' directory
sh 'cmake -B build -S .'
echo "Configure project"
}
}
stage('Build') {
steps {
// Build the project using the generated files
//sh 'cmake --build build'
echo "Build project"
}
}
stage('Test') {
steps {
// Run the executable to verify it works
//sh './build/hello_app'
echo "Test project"
}
}
}
}

2
jenkins-gitea-setup Normal file
View File

@@ -0,0 +1,2 @@
gitea: jenkins-token (konfigurierter token name )
094de7fbbe47920bccd25af0527801c3ac7c0068

6
main.cpp Normal file
View File

@@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "Hello from C++ with CMake!" << std::endl;
return 0;
}