Commit graph

55 commits

Author SHA1 Message Date
meskio
2a5a09e451
CI: use the parent group as namespace for the dependency proxy
This should solve our problem failing to get images on CI runs.
2025-04-16 15:41:36 +02:00
Cecylia Bocovich
9378c53d8e
Bump version of shadow for CI tests 2025-04-02 11:11:01 -04:00
Cecylia Bocovich
f712dfdd72
Fix shadow and tgen cache in .gitlab-ci.yml
Make sure shadow and tgen runtime dependencies are installed and the
paths are correct
2025-03-27 22:12:35 -04:00
Cecylia Bocovich
db0364ef87
Update DEBIAN_STABLE to bookworm in CI tests 2025-03-20 12:32:40 -04:00
Cecylia Bocovich
116fe9f578
Bump minimum version of go to 1.22
This fixes a pointer bug in our broker sqs code by enabling the loopvar
feature https://go.dev/wiki/LoopvarExperiment

See tpo/anti-censorship/pluggable-transports/snowflake#40363
2025-03-20 12:31:26 -04:00
meskio
fdac01ca90
CI: use Dependency Proxy when available
This sets up CI to allow the use of the GitLab Dependency Proxy which
caches images pulled from DockerHub, in order to bypass rate-limiting.

The DOCKER_REGISTRY_URL variable is set dynamically by the
check_dependency_proxy_access job defined in dependency_proxy.yml such
that only pipelines triggered by users with the requisite access will be
configured to use the proxy, while all others will continue to pull from
DockerHub as before.

When DOCKER_REGISTRY_URL is pre-set in a project's CI/CD variable
settings, the extra job is skipped and the dependency proxy is used
always, unconditionally.

To avoid breaking CI pipelines on 3rd-party GitLab instances, we only
include the dependency proxy template on gitlab.tpo

See: https://gitlab.torproject.org/tpo/tpa/team/-/issues/40335
2025-03-20 17:28:05 +01:00
Cecylia Bocovich
cfde2b79fc
Create CI artifact regardless of when shadow fails
Closes https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40377
2025-03-05 16:14:30 -05:00
Shelikhoo
33d00aea24
update golang testing setting in CI 2025-02-10 12:54:43 +00:00
meskio
313e54befe
CI: use /etc/localtime instead of /etc/timezone
/etc/timezone is a legacy debian specific file. Let's use localtime.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1038849

* Related: #40414
2025-01-22 17:38:49 +01:00
Shelikhoo
e7a7f41c5b
seperate docker hub mirroring to a seperate stage 2024-12-16 13:28:30 +00:00
Shelikhoo
6e7c177157
copy container tag to generate stable with crane to avoid flattening image 2024-12-12 13:33:52 +00:00
Shelikhoo
d069a0a1b9
Add Container Image Mirroring from Tor Gitlab to Docker Hub 2024-11-27 14:43:48 +00:00
anarcat
e8736ecdba use proper image name for debian image
We're deprecating the old image name format, see https://gitlab.torproject.org/tpo/tpa/base-images/-/issues/14
2024-09-23 18:10:39 +00:00
Shelikhoo
bcac2250ec
update mobile CI test's golang version to 1.23 2024-09-12 11:10:13 +01:00
Shelikhoo
18f3ac734c
rename stable container tags to latest 2024-04-25 10:02:37 +01:00
Shelikhoo
d40995035f
remove apt install lbzip2 to avoid broken dependencies 2024-04-24 11:33:41 +01:00
Micah Anderson
095e9727ed CI: Remove echo in container stage.
This was here for debugging and is no longer necessary.

It also resulted in the following command being run:

$ echo "Building Docker image with tag: $TAG" /kaniko/executor --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${CI_REGISTRY_IMAGE}:${TAG}_${ARCH}"

