Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
goSDN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
goSDN
Commits
6256e783
Commit
6256e783
authored
4 years ago
by
Neil-Jocelyn Schark
Browse files
Options
Downloads
Patches
Plain Diff
moved build together
parent
ac8f282f
No related branches found
No related tags found
No related merge requests found
Pipeline
#77496
failed
4 years ago
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/ci/.build-container.yml
+23
-40
23 additions, 40 deletions
build/ci/.build-container.yml
build/ci/.containerlab-ci.yml
+1
-1
1 addition, 1 deletion
build/ci/.containerlab-ci.yml
with
24 additions
and
41 deletions
build/ci/.build-container.yml
+
23
−
40
View file @
6256e783
variables
:
variables
:
DOCKER_TLS_CERTDIR
:
"
/certs"
DOCKER_TLS_CERTDIR
:
"
/certs"
.
build
:
&build
build
-docker
:
before_script
:
before_script
:
-
echo "override global before script"
-
echo "override global before script"
stage
:
build
stage
:
build
...
@@ -9,49 +9,32 @@ variables:
...
@@ -9,49 +9,32 @@ variables:
needs
:
[]
needs
:
[]
tags
:
tags
:
-
shell-builder
-
shell-builder
script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build --build-arg GITLAB_USER=$GO_MODULES_USER --build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN --build-arg BUILDARGS=$BUILDARGS -t $DOCKER_IMAGE_SHA .
-
docker push $DOCKER_IMAGE_SHA
-
docker tag $DOCKER_IMAGE_SHA $TAG
-
docker push $TAG
-
docker build --target installer --build-arg GITLAB_USER=$GO_MODULES_USER --build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN --build-arg BUILDARGS=$BUILDARGS -t registry.code.fbi.h-da.de/cocsn/gosdn:testing_${CI_PIPELINE_ID} .
-
docker push registry.code.fbi.h-da.de/cocsn/gosdn:testing_${CI_PIPELINE_ID}
build:develop
:
variables
:
TAG
:
$CI_REGISTRY_IMAGE:develop
BUILDARGS
:
-race
rules
:
rules
:
-
if
:
$CI_COMMIT_BRANCH == "develop" && $CI_NIGHTLY ==
null
-
if
:
$CI_COMMIT_BRANCH == "develop" && $CI_NIGHTLY ==
null
<<
:
*build
variables
:
TAG
:
$CI_REGISTRY_IMAGE:develop
build:nightly:develop
:
BUILDARGS
:
-race
variables
:
TAG
:
$CI_REGISTRY_IMAGE:nightly-develop
BUILDARGS
:
-race
rules
:
-
if
:
$CI_NIGHTLY == "develop"
-
if
:
$CI_NIGHTLY == "develop"
<<
:
*build
variables
:
TAG
:
$CI_REGISTRY_IMAGE:nightly-develop
build:nightly
:
BUILDARGS
:
-race
variables
:
TAG
:
$CI_REGISTRY_IMAGE:nightly
rules
:
-
if
:
$CI_NIGHTLY == "mainline"
-
if
:
$CI_NIGHTLY == "mainline"
<<
:
*build
variables
:
TAG
:
$CI_REGISTRY_IMAGE:nightly
build:merge-request
:
variables
:
TAG
:
$CI_REGISTRY_IMAGE:merge-request
BUILDARGS
:
-race
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event"
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event"
<<
:
*build
variables
:
TAG
:
$CI_REGISTRY_IMAGE:merge-request
build:latest
:
BUILDARGS
:
-race
variables
:
TAG
:
$CI_REGISTRY_IMAGE:latest
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_NIGHTLY ==
null
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_NIGHTLY ==
null
<<
:
*build
variables
:
\ No newline at end of file
TAG
:
$CI_REGISTRY_IMAGE:latest
script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build --build-arg GITLAB_USER=$GO_MODULES_USER --build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN --build-arg BUILDARGS=$BUILDARGS -t $DOCKER_IMAGE_SHA .
-
docker push $DOCKER_IMAGE_SHA
-
docker tag $DOCKER_IMAGE_SHA $TAG
-
docker push $TAG
-
docker build --target installer --build-arg GITLAB_USER=$GO_MODULES_USER --build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN --build-arg BUILDARGS=$BUILDARGS -t registry.code.fbi.h-da.de/cocsn/gosdn:testing_${CI_PIPELINE_ID} .
-
docker push registry.code.fbi.h-da.de/cocsn/gosdn:testing_${CI_PIPELINE_ID}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
build/ci/.containerlab-ci.yml
+
1
−
1
View file @
6256e783
...
@@ -53,7 +53,7 @@ containerlab:deploy:
...
@@ -53,7 +53,7 @@ containerlab:deploy:
-
.containerlab_template
-
.containerlab_template
-
.containerlab_rules
-
.containerlab_rules
stage
:
apply
stage
:
apply
needs
:
[
"
containerlab:template"
,
"
build
:merge-request"
,
"
build:develop
"
]
needs
:
[
"
containerlab:template"
,
"
build
-docker
"
]
script
:
script
:
-
sudo containerlab deploy --topo ${CI_PROJECT_DIR}/${CLAB_NAME}.clab.yml --reconfigure
-
sudo containerlab deploy --topo ${CI_PROJECT_DIR}/${CLAB_NAME}.clab.yml --reconfigure
-
echo "GOSDN_HTTP_PORT=$(docker inspect -f '{{ (index (index .NetworkSettings.Ports "8080/tcp") 0).HostPort }}' clab-${CLAB_NAME}-gosdn)" >> ${CI_PROJECT_DIR}/build.env
-
echo "GOSDN_HTTP_PORT=$(docker inspect -f '{{ (index (index .NetworkSettings.Ports "8080/tcp") 0).HostPort }}' clab-${CLAB_NAME}-gosdn)" >> ${CI_PROJECT_DIR}/build.env
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment