Skip to content

Instantly share code, notes, and snippets.

@wellingtonpgp
Created July 8, 2018 20:49
Show Gist options
  • Save wellingtonpgp/9b4e6c4debeb13d07a1d70c641074d09 to your computer and use it in GitHub Desktop.
Save wellingtonpgp/9b4e6c4debeb13d07a1d70c641074d09 to your computer and use it in GitHub Desktop.
Configuração Jenkins
Jenkins 2.19.4
Criar uma maquina linux com ubuntu
putty
puttygen
pegar nome publico
------------------------
sudo apt-get install python-software-properties
------------------------
sudo add-apt-repository ppa:openjdk-r/ppa
------------------------
sudo apt-get update
------------------------
sudo apt-get install openjdk-8-jdk
------------------------
java -version
------------------------
https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Ubuntu
https://jenkins.io/doc/book/installing/#debian-ubuntu
-----------------------
sudo systemctl start jenkins
-----------------------
service jenkins status
-----------------------
netstat -plntu
-----------------------
Configurando apache com proxyreverse
-----------------------
sudo apt-get install apache2
-----------------------
sudo a2enmod proxy
-----------------------
sudo a2enmod proxy_http
-----------------------
sudo service apache2 restart
-----------------------
cd /etc/apache2/sites-available
-----------------------
ls
-----------------------
sudo vim jenkins.config
-----------------------
<Virtualhost *:80>
ServerName my.jenkins.id
ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
<Proxy http://localhost:8080/*>
Order deny, allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8080/ nocanon
ProxyPassReverse / http://localhost:8080/
ProxyPassReverse / http://my.jenkins.id
</Virtualhost>
----------------------
esc :wq
----------------------
sudo a2ensite jenkins
----------------------
sudo servide apache2 reload
----------------------
netstat -plntu
----------------------
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
----------------------
install suggested plugins
----------------------
Fazer as configurações do jenkins
----------------------
Gerenciar Jenkins
Configurar segurança global
Autorização
segurança baseada em matriz
add usuario
dar todas as permissões
-----------------------
cofigura git
-----------------------
instalar plugin de git no jenkins
-----------------------
Gerenciar Jenkins
gerencriar plugins
git parameter plug-in -> baixar agora instalar reniciar
-----------------------
adicionar todos ao repositorio
-----------------------
Criar nova task
novo job
nome: TesteJob
Contruir uum projeto de software free-style
Gerencimento de código fonte
adionar ususario e senha
Tigger de builds
Consultar periodicamnete o SCM -> Agenda
*/5 * * * *
Build
Invocar Ant
Alvos test jar
Ações de pos-build
Email notification
Arquivar os artefatos
target/*.jar
Salvar
Constuir agora
---------------------------------
sudo apt-get install ant
---------------------------------
which ant
---------------------------------
cd etc/
sudo vim bash.bashrc
---------------------------------
#ANT_HOME
ANT_HOME=/usr/bin/ant
PATH=$PATH:$HOME/bin:$ANT_HOME/bin
export ANT_HOME
----------------------------------
Gerenciar Jenkins
Global Tool Configuration
Ant
Ant instalations
----------------------------------
configurar o sistema
SMTP: smtp.gmail.com
Sufix: @gmail.com
Usar autenticação SMTP
Usar SSL
Porta SMTP:465
-----------------------------------
https://www.youtube.com/watch?v=j5D8SLxn6YA
-----------------------------------
https://www.youtube.com/watch?v=jfM1GiTOHSc
-----------------------------------
https://www.youtube.com/watch?v=M2z9MDp6uyU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment