diff --git a/Jenkinsfile b/Jenkinsfile index a55a22b..8a9ad72 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -66,45 +66,31 @@ spec: } } stages{ - stage('Get source code') { - steps { - container('maven') { - sh 'git clone https://git.konsthol.eu/konsthol/example-app appsource' - } - } - } - stage('Prepare source code') { - steps { - container('maven') { - sh 'mvn io.quarkus.platform:quarkus-maven-plugin:3.22.1:create -DprojectGroupId=com.example -DprojectArtifactId=example-app -DclassName=Example -Dextensions="resteasy-reactive,helm"' - } - } - } stage('Make jar') { steps { container('maven') { - sh 'cd example-app && mvn install -DskipTests' + sh 'mvn install -DskipTests' } } } stage('Change values.yaml to nexus') { steps { container('maven') { - sh 'sed -i "s|docker.io/root/example-app:1.0.0-SNAPSHOT|$NEXUS_URL|g" example-app/target/helm/kubernetes/example-app/values.yaml' + sh 'sed -i "s|docker.io/root/example-app:1.0.0-SNAPSHOT|$NEXUS_URL|g" target/helm/kubernetes/example-app/values.yaml' } } } stage('Make chart') { steps { container('helm') { - sh 'cd example-app && helm package target/helm/kubernetes/example-app' + sh 'helm package target/helm/kubernetes/example-app' } } } stage('Upload chart') { steps { container('maven') { - sh 'cd example-app && curl -u admin:$NEXUS_PASS --upload-file example-app-1.0.0-SNAPSHOT.tgz $NEXUS_URL' + sh 'curl -u admin:$NEXUS_PASS --upload-file example-app-1.0.0-SNAPSHOT.tgz $NEXUS_URL' } } } @@ -118,7 +104,7 @@ spec: stage('Docker build in Docker') { steps { container('docker') { - sh 'docker build -t example-app -f /home/jenkins/agent/workspace/example-pipeline/appsource/Dockerfile example-app/target' + sh 'docker build -t example-app -f ./Dockerfile target' } } }