Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vereign Client Library
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Code
Vereign Client Library
Commits
e7d5b97f
Commit
e7d5b97f
authored
5 years ago
by
Alexey Kuklin
Browse files
Options
Downloads
Patches
Plain Diff
docker-shipping
parent
79bd5530
No related branches found
No related tags found
2 merge requests
!67
docker-shipping
,
!66
docker-shipping
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+58
-16
58 additions, 16 deletions
.gitlab-ci.yml
Dockerfile
+15
-0
15 additions, 0 deletions
Dockerfile
with
73 additions
and
16 deletions
.gitlab-ci.yml
+
58
−
16
View file @
e7d5b97f
image
:
docker
image
:
docker:latest
services
:
-
docker:dind
stages
:
-
build
build
:
image
:
registry.vereign.com/docker/vcl-build-base:master
-
manifest
-
deploy
variables
:
DOCKER_CONFIG
:
~/.docker/$CI_JOB_ID
before_script
:
-
"
[
-d
$DOCKER_CONFIG
]
||
mkdir
-p
$DOCKER_CONFIG"
-
"
echo
'{
\"
experimental
\"
:
\"
enabled
\"
}'
>
$DOCKER_CONFIG/config.json"
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
after_script
:
-
"
rm
-vRf
$DOCKER_CONFIG"
ppc64le
:
variables
:
IMAGE
:
$CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_JOB_NAME:$CI_COMMIT_REF_NAME
stage
:
build
tags
:
-
ppc64le
script
:
-
docker build --build-arg GITLAB_LOGIN=gitlab-ci-token --build-arg GITLAB_PASSWORD=$CI_JOB_TOKEN --pull -t $IMAGE -f Dockerfile .
-
docker push $IMAGE
amd64
:
variables
:
IMAGE
:
$CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_JOB_NAME:$CI_COMMIT_REF_NAME
stage
:
build
artifacts
:
paths
:
-
build.tgz
expire_in
:
8 week
tags
:
-
dell
-
amd64
script
:
-
docker build --build-arg GITLAB_LOGIN=gitlab-ci-token --build-arg GITLAB_PASSWORD=$CI_JOB_TOKEN --pull -t $IMAGE -f Dockerfile .
-
docker push $IMAGE
manifest
:
variables
:
IMAGE
:
$CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:$CI_COMMIT_REF_NAME
IMAGE_amd64
:
$CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/amd64:$CI_COMMIT_REF_NAME
IMAGE_ppc64le
:
$CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/ppc64le:$CI_COMMIT_REF_NAME
stage
:
manifest
tags
:
-
amd64
script
:
-
docker manifest create $IMAGE $IMAGE_amd64 $IMAGE_ppc64le
-
docker manifest push $IMAGE
deploy
:
stage
:
deploy
tags
:
-
hv2
only
:
-
master
script
:
-
mkdir -p $GOPATH/src/code.vereign.com/code
-
ln -s `pwd` $GOPATH/src/code.vereign.com/code/
-
cd $GOPATH/src/code.vereign.com/code/vcl
-
git config --global credential.https://code.vereign.com.username gitlab-ci-token
-
git config --global credential.helper "store --file /tmp/store"
-
echo https://gitlab-ci-token:$CI_JOB_TOKEN@code.vereign.com > /tmp/store
-
make
-
tar -czf build.tgz -C /builds/code/vcl/javascript/dist/. .
-
apk add curl
-
for ref in $DEPLOYENVS; do curl -X POST -F token=$TRIGGER_TOKEN -F ref=$ref -F variables[branch]=master https://code.vereign.com/api/v4/projects/59/trigger/pipeline; done
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
15
−
0
View file @
e7d5b97f
FROM
registry.vereign.com/docker/vcl-build-base:buster
as
builder
ARG
GITLAB_LOGIN
ARG
GITLAB_PASSWORD
COPY
. /go/src/code.vereign.com/code/vcl
RUN
git config
--global
url.
"https://
$GITLAB_LOGIN
:
$GITLAB_PASSWORD
@code.vereign.com"
.insteadOf
"https://code.vereign.com"
&&
\
cd
/go/src/code.vereign.com/code/vcl
&&
\
make
FROM
registry.vereign.com/docker/go-runtime:master
COPY
--from=builder /go/src/code.vereign.com/code/vcl/javascript/dist /srv/dist
ENTRYPOINT
["/bin/cp","-a","/srv/dist/.","/srv/target"]
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