Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
k8s-vcl-reloader
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
uplex-varnish
k8s-vcl-reloader
Commits
797249da
Commit
797249da
authored
Jun 13, 2023
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a gitlab CI script
parent
110497ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
0 deletions
+67
-0
.gitlab-ci.yml
.gitlab-ci.yml
+67
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
797249da
stages
:
-
test
-
build
-
release
variables
:
HUB_CONTAINER_PATH
:
"
uplex/k8s-vcl-reloader"
push_to_docker
:
image
:
docker:20.10.9
stage
:
release
only
:
-
tags
services
:
-
docker:20.10.9-dind
script
:
-
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
-
docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
-
docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $HUB_CONTAINER_PATH:$CI_COMMIT_TAG
-
docker login -u "$DOCKERHUB_USER" -p "$DOCKERHUB_CREDS"
-
docker push $HUB_CONTAINER_PATH:$CI_COMMIT_TAG
test
:
image
:
golang:1.19
stage
:
test
rules
:
-
changes
:
-
cmd/**.go
-
pkg/**.go
-
go.mod
-
go.sum
before_script
:
-
apt-get update -q
-
apt-get install -y golang-golang-x-tools pandoc
-
go get -d github.com/slimhazard/gogitversion
-
pushd $GOPATH/pkg/mod/github.com/slimhazard/gogitversion*
-
chmod a+x ./bootstrap.sh
-
./bootstrap.sh
-
make install
-
popd
-
go get -u golang.org/x/lint/golint
-
go mod download
script
:
-
make check
# basic step for a pipeline to build the reloader image
build:reloader
:
extends
:
.build-image
stage
:
build
script
:
-
cd container
-
make container
.build-image
:
stage
:
build
image
:
docker:20.10.9
services
:
-
docker:20.10.9-dind
before_script
:
-
apk add -U make
-
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
-
docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME ||
true
after_script
:
-
docker tag $CI_REGISTRY_IMAGE $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
-
docker tag $CI_REGISTRY_IMAGE $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
-
docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
-
docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment