Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
srvpro
Commits
355bc272
Commit
355bc272
authored
Aug 19, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rework ci
parent
b537ff49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
130 deletions
+92
-130
.gitlab-ci.yml
.gitlab-ci.yml
+92
-130
No files found.
.gitlab-ci.yml
View file @
355bc272
stages
:
-
build
-
build2
-
combine
-
deploy
variables
:
GIT_DEPTH
:
"
1"
CONTAINER_TEST_IMAGE_FULL
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-full
CONTAINER_TEST_IMAGE_LITE
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-lite
CONTAINER_TEST_IMAGE_X86_FULL
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86-full
CONTAINER_TEST_IMAGE_X86_LITE
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86-lite
CONTAINER_TEST_IMAGE_ARM_FULL
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-arm-full
CONTAINER_TEST_IMAGE_ARM_LITE
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-arm-lite
CONTAINER_RELEASE_IMAGE
:
$CI_REGISTRY_IMAGE:latest
CONTAINER_RELEASE_IMAGE_FULL
:
$CI_REGISTRY_IMAGE:full
CONTAINER_RELEASE_IMAGE_LITE
:
$CI_REGISTRY_IMAGE:lite
build_lite_x86
:
stage
:
build
tags
:
-
docker
script
:
-
TARGET_IMAGE=$CONTAINER_TEST_IMAGE_X86_LITE
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build --pull --no-cache -f ./Dockerfile.lite -t $TARGET_IMAGE .
-
docker push $TARGET_IMAGE
build_lite_arm
:
stage
:
build
tags
:
-
docker-arm
script
:
-
TARGET_IMAGE=$CONTAINER_TEST_IMAGE_ARM_LITE
.docker-op
:
before_script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build --pull --no-cache -f ./Dockerfile.lite -t $TARGET_IMAGE .
-
docker push $TARGET_IMAGE
build_full_
x86
:
stage
:
build2
.docker-
x86
:
extends
:
.docker-op
tags
:
-
docker
script
:
-
TARGET_IMAGE=$CONTAINER_TEST_IMAGE_X86_FULL
-
SOURCE_IMAGE=$CONTAINER_TEST_IMAGE_X86_LITE
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build --build-arg BASE_IMAGE=$SOURCE_IMAGE --pull --no-cache -t
$TARGET_IMAGE .
-
docker push $TARGET_IMAGE
build_full_arm
:
stage
:
build2
variables
:
ARCH
:
x86
.docker-arm
:
extends
:
.docker-op
tags
:
-
docker-arm
variables
:
ARCH
:
arm
.build_lite
:
stage
:
build
script
:
-
TARGET_IMAGE=$CONTAINER_TEST_IMAGE_ARM_FULL
-
SOURCE_IMAGE=$CONTAINER_TEST_IMAGE_ARM_LITE
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build --build-arg BASE_IMAGE=$SOURCE_IMAGE --pull --no-cache -t
$TARGET_IMAGE .
-
docker push $TARGET_IMAGE
combine_lite
:
-
docker build --pull --no-cache -f ./Dockerfile.lite -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$ARCH-lite .
-
docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$ARCH-lite
build_lite_x86
:
extends
:
-
.docker-x86
-
.build_lite
build_lite_arm
:
extends
:
-
.docker-arm
-
.build_lite
.build_full
:
stage
:
build2
tags
:
-
docker
script
:
-
TARGET_IMAGE=$CONTAINER_TEST_IMAGE_LITE
-
SOURCE_IMAGE_2=$CONTAINER_TEST_IMAGE_ARM_LITE
-
SOURCE_IMAGE_1=$CONTAINER_TEST_IMAGE_X86_LITE
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker pull $SOURCE_IMAGE_1
-
docker pull $SOURCE_IMAGE_2
-
docker manifest create $TARGET_IMAGE --amend $SOURCE_IMAGE_1 --amend
$SOURCE_IMAGE_2
-
docker manifest push $TARGET_IMAGE
combine_full
:
stage
:
combine
tags
:
-
docker
-
docker build --build-arg $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$ARCH-lite--pull --no-cache -t
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$ARCH-full .
-
docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$ARCH-full
build_full_x86
:
extends
:
-
.docker-x86
-
.build_full
build_full_arm
:
extends
:
-
.docker-arm
-
.build_full
.deploy_image
:
stage
:
deploy
extends
:
.docker-x86
script
:
-
TARGET_IMAGE=$CONTAINER_TEST_IMAGE_FULL
-
SOURCE_IMAGE_2=$CONTAINER_TEST_IMAGE_ARM_FULL
-
SOURCE_IMAGE_1=$CONTAINER_TEST_IMAGE_X86_FULL
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker pull $SOURCE_IMAGE_1
-
docker pull $SOURCE_IMAGE_2
-
docker manifest create $TARGET_IMAGE --amend $SOURCE_IMAGE_1 --amend
$SOURCE_IMAGE_2
-
docker manifest push $TARGET_IMAGE
-
docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86-$DEPLOY_TYPE
-
docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-arm-$DEPLOY_TYPE
-
docker manifest create $CI_REGISTRY_IMAGE:$DEPLOY_TAG $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86-$DEPLOY_TYPE $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-arm-$DEPLOY_TYPE
-
docker manifest push $CI_REGISTRY_IMAGE:$DEPLOY_TAG
deploy_lite
:
extends
:
.deploy_image
variables
:
DEPLOY_TYPE
:
lite
DEPLOY_TAG
:
$CI_COMMIT_REF_SLUG-lite
deploy_full
:
extends
:
.deploy_image
variables
:
DEPLOY_TYPE
:
full
DEPLOY_TAG
:
$CI_COMMIT_REF_SLUG-full
deploy_branch
:
extends
:
.deploy_image
variables
:
DEPLOY_TYPE
:
full
DEPLOY_TAG
:
$CI_COMMIT_REF_SLUG
deploy_latest_lite
:
extends
:
.deploy_image
variables
:
DEPLOY_TYPE
:
lite
DEPLOY_TAG
:
lite
only
:
-
master
deploy_latest_full
:
extends
:
.deploy_image
variables
:
DEPLOY_TYPE
:
full
DEPLOY_TAG
:
full
only
:
-
master
deploy_latest
:
extends
:
.deploy_image
variables
:
DEPLOY_TYPE
:
full
DEPLOY_TAG
:
latest
only
:
-
master
upload_stuff_to_minio
:
stage
:
deploy
tags
:
-
linux
image
:
$C
ONTAINER_TEST_IMAGE_FULL
image
:
$C
I_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86-full
script
:
-
apt update ; apt -y install python3-pip
-
pip3 install -U -i https://mirrors.aliyun.com/pypi/simple/ awscli
...
...
@@ -102,62 +123,3 @@ upload_stuff_to_minio:
/dist/ygopro-server.tar.gz s3://mycard/srvpro/ygopro-server.tar.gz
only
:
-
master
deploy_latest_full
:
stage
:
deploy
tags
:
-
docker
script
:
-
TARGET_IMAGE_2=$CONTAINER_RELEASE_IMAGE
-
TARGET_IMAGE=$CONTAINER_RELEASE_IMAGE_FULL
-
SOURCE_IMAGE=$CONTAINER_TEST_IMAGE_FULL
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker pull $SOURCE_IMAGE
-
docker tag $SOURCE_IMAGE $TARGET_IMAGE
-
docker push $TARGET_IMAGE
-
docker tag $SOURCE_IMAGE $TARGET_IMAGE_2
-
docker push $TARGET_IMAGE_2
only
:
-
master
deploy_latest_lite
:
stage
:
deploy
tags
:
-
docker
script
:
-
TARGET_IMAGE=$CONTAINER_RELEASE_IMAGE_LITE
-
SOURCE_IMAGE=$CONTAINER_TEST_IMAGE_LITE
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker pull $SOURCE_IMAGE
-
docker tag $SOURCE_IMAGE $TARGET_IMAGE
-
docker push $TARGET_IMAGE
only
:
-
master
deploy_tag_full
:
stage
:
deploy
tags
:
-
docker
script
:
-
TARGET_IMAGE_2=$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
-
TARGET_IMAGE=$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG-full
-
SOURCE_IMAGE=$CONTAINER_TEST_IMAGE_FULL
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker pull $SOURCE_IMAGE
-
docker tag $SOURCE_IMAGE $TARGET_IMAGE
-
docker push $TARGET_IMAGE
-
docker tag $SOURCE_IMAGE $TARGET_IMAGE_2
-
docker push $TARGET_IMAGE_2
only
:
-
tags
deploy_tag_lite
:
stage
:
deploy
tags
:
-
docker
script
:
-
TARGET_IMAGE=$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG-lite
-
SOURCE_IMAGE=$CONTAINER_TEST_IMAGE_LITE
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker pull $SOURCE_IMAGE
-
docker tag $SOURCE_IMAGE $TARGET_IMAGE
-
docker push $TARGET_IMAGE
only
:
-
tags
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