Mão na massa – Integração contínua com FTP em hospedagem compartilhada

I hurried into the Examprepwell local department store to grab1 some last minute exam 70-483 dumps Chirsmas gifts. I 300-135 tshoot pdf Learningpdf looked at all the 1Z0-061 Certification people Examprepwell and grumbled2 to myself. I would be in here forever and I just had so much to do. Chirsmas was beginning to become such a drag. I kinda wished that I could just sleep through Chirsmas. 300-135 tshoot pdf But I 1Z0-061 Certification hurried the best I could through all the people to the toy department. Once again I kind of mumbled3 to myself at 1Z0-061 Certification the prices of all these 300-135 tshoot pdf toys, ADM-201 certification and 1Z0-061 Certification wondered if ADM-201 certification the 1Z0-061 Certification grandkids would even play whit4 them. I found myself in Learningpdf the doll aisle5. Out of the corner of my eye I saw a little boy about Examprepwell 5 holding a lovely doll.He kept 1Z0-061 Certification Examprepwell touching6 her hair and he held her so gently. I could not seem to help myself. I just kept exam 70-483 dumps loking over at the little boy and wondered who the doll was for. I watched him ADM-201 certification turn exam 70-483 dumps to a woman and he Learningpdf called his aunt by name and said, “Are you sure I Examprepwell don’t have enough money?” She replied a bit 300-135 tshoot pdf impatiently, “You know that 300-135 tshoot pdf you don’t have enough money for it.” The aunt told the 70-486 study guide little boy not 1Z0-061 Certification to go anywhere that she had to 1Z0-061 Certification go and get some 70-486 study guide other things and 70-486 study guide would be back in a few minutes. And then she left the aisle. The boy continued to hold the 70-486 study guide doll. After a bit I exam 70-483 dumps asked the Learningpdf boy who the Learningpdf exam 70-483 dumps doll was for. He said, “It is the doll my sister wanted so badly for Chirsmas. She just knew that Santa would bring it. “I told him that maybe Santa was going to bring it . He said, “No, Learningpdf Santa can’t go Learningpdf where my 70-486 study guide sister is…. I have to give the exam 70-483 dumps doll to my Mama to take to her. “I asked him where his exam 70-483 dumps siter was. He looked at me with Examprepwell the saddest eyes and said, Examprepwell ADM-201 certification “She was gone to be with Jesus.

My Daddy says that Mamma is going to ADM-201 certification have to go be with 1Z0-061 Certification her.” My 70-486 study guide heart nearly stopped beating. Then the boy looked at me again and said, “I told my Daddy to tell 1Z0-061 Certification ADM-201 certification my Mama 300-135 tshoot pdf not to go yet. 70-486 study guide I told him to tell her to wait till I got back from the store.” Then ADM-201 certification he asked Examprepwell Examprepwell me if i wanted to see his picture. I 70-486 study guide told 300-135 tshoot pdf him I’d love to. He pulled out some picture he’d had taken at Examprepwell the front of the store. He said, “I want 300-135 tshoot pdf my Mama to take this with ADM-201 certification her so the dosen’t exam 70-483 dumps ever forget exam 70-483 dumps me. I love my Mama so Examprepwell very much and I wish she dind not have to leave me.But Daddy says she will need to be with my sister.” I saw that Learningpdf the little boy had lowered his head 300-135 tshoot pdf and had grown so qiuet. While he was not looking I 300-135 tshoot pdf reached into my purse and pilled 70-486 study guide out a handful of bills. I asked the little boy, “Shall 1Z0-061 Certification we count that miney one more 1Z0-061 Certification Examprepwell Learningpdf time?” He grew excited and said, “Yes,I just know it has to be enough.” So I slipped my money in with his and we began to count exam 70-483 dumps 70-486 study guide 70-486 study guide it . Of course it was plenty for the doll. Learningpdf He softly said, “Thank you Jesus for giving me enough money.” Then 300-135 tshoot pdf the boy said, “I just ADM-201 certification asked Jesus to give me enough money to ADM-201 certification buy this Examprepwell Learningpdf doll so Mama can take it with her to give ADM-201 certification my sister. And he heard my prayer. I exam 70-483 dumps wanted to ask him give 300-135 tshoot pdf for enough to buy 70-486 study guide my Mama a 1Z0-061 Certification white rose, but I didn’t ask him, but he gave me enough to buy the doll and a rose for my Mama. She loves white ADM-201 certification rose so Learningpdf much. “In 70-486 study guide a few minutes the 70-486 study guide aunt came ADM-201 certification back and I exam 70-483 dumps wheeled my cart 300-135 tshoot pdf away. 70-486 study guide I could not keep from Examprepwell Learningpdf thinking about the little boy as I finished my shoppong exam 70-483 dumps in exam 70-483 dumps a ttally different spirit than when I 1Z0-061 Certification had started. And I 70-486 study guide kept remembering a story I had seen in the newspaper several days earlier about a drunk driver 300-135 tshoot pdf hitting a 300-135 tshoot pdf ADM-201 certification car and killing7 a little girl and the Mother was in serious condition. The family was deciding on whether to ADM-201 certification remove the life support. Now surely this little boy did not belong with that exam 70-483 dumps story.Two days later I read in the paper where the 300-135 tshoot pdf family had disconnected the life support and the young woman ADM-201 certification had died. I could Learningpdf exam 70-483 dumps Examprepwell not forget the little boy and just kept wondering if the two were somehow connected. Later that day, I could not help myself and I went out and bought aome white roses and took them to the funeral home where the Examprepwell yough woman was .And there she was holding a lovely white rose, the beautiful doll, and the picture of the little 1Z0-061 Certification boy in the Learningpdf store. I left there 1Z0-061 Certification in tears, thier life changed forever. The love that little boy had Learningpdf for his little sisiter and his mother was overwhel. And in a split8 second a drunk driver had ripped9 the life of that little boy to pieces.

