- Login to your GitHub account (or create one if necessary)
- Fork solid-soft/junit4 to your GitHub account (using
Fork
button)
- Ensure Java 8 is used by default on your system
- As of January 2019 higher Java versions are not officially supported
- Download latest Jenkins weekly release (2.157 is fine) as WAR (or installed if preferred) from https://jenkins.io/
- Run Jenkins from console
- Linux/MacOS
- start any terminal with bash/fish/zsh
cd <directory-where-jenkins.jar-resides>
java -jar jenkins.war
- Windows (if WAR was selected)
- start command prompt
cd <directory-where-jenkins.jar-resides>
java -jar jenkins.war
- Hint. Jenkins home directory can be changed (if needed) by setting
JENKINS_HOME
variable:SET JENKINS_HOME=C:\users\foobar\.jenkins
- Hint. Default port to listen can be changed (if needed) with
--httpPort=9090
at the end of command
- Enter http://localhost:8080 page in modern web browser
- Unblock Jenkins instance
- Install suggested plugins
- Skip user creation
- Click "Start using Jenkins"
- Shutdown Jenkins from console (CTRL-C)
- Edit
$JENKINS_HOME/config.xml
file changing<useSecurity>true</useSecurity>
tofalse
- Start Jenkins (from console)
- Ensure your Jenkins is in English - that makes following this manual easier
- Locale plugin may be useful if your system language is different
- Enter http://localhost:8080 page in web browser
- Create new "Freestyle project" named "junit4"
- Configure source code repository to your GitHub (your fork) and add Maven/Gradle execution step
- Q. What will be the most suitable task(s) to execute?
- Hint. Use HTTPS to clone Git repository. URL can be obtained using green
Clone or download
button on your forked project webpage: https://github.com/YOUR-GITHUB-USERNAME/junit4 - Hint. Use
Source Code Management
->Git
instead ofGeneral
->GitHub project
to configure Git - Hint. Having problem with fetching Git repo? Ensure you have Git client installed.
- Hint. Do not configure SCM polling to not exceed anonymous user rate limits
- Hint. No having Maven installed? Use
mavenWrapper
branch and switch build step toExecute shell
and./mvnw clean package
(Linux) orExecute Windows batch command
withmvnw.cmd clean package
(Windows) instead ofMaven step
.
- Configure publishing JUnit test result report (see "Post-build action" section)
- Ensure report is visible on project page
- Hint. For Maven projects JUnit reports are placed by default in
**/target/surefire-reports/*.xml
. For Gradle projects in**/build/test-results/**/*.xml
- Hint. Have you got test failure? How it is reported? You can (optionally) fix or disable that test to make the build green (or blue)
- Configure mechanism to abort build if stuck (appropriate plugin should be already installed)
- Q. What time-out strategy would you use?
- Q. In what situations that plugin can be useful?
- Configure displaying timestamp in console output
- Q. When could it be handy?
- Q. What would be needed to test build also with other Java version?
- Execute sample project a few times in the way providing successful, unstable and failed runs
- Q. Can this information be presented in more compact way, providing place for other useful data?
- Rework job view to have (among others):
- compact status column
- last tests result
- number of builds
- previously used executor name
- cron trigger
- extra buttons/actions/columns you find useful
- Hint. Use provided screenshot as inspiration (however, you view can be different)
- Hint. New view can be added using
+
sign next to existing view name - Hint. Install selected plugins from provided list to get extra features - Jenkins -> Manage Jenkins -> Manage Plugins (not all are required)
- Hint. Some plugins are not on list. Find them manually using https://plugins.jenkins.io/
- Hint. Default view cannot be edited - create new list view and set it as default
- Do not limit yourself with provided list of plugins - explore 1000+ Jenkins plugins available
- Try to find features that would be useful in job daily Jenkins use
- Groovy
- Envinject
- Email-ext
- Timestamper
- Rebuild
- Build timeout
- Compact Columns
- Extra Columns
- ThinBackup
- Next Executions
- JobConfigHistory
- Build Name Setter
- SonarQube
- Keyboard Shortcuts
- Chuck Norris ;-)
- Delivery Pipeline Plugin
- Cron Column
- Nested View
- Throttle Concurrent Builds
- Dashboard
- Build Monitor
- Build Failure Analyzer
- Claim
- Project Statistics
- Groovy Postbuild
- solid-soft/junit4 should be already forked to your GitHub account after Jenkins exercise
- Sign in to Travis CI with your GitHub account
- Enable Travis for that repository (re-sync repositories in Travis if needed)
- Add .travis.yml to your project and configure it
- Build project with Oracle JDK 8
- Hint. Leverage Travis getting started instruction for Java projects
- Hint. Came across issue with too old Maven version? Use Maven wrapper which is already configured in project (already available in
mavenWrapper
branch - just merge it).- Q: What the project tries to build twice?
- Hint. Default implementation of Travis step can be disabled/overridden with
stepName: true
- Q. How project build time on Travis compares to that on local Jenkins?
- Q. What method of configuration do you prefer?
- Build project with both Oracle JDK 8 and OpenJDK 7
- Create some PR to your project fork (not to project in my repository!)
- Q. What is needed to enable PR building in Travis?
- Experiment with Gradle/Maven wrapper and/or dependencies caching
- Hint. Add
site:site
to tasks list before enabling caching to increase number of dependencies to download. - Q. What was the impact on project build time?
- Q. Is there something what forces cache to be rebuilt even if there are no changes are made to dependencies?
- How to get detailed information about test failures?
- Follow instructions available in test projects itself.
- Download latest SonarQube version (6.5 is fine) from https://www.sonarqube.org/
- Unzip it somewhere
- Run Sonar in console mode
- Linux
- start any terminal with bash/fish/zsh
cd <directory-with-unzipped-sonar>/bin/linux-x86-64
./sonar.sh console
- Windows
- start command prompt
cd <directory-with-unzipped-sonar>/bin/windows-x86-64
StartSonar.bat
- Enter http://localhost:9000 page in web browser
- Run analysis manually from Maven (in JUnit4 directory from previous exercises)
mvn package
(to provide compiled sources)mvn sonar:sonar
(or usemvnw.cmd
if needed)- Q. There is no Sonar configuration in JUnit4 project. Why execution succeed?
- Find the execution results in Sonar server
- Explore "Issues" view
- Q. Have you find any "real" issues or places to improve?
- Play with keyboard navigation and shortcuts available in Sonar (press
?
to see related help)
- Find some false positive(s) and mark it.
- Hint. Login as Administrator (
admin/a***n
) to be able to modify issues
- Add some artificial issues in code
- If hopeless, add 3 lines with
if (1.0d == 1.0d) {}
in TestSuite class (TestSuite.java file) starting with line 146 - Hint. To find class in IDE use
CTRL-N
in Idea orCTRL-SHIFT-T
in Eclipse
- Re-run analysis
- Q. What has changed in project view in Sonar?
- Q. Why "Quality Gate" started to fail?
- Q. Can "Leak Period" metric be useful in your project?
- Install SonarLint for your IDE using instruction available on project webpage: http://www.sonarlint.org/
- Analyze sample project
- Q. How are issues reported?
- Enable connected mode and rerun analyze
- Idea
- CTRL-ALT-S -> SonarLint General Settings -> Add
- CTRL-ALT-S -> SonarLint Project Settings -> Enable binding ... -> Bind to server -> SonarQube project
- More information in official documentation
- Eclipse
- See official documentation
- Q. How it affected number of reported issues?
- Mark some issue(s) in SonarQube as
false positive
orwon't fix
- Q. How are those issues reported as in your IDE by SonarLint?
- Install SonarQube plugin for Jenkins
Jenkins -> Manage Jenkins -> Manage Plugins
- Configure your local Jenkins instance
- Enable injecting of SonarQube server configuration into build
- Add SonarQube server in
Jenkins -> Manage Jenkins -> Configure System
- Hint. In fact it is not needed for Sonar server in development mode running on localhost - it would be taken by default anyway - but for remote server configuration properties have to be passed - you can set server URL to
http://localhost:9001
to make it fail and verify it does matter.
- Duplicate your old JUnit job in Jenkins (
New Item -> Copy from
)
- Good name can be
junit-sonar
- Configure your
junit-sonar
job to run Sonar analysis
- Tick
Prepare SonarQube Scanner environment
- Add Maven step executing
sonar:sonar
task - Hint. Use
-Dmaven.test.failure.ignore=true
to finish "base" Maven step despite failing tests - Q. Sonar analysis can be also run with
Execute SonarQube Scanner
step - what is advantage of using dedicated Gradle/Maven plugin?
- Execute analysis
- Hint. Execution should fail if you configured port
9001
. Fix it to default9000
and verify execution finishes successfully - Hint. Remember to push your changes (from local analysis section) to GitHub to make Jenkins build see them (if you need it)
- Hint. To use Maven Wrapper (if needed in your environment) add
Execute shell
orExecute Windows batch command
instead ofMaven step
. - Hint. When in doubt (or trouble) you can consult official plugin documentation
Outline. Mange your Jenkins configuration using YAML files
- Install the Configuration as Code plugin (
Jenkins -> Manage Jenkins -> Plugin Manager -> Available
or using the aforementioned Groovy script) - Configure the following settings using
$JENKINS_HOME/jenkins.yaml
(or depending on your installation method$JENKINS_ROOT/jenkins.yaml
):
- Hint. Create that file if not available
- Hint. Consult auto-generated documentation to find proper syntax (
Jenkins -> Manager Jenkins -> Configuration as Code -> Documentation
). Please note however, it is auto-generated and in some cases may not be fully functional. - Hint. When in trouble (unfortunately it is quite common - the documentation has its own limitations) ask Google or search for samples in the CasC project GitHub repositor
- Change Jenkins
System message
to "Greeting from the very interesting CI training" ;) - Create two explicit Java installation (e.g.
JAVA8
andJAVA11
)- Hint. Use
JAVA8
andJAVA8_2
if you don't have two different Java versions installed
- Hint. Use
- Set number of executors on master to 4
- Install the Chuck Norris plugin in the latest version
- Hint. You should start seeing log messages from
io.jenkins.plugins.casc
during Jenkins initialization for some actions. Also inJenkins -> Manager Jenkins -> Configuration as Code
there should be information that configuration is loaded from a file. - Hint. Having trouble locating a default configuration file? Override the variable
CASC_JENKINS_CONFIG
- Hint. You may reload changes in your configuration file using the "Reload existing configuration" button (
Jenkins -> Manager Jenkins -> Configuration as Code
) - Hint. Manually verify correctness of your changes in the Jenkins (or a job) configuration
- Set
Safe HTML
(instead ofPlain text
) asMarkup Formatter
- useful for the Stash/GitLab PR builds visualization - Add GitHub credentials using your newly generated API key/token.
- Hint. Keeping passwords/tokens plain text in a configuration file placed in a Git repository is not a good practice. For real systems use Hashicorp Vault or a similar tool, alternatively pass them as environment variable to read at runtime with e.g.
$GITHUB_TOKEN
. - Hint. Be sure to define them in
GLOBAL
scope notSYSTEM
scope to be visible in a job
- Hint. Keeping passwords/tokens plain text in a configuration file placed in a Git repository is not a good practice. For real systems use Hashicorp Vault or a similar tool, alternatively pass them as environment variable to read at runtime with e.g.
- Play with some other settings which may be useful in your daily work.
Outline. Generate simple Jenkins job completely in code
- Install Job DSL plugin (
Jenkins -> Manage Jenkins -> Plugin Manager -> Available
) - Create new "FreeStyle project" named
simple-inline-seed
- Add Job DSL script processing in
Build
section - Select inline script -
Use the provided DSL script
(as opposed to take it from filesystem) - Write short script creating one simple job based on example provided by trainer
- Execute seed job to make your job created
- Q. Is it easy to write inline script? What bother you most?
- Q. How the mentioned problems could be solved/mitigated?
- Extend your job by adding extra steps and publishers
Outline. Create simple CI job in your IDE using Job DSL.
- Ensure the following plugins are installed
- build-timeout
- compact-columns
- dashboard-view
- delivery-pipeline-plugin
- filesystem_scm
- flexible-publish
- git
- gradle
- groovy-postbuild
- job-dsl
- jobConfigHistory
- nested-view
- parameterized-trigger
- rundeck
- timestamper
- view-job-filters
- Hint. Boring with manual plugin installation? Use the following script in
Jenkins -> Manager Jenkins -> Script Console
List<String> plugins = [
'build-timeout',
'compact-columns',
'dashboard-view',
'delivery-pipeline-plugin',
'flexible-publish',
'filesystem_scm',
'git',
'gradle',
'groovy-postbuild',
'job-dsl',
'jobConfigHistory',
'extra-columns',
'nested-view',
'parameterized-trigger',
'rundeck',
'timestamper',
'view-job-filters',
]
PluginManager pluginManager = PluginManager.createDefault(Jenkins.instance)
pluginManager.install(plugins, true)
- Hint. Plugins are installed in background. Follow Jenkins logs to determine time when Jenkins should be restarted.
- Clone job-dsl-workshop project.
- Create
job-dsl-workshop-seed
Freestyle project - Configure your local project directory as job SCM
- Switch
Source Code Management
to "File System" - Hint. Missing "File System" option to select? Ensure you have File System SCM installed
- Provide path to your directory with
job-dsl-workshop
cloned - Enable filtering file by wildcards:
**/.git/**
,**/build/**
- Configure Gradle build
- Add
Invoke Gradle script
step - Select
Use Gradle Wrapper
- Provide
clean check
as tasks to execute
- Configure Job DSL job definitions processing
- Add
Process Job DSLs
step - Provide relative location of your job definitions (
jobs/*.groovy
) inLook on Filesystem
- Set actions for removed elements to
Delete
- Click "Advanced" and provide additional classpath -
build/classes/main
andbuild/resources/main
- Hint. Additional classpath is redundant right now, but will be useful having custom helper classes
- Save your changes
- Run newly created job
- Q. Is the build executed successfully?
- Q. Are there any new jobs generated?
- No? Proceed to the next section
- Import project
job-dsl-workshop
in your IDE
- Idea (recommended) -
File -> Open -> build.gradle
- Eclipse - check
README.md
in project root directory
- Examine content of
jobs
directory - In
s1_1_simple_single.groovy
(jobs
directory) write code creating simple job executing shell script (or batch file) printing "Hello Job DSL!"
- Hint. Leverage code completion in your IDE. Key elements to use:
job
,steps
- Hint. Use JavaDoc (and/or source code) for Job DSL methods (Idea: CTRL-Q and CTRL-B)
- Rerun
job-dsl-workshop-seed
in Jenkins
- Hint. Job generation failed during seed execution? Unignore in code
JobScriptsSanitySpec
to get faster feedback next time.
- Is there any new job created?
- Hint. Examine seed job console output or
Generated Items
section (on seed job page)
- Execute created job verifying that requested text is printed in console output
- Using
s1_2_extended_single.groovy
write Job DSL code creating job (name itsample-gradle-build
) building Gradle project - Implement the first iteration which:
- Clones code from remote Git repository (repo URL: https://github.com/solidsoft-training/sample1-gradle-ci.git)
- Builds only master branch (not all branches)
- Compiles code and run tests using Gradle (
clean check
tasks are enough) - Uses Gradle wrapper
- Verify in Jenkins that proper jobs is generated and does all requested things
- In addition to job execution it is good to manually check jobs configuration using UI (
Configure
page for given job)
- Iteration 2. Display timestamp next to every line in console output
- Hint. Extra actions pre/post job execution can be found in
wrapper
closure
- Iteration 3. Add automatic build triggers:
- nightly SCM polling (
@midnight
expression is ok) - weekly build regardless of changes in code (every Monday at 5 AM)
- Hint. Examine element available in
triggers
closure
- Iteration 4. Add publisher generating nice report for JUnit test execution
- not failing the build even if there are no tests in given project
- Generate jobs (the same as in previous step) for every project ending with
-gradle-ci
insolidsoft-training
organization on GitHub - uses1_3_extended_multiple.groovy
- Hint. Leverage Groovy generate URL of that projects
- Use https://api.github.com/users/solidsoft-training/repos to get JSON with all required information
- In Groovy it is easy to get body of GET request with
text()
method called on URL - Use
JsonSlurper
to parse received JSON data structure which can be iterated
- Q. For what else Groovy logic could used in that kind of scripts?
- Generate view named
seeds
collecting all seeds in your Jenkins
- Hint. Use List View (and corresponding
listView()
method insteadjob()
) - For flexibility, view should filter jobs using regular expression
- Jobs ending with
-seed
seems to good candidate to include
- Jobs ending with
- View should display following information:
- Status of the last build
- Weather report
- Job name
- Last success time
- Last failure time
- Last execution duration
- Q. What column by default are included in generated view?
- Generate enhanced view named
fancy-seeds
collection all seeds in your Jenkins
- That view should behave the same as the previous one
- View should display following information
- Status of the last build
- Weather report
- Job name
- Last statuses (aggregated success/unstable/failed column from Compact Columns plugin)
- Hint. Having problem with find proper method in Job DSL? Skip it and add other columns
- Last execution duration
- Schedule a build button
- Last/current console output link/butten
- Some plugins are not supported by Job DSL (such as Compact Columns) - manual XML node manipulation has to be used as workaround
- Read The Configure Block section in project wiki
- Check XML of manually created view with "Last statuses" column to get know what XML entries are needed to be inserted
- Hint. Views are stored in
config.xml
- Hint. Views are stored in
- Ensure columns are placed in aforementioned order.
- Q. How
columns
andconfigure
block can be ordered? - Q. What to do to make given plugin supported out-of-box by Job DSL?
- Brood about difference between inline and "civilized' Job DSL development
- Q. Is code completion useful to fulfill your task?
- Q. What other benefits of using separate Gradle project to handle Job DSL configuration do you see?
- Q. How do you test your changes? Do you see a field for improvements?
- Q. How to handle a seed job creation itself in production Jenkins?
- Q. Remember setting action for removed jobs/views to
DELETE
? Is it safe? What could be consequences of using bothDELETE
andIGNORE
?
- Play with some (interesting for your) feature provided by Groovy+Postbuild+Plugin
- Start with manual edition in selected job
- When satisfied enable them with Job DSL
Follow the instructions provided by the trainer.
- Install the following plugins:
- Pipeline Utility Steps (id
pipeline-utility-steps
) - provides some extra steps which potentially may be useful - Job Configuration History (id
jobConfigHistory
) - helps review changes done between builds - AnsiColor (id
ansicolor
) - Ansi codes rendering (colorized output) Hint. You can install it using Configuation as Code or a Groovy script
- Write a simple one-stage pipeline (
Jenkins -> New Item -> <enter name> -> Pipeline -> OK
) which outputs a message on an execution (copy-paste the following code):
pipeline {
agent any
stages {
stage('Hello stage') {
steps {
echo 'Hello from Declarative pipeline!'
}
}
}
}
2b. Get familiar with the Pipeline syntax
link (aka Snippet Generator
) available in every Pipeline job on the left
- Check out also
Declarative Directive Generator
available from thePipeline syntaxt
view
- Add a shell step execution displaying the installed Java version.
- Hint. Use the
Snippet Generator
to get a name of the required step
- Create an another stage
Var stage
with a single step - Define (globally for the pipeline) a variable named
MESSAGE
and display it using anecho
step and${VAR}
syntax
- Hint. Use
Declarative Directive Generator
to find the proper directive - Q. Do you remember what is the main difference between single quotas
'
and double quotas"
in Groovy? Check it in practice.
Extra tasks (for people with docker
installed locally)
- Duplicate your stage and specify the agent with different Java image for each of them (e.g.
openjdk:8u191-jdk-alpine
andadoptopenjdk/openjdk11:jdk-11.0.1.13-alpine-slim
) - Check the output to verify that a proper Java version is used
- Hint. Use
Declarative Directive Generator
to find the proper directive
- Create a String input parameter
deployEnv
and some description - Create a boolean parameter
forceDeployForTheSameVersion
with a default value set tofalse
- Display them in the output of the another stage (remember to use
${params. }
construction - Run the pipeline a few times with different parameters
- Q. Is it possible to filter displayed build by a parameter value?
- Q. For which type of jobs parameterized jobs are useful?
- Q. Explore other types of parameters. Which else do you see useful and where?
- Define a new
username with password
global credentials (or reuse existing one if any) - Use the
MY_CRED = credentials(CRED_ID)
construction to fetch the credentials and assign it to a variable - Leverage the fact that 2 extra variables with
_USR
and_PSW
prefixes are created. Display them.
- Q. What happens to displayed credentials?
- Q. How can we test if a good value is used?
- Enable globally for your pipeline:
- displaying timestamps
- colorized output support
- global timeout
- Hint. Take a look at the
options
directive available in theDeclarative Directive Generator
- Hint. Beware minor issues in snippet/directive generators.
timestamp()
has to be a method call - Hint. Output coloring can be tested with the following step
sh 'echo -e "\033[0;31m"Foo"\033[0m" Bar'
- Use
currentBuild.displayName =
construction to append parameter values to the build name. Which step has it be to surrounded by to make it work?
- Add an another stage named
Deploy
. - Make it a step requiring a manual acceptation (OK/Cancel).
- Hint.
Declarative Directive Generator
is your friend to find a proper directive
-
Run the pipeline a few times accepting or not a deployment
-
Extend the input step to an extra String parameter
ENVIRONMENT
with a default valuePROD1
which can be used to (fake) override default deploy environment. -
Define actions for selected post build (or post stage) condition (e.g. displaying a text simulating a sent notification).
- Hint. Again, use
Declarative Directive Generator
to find an appropriate directive - Q. In what cases, do you see it useful?
- Try to use more advanced features of an input to provide a way to provide a value using a remote HTTP call (e.g. with
curl
).
Outline. Use learned techniques to create a pipeline to build the forked JUnit 4 from the Exercise 1.
- Create a new pipeline
- Create at least 2 stages
- Fetch JUnit 4 code from your GitHub repository
- Run Maven directly or using a wrapper
- Collect test execution report
- Add extra features such as colorized output or execution timestamps
- Hint. Remember about
Snippet Generator
andDeclarative Directive Generator
- Hint. You can reuse parts of code from the previous pipeline
- Clone your forked version of junit 4 locally
- Copy-paste the Declarative Pipeline from the previous exercise to
Jenkinsfile
created in the cloned project root directory
- Hint. That pipeline should be working. Having issues with your own pipeline from the previous exercise ask colleagues or the trainer 3. Commit
Jenkinsfile
(to already existing branch or a new one) and push it to GitHub
- Create another pipeline job in Jenkins (
New Item -> Pipeline
) with name suggesting thatJenkinsfile
will be used - Instead of
Pipeline script
in the pipeline configuration choosePipeline script from SCM
- Point to your forked JUnit 4 repo on GitHub
- Hint. Remember about a branch name if it is not in master
- Run your pipeline
- Q. What happened during that operation?
Outline. Create build pipeline for JUnit using Pipeline script (scripted pipeline).
- Create a new pipeline job junit-pipeline:
New Item -> Pipeline
- Configure the Pipeline script to:
- Clone JUnit from your the GitHub repository
- Build it using Maven (or Maven Wrapper)
- Publish the JUnit tests execution report
- Hint. Take the advantage of one of the available examples in the "try sample Pipeline..." dropdown - adjust it to your needs
- Hint.
-Dmaven.test.failure.ignore=true
can be useful again - Hint. Some other actions required? Click the
Pipeline Syntax
link to generate code snipped for selected plugin orSteps reference
(3 positions lower) to get know more possible options (such as timeout or coloring).
Follow the instruction provided by the trainer.
Outline. Launch and connect to your local Jenkins instance an extra agent
- Install the Swarm plugin (ID:
swarm
). - Download the latest version of the swarm-client (or use the unofficial jenkins-swarm-slave image from Docker Hub)
- Enable JNLP in Jenkins (
Jenkins
->Configure Jenkins
->Configure Global Security
->Agents
->TCP port for JNLP agents
->Fixed port
) - Launch swarm-client.jar (directly -
java -jar swarm-client.jar
or using a docker image) with-help
to see possible parameters - Launch swarm-client.jar with the parameter pointing your master server location
- On success (
INFO: Connected
) check in Jenkins UI the availability of a new slave - Try to execute some job/pipeline on it
- Hint. Putting your master node "offline" may be useful
Extra tasks
- (With permission) try to connect to some other Jenkins master in the network (firewall on that computer has to pass the fixed port configured for JNLP)
- Try to use auto-discovery mode
- Limit number of executors to 1 (modifying swarm-client.jar execution parameters)
Outline. Deploy static webpage to GitLab pages.
- Login to GitLab (NOT GitHub) account or create one
- Fork one of example (page) projects
- Hint. All should work, but only "jekyll" is supported by the trainer if in trouble :)
- Enable shared runners for forked projects
Settings (gear button) -> CI/CD Pipelines -> Shared Runners -> Enable shared Runners
- Proper
.gitlab-ci.yml
was available in forked project - there is no need to modify it. - Edit your site (using GitLab UI)
- In case of "jekyll" project
_config.yml
- Follow GitLab CI runner execution (
running
blue button on the left of commit information) - Visit your new webpage: https://YOUR_USERNAME.gitlab.io/PROJECT_NAME
- Your modifications should be visible
- Take a look at
.gitlab-ci.yml
content - try to identify essential elements
- Hint. You can consult GitLab CI reference manual
- Make your website available as your default user website - https://YOUR_USERNAME.gitlab.io
- It can be achieved by renaming project name (in "Rename repository" section! - not at the top of page) to
YOUR_USERNAME.gitlab.io
and re-triggering build- Hint. Build can be triggered by extra commit or with API - consult
Settings -> CI/CD Pipelines
to generate token and get sample requests
- Hint. Build can be triggered by extra commit or with API - consult