Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
parity
Mirrored projects
polkadot-sdk
Commits
33873d7a
Commit
33873d7a
authored
6 years ago
by
gabriel klawitter
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ci: upload builds according to the tag if present (#198)
parent
c12ed7d8
Branches
gh-readonly-queue/master/pr-7585-f7e98b40cab7475898c99ea48809635ac069af3a
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
polkadot/.gitlab-ci.yml
+12
-8
12 additions, 8 deletions
polkadot/.gitlab-ci.yml
with
12 additions
and
8 deletions
polkadot/.gitlab-ci.yml
+
12
−
8
View file @
33873d7a
...
...
@@ -169,12 +169,13 @@ publish-docker-release:
-
docker info
script
:
-
VERSION="$(cat ./artifacts/VERSION)"
-
EXTRATAG="${CI_COMMIT_TAG:-latest}"
-
echo "Polkadot version = ${VERSION}"
-
test -z "${VERSION}" && exit
1
-
cd ./artifacts
-
docker build --tag $CONTAINER_IMAGE:$VERSION --tag $CONTAINER_IMAGE:
latest
.
-
docker build --tag $CONTAINER_IMAGE:$VERSION --tag $CONTAINER_IMAGE:
$EXTRATAG
.
-
docker push $CONTAINER_IMAGE:$VERSION
-
docker push $CONTAINER_IMAGE:
latest
-
docker push $CONTAINER_IMAGE:
$EXTRATAG
after_script
:
-
docker logout
# only VERSION information is needed for the deployment
...
...
@@ -191,16 +192,19 @@ publish-s3-release:
BUCKET
:
"
releases.parity.io"
PREFIX
:
"
polkadot/${ARCH}-${DOCKER_OS}"
script
:
-
aws s3 sync ./artifacts/ s3://${BUCKET}/${PREFIX}/$(cat ./artifacts/VERSION)/
-
VERSION="${CI_COMMIT_TAG:-$(cat ./artifacts/VERSION)}"
# LATEST_BRANCH will be empty if it's not a tag build i.e. CI_COMMIT_TAG is unset
-
LATEST_BRANCH="$(echo $CI_COMMIT_TAG | sed -n -r 's/^(v[0-9]+\.[0-9]+)\.[0-9]+$/\1/p')"
-
aws s3 sync ./artifacts/ s3://${BUCKET}/${PREFIX}/${VERSION}/
-
echo "update objects in latest path"
-
for file in ./artifacts/*; do
name="$(basename ${file})";
aws s3api copy-object
--copy-source ${BUCKET}/${PREFIX}/$
(cat ./artifacts/
VERSION
)
/${name}
--bucket ${BUCKET} --key ${PREFIX}/latest/${name};
--copy-source ${BUCKET}/${PREFIX}/$
{
VERSION
}
/${name}
--bucket ${BUCKET} --key ${PREFIX}/latest
${LATEST_BRANCH}
/${name};
done
after_script
:
-
aws s3 ls s3://${BUCKET}/${PREFIX}/latest/
-
aws s3 ls s3://${BUCKET}/${PREFIX}/latest
${LATEST_BRANCH}
/
--recursive --human-readable --summarize
...
...
@@ -219,8 +223,8 @@ publish-s3-release:
-
kubernetes-parity-build
before_script
:
-
test -z "${DEPLOY_TAG}" &&
test -f ./artifacts/VERSION &&
DEPLOY_TAG="$(cat ./artifacts/VERSION)"
test
"${CI_COMMIT_TAG}" -o
-f ./artifacts/VERSION &&
DEPLOY_TAG="$
{CI_COMMIT_TAG:-$
(cat ./artifacts/VERSION)
}
"
-
test "${DEPLOY_TAG}" || ( echo "Neither DEPLOY_TAG nor VERSION information available"; exit 1 )
script
:
-
echo "Polkadot version = ${DEPLOY_TAG}"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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