Dando continuidade ao post sobre integração contínua com FTP (Se não viu segue o link).

Vamos a como resolvi esse meu problema.

Não vou explicar sobre o Git, esse já tem sua documentação fácil.

Começando com o Bitbucket, ative o pipeline, em seu projeto Configurações > Pipelines > Settings (O Bitbucket ainda não fez toda a tradução)

Criei o arquivo bitbucket-pipelines.yml na raiz do projeto, ele é o responsável pela build. Um exemplo simples, apenas rodando o PHPUnit é esse:

Pronto, com isso a cada commit que for feito, o Bitbucket vai disparar a pipeline e com isso gerar o build, com isso vamos ter o seguinte resultado:

Com o processo de build e testes automatizado, podemos pensar no deploy. Para isso usei o DeployBot. Quando criamos o primeiro repositório, o DeployBot faz uma interface passo a passo, mas, como meu plano é o gratuito, só tenho um repositório e ele esta em uso. Vou mostrar as configurações, ai você pode ajustar 🙂

No primeiro passo, criamos o ambiente, no meu caso, apenas produção (no test no fear).

E suas configurações.

Com a configuração de deploy manual, eu preciso mandar fazer o deploy todas as vezes, se esse servidor fosse de QA, facilmente estaria no automático.

Depois de criar o ambiente, é necessário criar os servidores, essa parte é o simples apontamento para onde os arquivos de deploy devem ir.

Configuração de FTP.

No seu cPanel.

Agora que já sabe para onde vai, hora de ajustar as dependências

Outra coisa que podemos fazer aqui, é colocar arquivos com base no ambiente, isso ajuda nas configurações de banco de dados por exemplo.

Essa parte eu não consegui entender bem, mas, em meus testes, sem usar isso a próxima parte da problema…

Aqui ele simplesmente instancia o docker e executa “php -v”, só para saber a versão mesmo, sem segredo.
Essa é a parte da mágica, o DeployBot, só vai executar essa parte caso o composer.json seja alterado, isso é muito bom, pois não vai enviar a pasta vendor sem a necessidade

Agora é só partir para o deploy.

Quando você executa o deploy a primeira vez, ele vai enviar tudo (TUDO) e ficar mais ou menos assim.

Carregando as dependências.Enviando os arquivos.Quando precisar fazer outro deploy, vai enviar apenas a diferença.Aqui, você também pode ver o arquivo de configuração por ambiente foi enviado.

Agora é só curtir 🙂

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Esse site utiliza o Akismet para reduzir spam. Aprenda como seus dados de comentários são processados.