which does not produce the image properly.
2024-03-25 19:23:05 +00:00
Micah Anderson
1a620dd21b CI: make tag-container-release job depend on previous stages 2024-03-25 19:23:05 +00:00
Micah Anderson
eef46b9512 CI: tag containers in a meaningful way (Fixes #40345).
If there was a push to `main`, build a container with the tag `latest. If there
was a tag pushed, then build a container with the container tag set to the git
tag, additionally setting a `stable` tag that matches.

Because the process creates a number of temporary intermediary containers before
they are merged into one with the `merge-manifests` job (`$tag_amd64`,
`$tag_arm64`, `$tag_s390x`, `latest_amd64`, `latest_arm64`, `latest_s390x`)
which are only useful for the `merge-manifests` job, we clean these up in the
`clean_image_tags` job using the gitlab API
2024-03-18 18:39:58 +00:00
Cecylia Bocovich
fe56eaddf4
Fix grep command to check output of shadow tests 2024-03-08 13:24:20 -05:00
Cecylia Bocovich
0c8efb4e2b
Only run shadow tests on compatible runners 2024-03-07 17:51:16 -05:00
Micah Anderson
c4c22fa2a0 Build multi-arch image.
This will build only those architectures that we have runners to build on
2024-03-03 14:07:33 +00:00
Micah Anderson
9b689a105e Build multi-arch image.
This will build only those architectures that we have runners to build on
2024-03-03 14:07:33 +00:00
Micah Anderson
0e593edc9a Build multi-arch image.
This will build only those architectures that we have runners to build on
2024-03-03 14:07:33 +00:00
Micah Anderson
5ee90a78b4 Build multi-arch image.
This will build only those architectures that we have runners to build on
2024-03-03 14:07:33 +00:00
Micah Anderson
9175e86321 Automatically build container on release and push to our registry.
Now that Tor's gitlab has the container registry enabled, we can build a
snowflake container on release, and push the built container to the snowflake
registry.

This is accomplished without using privileged gitlab runners, via kaniko.

This would speed up snowflake updates for people running the docker
container. It would also mean that the 'docker-snowflake-proxy' project would no
longer need to exist.

Fixes docker-snowflake-proxy#10
Fixes docker-snowflake-proxy#13
2024-03-03 14:07:33 +00:00
Cecylia Bocovich
7b47a7d94b
Use known working version of shadow 2024-02-27 13:41:43 -05:00
Cecylia Bocovich
810f1fcc00
Use golang:1.21 container for shadow experiments 2024-02-27 13:41:43 -05:00
Cecylia Bocovich
2c16ef83cb
Patch snowflake server in shadow experiment
Prevent an unsupported syscall in shadow from causing the snowflake
server to fail.
2024-02-27 13:41:43 -05:00
Cecylia Bocovich
f95babc1e1
Export shadow logs as an artifact for debugging 2024-02-27 13:41:43 -05:00
Cecylia Bocovich
b3b03d1a56
Add integration testing with shadow
This change uses the Shadow network simulator[0] to run a minimal snowflake
network and pass data between a client and a server.

[0] https://shadow.github.io/
2024-02-27 13:41:43 -05:00
Anna “CyberTailor”
d411842a9d
chore(ci): use golang:1.21 in generate_tarball job
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-02-12 16:48:12 -05:00
Shelikhoo
60e66beadc
Remove Golang 1.20 from CI Testing 2023-09-25 14:27:23 +01:00
Shelikhoo
1d069ca71d
Update CI targets to test android from golang 1.21 2023-09-20 20:05:28 +01:00
Cecylia Bocovich
2844ac6a13
Update CI targets to include only Go 1.20 and 1.21
To keep up with our dependencies, we no longer support versions of Go
older than v1.20.
2023-09-19 11:42:31 -04:00
meskio
f73fe6ec00
Keep the 'v' from the tag on the released .tar.gz
Gitlab doesn't support '#v' expansion for the links name and url:
https://docs.gitlab.com/ee/ci/variables/where_variables_can_be_used.html
https://docs.gitlab.com/ee/ci/variables/where_variables_can_be_used.html#gitlab-internal-variable-expansion-mechanism

The current releases include a 'snowflake-.tar.gz' that gives a 404,
because the link provided is missing the tag part. Let's keep it
simple and produce a tar.gz with the v in the name like
snowflake-v2.6.0.tar.gz

Closes: #40282
2023-08-14 08:56:56 +02:00
itchyonion
130b63ccdd
use debian buster and bullseye as base images 2023-06-08 00:51:42 -07:00
Shelikhoo
47dd253a37
Update CI test targets 2023-03-22 12:19:06 +00:00
Cecylia Bocovich
115ba6a745
Add gofmt output to CI test before calling test -z
We use a call to test -z together with go fmt because it doesn't output
a non-zero exit status (triggering CI test failure). However, we lose
useful debugging output from the go fmt call because test -z swallows
it. This adds very verbose formatting output to the CI test.
2022-11-17 11:07:48 -05:00
Cecylia Bocovich
8b1970a3ce Update CI tests to include latest and min go versions 2022-10-12 11:30:47 -04:00
Cecylia Bocovich
4e7f897527
Update snowflake CI to test with go 1.18 2022-05-26 12:51:54 -04:00
Cecylia Bocovich
aab806429f
Fix gitlab CI to work with multiple client .go files 2022-04-11 11:50:36 -04:00
Anna “CyberTailor”
e18a4ac147
Generate tarballs in release CI
The `generate_tarball` job vendors all Go modules to make packaging for
distributions easier.
2022-02-27 10:01:50 +05:00
Cecylia Bocovich
9c11e479d0
Update go versions in CI tests
Debian packages Go 1.15 and 1.17, and we use 1.16 in Tor Browser.
2021-12-10 10:43:47 -05:00
Hans-Christoph Steiner
221f1c41c9
gitlab-ci: include job number in the artfacts zipball filename 2021-12-01 11:48:08 +01:00
Hans-Christoph Steiner
51f2c026fd
gitlab-ci: include flags to make reproducible builds
* https://github.com/golang/go/issues/33772
2021-12-01 11:48:06 +01:00
Hans-Christoph Steiner
1318b6a9ec
stripped down Android build process for gitlab-ci and Vagrant 2021-12-01 11:48:03 +01:00
Hans-Christoph Steiner
c9399da566
gitlab-ci: expire artifacts in 1 week, improve gradle caching, etc. 2021-12-01 11:09:57 +01:00
Cecylia Bocovich
c8136f4534 Update version of go used in .gitlab-ci.yml 2021-09-10 16:57:53 -04:00
Cecylia Bocovich
0054cb2dec Update .gitlab-ci.yml after refactor of client 2021-05-12 10:50:06 -04:00