Jenkinsfile 947 B

1234567891011121314151617181920212223242526272829303132333435
  1. pipeline {
  2. agent {
  3. dockerContainer {
  4. image 'ubuntu:22.04'
  5. }
  6. }
  7. stages {
  8. stage('Clone') {
  9. steps {
  10. git branch: 'main',
  11. credentialsId: '9174b603-02b6-46bd-970d-64569bab977a',
  12. url: 'http://192.168.9.65:3001/patric/sc-test.git'
  13. git branch: 'main',
  14. url: 'https://github.com/buddy-works/laravel-first-steps.git'
  15. }
  16. }
  17. stage('Build') {
  18. steps {
  19. script {
  20. dockerImage = docker.build registry + ":$BUILD_NUMBER"
  21. }
  22. }
  23. }
  24. stage('Deploy our image') {
  25. steps{
  26. script {
  27. docker.withRegistry( '', registryCredential ) {
  28. dockerImage.push()
  29. }
  30. }
  31. }
  32. }
  33. }
  34. }