At my previous workplace, the environment for daily builds was set up, but when I was thrown into a place where it wasn't the case, I started with how to build the environment, and I was worried about how to combine tool chains. Also, even if you build or check the operation on your local PC, if you expand it to another site, you will be told "○○ Not Found". That's why the Docker container as an environment construction was attractive and shifted, but I started with the idea that it can also be used as a CI / CD environment. I used to use Jenkins before shifting to the container environment, but I wanted to containerize the Jenkins environment as well, and since I introduced Gitlab to my current workplace, I moved from Jenkins to Gitlab runner.
OK, NG is clear and the result is notified. I've set it up to throw into Slack, but I've skipped it and left it failed for the last few months ... If you don't fix it as soon as you get an error, your back will get heavier.
Build the 3rd generation kernel of TOPPERS (ASP3, FMP3, HRP3, HRMP3). The target environment where everything can be built is Zynq-7000. I will not write about building Gitlab runner, so please check it separately. You can use it even if you install the Docker environment on your local PC without using Gitlab.
Use toppersjp/armgcc-ubuntu for the Docker image of the build environment. I have not confirmed everything, but I think that it is compatible with the development environment of TOPPERS 3rd generation ARM target. QEMU is also included. (Athrill has a separate package because the development speed is fast) The Docker file is on Github, so if you want to customize it, please use it here or Fork.
.gitlab-ci.yml I will write it like this. (Partially changed from the file actually used) The gitlab-ci command is pretty close to a shell script, so I think it's relatively easy to get started.
image: toppersjp/armgcc-ubuntu:7-2018-q2
stages:
- build
daily build_asp3:
stage: build
tags:
- ci-asp
script:
- wget https://www.toppers.jp/download.cgi/asp3_zybo_z7_gcc-20191009.zip
- unzip asp3_zybo_z7_gcc-20191009.zip
- mv asp3_3.5 asp3
- wget https://www.toppers.jp/download.cgi/tecsgen-1.7.0.tgz
- tar xfz tecsgen-1.7.0.tgz
- cp -rf tecsgen-1.7.0/tecsgen/ asp3/.
- cp -rf cfg asp3/.
- mkdir -p /home/asp3/obj; cd /home/asp3/obj
- ../configure.rb -T zybo_z7_gcc
- make
Now you can check the build by running it.
Get the pipeline path badge on README.md!
In the case of gitlab -ci, describe it in the md file like this.
[![build status](https://(gitlabrepository)/badges/master/pipeline.svg)](https://(gitlabrepository)/commits/master)
Recommended Posts