Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

1

You can achieve this using Git and Jenkins job. Create a Jenkins Job to deploy your code to server and Setup Git webhook to Call Jenkins job. Check this link: https://www.serverkaka.com/2019/02/configure-github-webhook-in-jenkins-job-pipeline.html OR Create an empty Git repo on the server Write a Git Hook to deploy the code Deploy from the local ...


0

You can use the Jenkins provided step dir() which changes the directory to one relative to the Jenkins env.WORKSPACE (/var/lib/jenkins/workspace/JOB_NAME by default). stage('Build') { steps { dir('path/to/dir') { // do stuff } dir('path/to/other/dir') { // do other stuff } } }


0

Yes, full cloning of LFS files can be restricted! By default, GitLab will clone your repo into the CI/CD build directory. To limit the clone from downloading the LFS files, tell it not to do it. You do this by setting a variable in .gitlab-ci.yml like this. # Other declarations etc above the specific job jobname: variables: GIT_LFS_SKIP_SMUDGE: 1 # ...


0

There is no equivalent for before_script. However you can define a function in your pipeline and call it in the begining of each stage. pipeline { agent any stages { stage('Build') { steps { cd // } } stage('Test') { steps { cd ...


2

Yes, there is: If your commit message contains [ci skip] or [skip ci], using any capitalization, the commit will be created but the pipeline will be skipped. Alternatively, one can pass the ci.skip Git push option if using Git 2.10 or newer: git push -o ci.skip From: GitLab CI YAML documentation - "Skipping jobs"


Top 50 recent answers are included