ST: First build pipeline
Pipeline for docker image Pipeline for building st (using docker image from previous pipeline) TODO: No publishing of a release yet, didn't find anything yet to push release to
This commit is contained in:
parent
fcaa190f96
commit
4e20b67277
5 changed files with 117 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
# No one needs to know my secrets
|
||||||
|
secrets
|
||||||
62
README.md
62
README.md
|
|
@ -4,9 +4,71 @@ Concourse scripts
|
||||||
This is a collection of concourse CI scripts/pipelines/resources/... I use in my personal CI.
|
This is a collection of concourse CI scripts/pipelines/resources/... I use in my personal CI.
|
||||||
Mostly as reference for me if I ever have to setup something.
|
Mostly as reference for me if I ever have to setup something.
|
||||||
|
|
||||||
|
For now, I didn't setup any credentials manager yet, so all secrets (passwords, usernames, ...) are in separate yaml files (secrets folder).
|
||||||
|
Once I have setup Vault (or something like that), I can get rid of this folder.
|
||||||
|
|
||||||
Login to server
|
Login to server
|
||||||
------------
|
------------
|
||||||
|
|
||||||
~~~ bash
|
~~~ bash
|
||||||
$ fly -t main login -c http://server.lan:8081
|
$ fly -t main login -c http://server.lan:8081
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
Visit http://server.lan:8081 for the Concourse CI dashboard, download the 'fly' cli tool.
|
||||||
|
|
||||||
|
Suckless Terminal (ST)
|
||||||
|
------------
|
||||||
|
|
||||||
|
To setup the st pipelines, we have tree steps:
|
||||||
|
* Building the st-build docker image
|
||||||
|
* Building st application
|
||||||
|
* Publishing the new build if the build step succeeds
|
||||||
|
|
||||||
|
### Building the ST build docker image header ###
|
||||||
|
|
||||||
|
Setup the pipeline with:
|
||||||
|
|
||||||
|
~~~ bash
|
||||||
|
$ fly -t main set-pipeline -p st-docker -c ./pipelines/st/st-image.yml -l ./secrets/docker-hub.yml
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Unpause it (through CLI, can also do this via web browser):
|
||||||
|
~~~ bash
|
||||||
|
$ fly -t main unpause-pipeline -p st-docker
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Start the build (through CLI, again possible to do this via web browser):
|
||||||
|
~~~ bash
|
||||||
|
$ fly -t main trigger-job -j st-docker/publish
|
||||||
|
~~~
|
||||||
|
|
||||||
|
### Building the ST application ###
|
||||||
|
|
||||||
|
Setup the pipeline with:
|
||||||
|
|
||||||
|
~~~ bash
|
||||||
|
$ fly -t main set-pipeline -p st-build -c ./pipelines/st/st-pipeline.yml -l ./secrets/docker-hub.yml
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Unpause it (through CLI, can also do this via web browser):
|
||||||
|
~~~ bash
|
||||||
|
$ fly -t main unpause-pipeline -p st-build
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Start the build (through CLI, again possible to do this via web browser):
|
||||||
|
~~~ bash
|
||||||
|
$ fly -t main trigger-job -j st-build/st-job
|
||||||
|
~~~
|
||||||
|
|
||||||
|
### Publishing new build/release ###
|
||||||
|
|
||||||
|
This is still a TODO. I haven't found a decent way yet to publish releases/builds to a release page (don't have that either yet...).
|
||||||
|
|
||||||
|
|
||||||
|
TODO
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Release page
|
||||||
|
* Push releases to a release page
|
||||||
|
* Dependency between pipelines
|
||||||
|
f.e. st-docker should trigger a new build of st-build
|
||||||
|
|
|
||||||
25
pipelines/st/st-image.yml
Normal file
25
pipelines/st/st-image.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
resources:
|
||||||
|
- name: st-git
|
||||||
|
type: git
|
||||||
|
source:
|
||||||
|
uri: https://github.com/laurensmiers/st.git
|
||||||
|
branch: master
|
||||||
|
|
||||||
|
- name: st-builder-image
|
||||||
|
type: docker-image
|
||||||
|
source:
|
||||||
|
email: ((docker-hub-email))
|
||||||
|
username: ((docker-hub-username))
|
||||||
|
password: ((docker-hub-password))
|
||||||
|
repository: ((docker-hub-username))/st-builder
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- name: publish
|
||||||
|
public: true
|
||||||
|
serial: true
|
||||||
|
plan:
|
||||||
|
- get: st-git
|
||||||
|
trigger: true
|
||||||
|
- put: st-builder-image
|
||||||
|
params:
|
||||||
|
build: st-git
|
||||||
28
pipelines/st/st-pipeline.yml
Normal file
28
pipelines/st/st-pipeline.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
resources:
|
||||||
|
- name: st-git
|
||||||
|
type: git
|
||||||
|
icon: github-circle
|
||||||
|
source:
|
||||||
|
uri: https://github.com/laurensmiers/st
|
||||||
|
branch: master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- name: st-job
|
||||||
|
public: true
|
||||||
|
plan:
|
||||||
|
- get: st-git
|
||||||
|
trigger: true
|
||||||
|
- task: st-make
|
||||||
|
config:
|
||||||
|
platform: linux
|
||||||
|
image_resource:
|
||||||
|
type: docker-image
|
||||||
|
source:
|
||||||
|
repository: ((docker-hub-username))/st-builder
|
||||||
|
inputs:
|
||||||
|
- name: st-git
|
||||||
|
run:
|
||||||
|
path: make
|
||||||
|
args:
|
||||||
|
- -C
|
||||||
|
- ./st-git
|
||||||
0
secrets/.gitkeep
Normal file
0
secrets/.gitkeep
Normal file
Loading…
Add table
Add a link
Reference in a new issue