├── .gitignore
├── internal
├── gcsfs
│ └── testdata
│ │ └── dirfs
│ │ ├── a
│ │ ├── b
│ │ └── dir
│ │ └── x
├── diff
│ └── testdata
│ │ ├── same.txt
│ │ ├── eof.txt
│ │ ├── allnew.txt
│ │ ├── allold.txt
│ │ ├── eof1.txt
│ │ ├── eof2.txt
│ │ ├── start.txt
│ │ ├── dups.txt
│ │ ├── end.txt
│ │ ├── basic.txt
│ │ ├── triv.txt
│ │ └── long.txt
├── task
│ ├── testdata
│ │ ├── terminal.png
│ │ ├── pre-announce-minor-solo.txt
│ │ ├── pre-announce-minor.txt
│ │ ├── pre-announce-minor-solo.html
│ │ ├── pre-announce-minor.html
│ │ ├── announce-minor.txt
│ │ ├── announce-major.txt
│ │ ├── announce-minor.html
│ │ ├── announce-minor-solo.txt
│ │ ├── announce-major.html
│ │ ├── announce-beta.txt
│ │ ├── announce-rc.txt
│ │ ├── announce-minor-solo.html
│ │ ├── announce-beta.html
│ │ └── announce-rc.html
│ ├── _data
│ │ └── darwinpkg
│ │ │ ├── blue-bg.png
│ │ │ └── brown-bg.png
│ ├── README.md
│ ├── releaselet
│ │ ├── README.md
│ │ └── releaselet_test.go
│ ├── gerrit_test.go
│ └── template
│ │ ├── pre-announce-minor.md
│ │ ├── announce-major.md
│ │ ├── announce-beta.md
│ │ └── announce-rc.md
├── relui
│ ├── testing
│ │ └── test.css
│ ├── static
│ │ └── images
│ │ │ ├── chevron_right_black_24dp.svg
│ │ │ ├── expand_more_black_24dp.svg
│ │ │ ├── error_red_24dp.svg
│ │ │ ├── check_circle_green_24dp.svg
│ │ │ ├── pending_grey_24dp.svg
│ │ │ └── pending_yellow_24dp.svg
│ ├── migrations
│ │ ├── 20210928195553_create_task_logs_table.down.sql
│ │ ├── 20220609175710_remove_corrupt_workflow.down.sql
│ │ ├── 20220715183205_add_retry_count.down.sql
│ │ ├── 20220712205734_add_started_to_tasks.down.sql
│ │ ├── 20210909141405_create_workflows_table.down.sql
│ │ ├── 20220715183205_add_retry_count.up.sql
│ │ ├── 20220712205734_add_started_to_tasks.up.sql
│ │ ├── 20220901160804_create_schedules.down.sql
│ │ ├── 20211005180646_update_workflows_add_finished.down.sql
│ │ ├── 20220622151222_add_ready_for_approval_to_tasks.down.sql
│ │ ├── 20220622151222_add_ready_for_approval_to_tasks.up.sql
│ │ ├── 20220609175710_remove_corrupt_workflow.up.sql
│ │ ├── 20210928195553_create_task_logs_table.up.sql
│ │ ├── 20220621201140_add_approved_at_to_tasks.up.sql
│ │ ├── 20211005180646_update_workflows_add_finished.up.sql
│ │ ├── 20210909141405_create_workflows_table.up.sql
│ │ ├── 20220621201140_add_approved_at_to_tasks.down.sql
│ │ └── 20220901160804_create_schedules.up.sql
│ ├── sign
│ │ └── doc.go
│ ├── templates
│ │ └── scheduled_workflow_failure_email.txt
│ ├── content.go
│ ├── db
│ │ ├── pgdbtx.go
│ │ └── db.go
│ ├── protos
│ │ └── proto.go
│ └── metrics_test.go
├── logparser
│ └── testdata
│ │ ├── 9.fail
│ │ └── 12.fail
├── lru
│ └── README.md
├── access
│ ├── doc.go
│ └── README.md
├── coordinator
│ ├── remote
│ │ ├── doc.go
│ │ └── README.md
│ └── schedule
│ │ └── span_test.go
├── untar
│ └── README.md
├── httpdl
│ └── README.md
├── https
│ └── README.md
├── spanlog
│ ├── README.md
│ └── spanlog.go
├── envutil
│ └── README.md
├── iapclient
│ └── README.md
├── buildgo
│ └── README.md
├── foreach
│ └── README.md
├── sourcecache
│ └── README.md
├── secret
│ └── README.md
├── gomote
│ ├── README.md
│ ├── doc.go
│ └── protos
│ │ └── protos.go
├── singleflight
│ └── README.md
├── metrics
│ └── README.md
├── buildstats
│ └── README.md
├── gitauth
│ └── README.md
├── datastore
│ └── fake
│ │ └── README.md
├── gophers
│ └── README.md
├── loghash
│ ├── README.md
│ └── loghash.go
├── workflow
│ └── README.md
├── influx
│ └── influx.go
└── internal_test.go
├── cmd
├── gitmirror
│ ├── .gitignore
│ ├── service.yaml
│ └── README.md
├── coordinator
│ ├── .gitignore
│ ├── internal
│ │ ├── legacydash
│ │ │ ├── static
│ │ │ │ ├── status_good.gif
│ │ │ │ └── status_alert.gif
│ │ │ └── README.md
│ │ └── dashboard
│ │ │ └── README.md
│ ├── protos
│ │ ├── protos.go
│ │ └── coordinator.proto
│ ├── service-staging.yaml
│ ├── templates
│ │ └── base.html
│ ├── builders_test.go
│ ├── version.sh
│ ├── cloudbuild.yaml
│ ├── README.md
│ ├── deployment-staging.yaml
│ ├── module-proxy-service.yaml
│ └── queues_test.go
├── docker2boot
│ ├── .gitignore
│ └── README.md
├── pubsubhelper
│ ├── .gitignore
│ ├── pubsubtypes
│ │ └── README.md
│ └── README.md
├── buildlet
│ ├── .gitignore
│ ├── stage0
│ │ ├── README.md
│ │ ├── Dockerfile
│ │ └── stage0_windows.go
│ ├── testssh
│ │ └── README.md
│ └── README
├── relui
│ ├── .prettierrc.yaml
│ ├── Dockerfile.node
│ ├── .stylelintrc.yaml
│ ├── Dockerfile.test
│ ├── .eslintrc.yaml
│ ├── Dockerfile
│ ├── cloudbuild.yaml
│ ├── sqlc.yaml
│ └── package.json
├── greplogs
│ ├── README.md
│ ├── internal
│ │ └── logparse
│ │ │ ├── doc.go
│ │ │ └── README.md
│ ├── _embed
│ │ ├── README.md
│ │ └── broken.go
│ └── xdg.go
├── upload
│ └── README.md
├── gomote
│ ├── README.md
│ └── rdp.go
├── buildstats
│ └── README.md
├── racebuild
│ └── README.md
├── genbootstrap
│ └── README.md
├── debugnewvm
│ └── README.md
├── relnote
│ └── README.md
├── releaseschedule
│ └── README.md
├── genbuilderkey
│ └── README.md
├── retrybuilds
│ └── README.md
├── fetchlogs
│ ├── README.md
│ └── xdg.go
├── xb
│ └── README.md
├── rundockerbuildlet
│ └── README.md
├── updatestd
│ └── README.md
├── perfrun
│ └── README.md
├── runqemubuildlet
│ └── README.md
├── gerritbot
│ └── README.md
└── gopherbot
│ └── README.md
├── .gcloudignore
├── codereview.cfg
├── env
├── linux-x86-sid
│ ├── Makefile
│ └── cloudbuild.yaml
├── plan9
│ ├── .gitignore
│ └── plan9-gce.iso.sha1
├── linux-x86-alpine
│ ├── Makefile
│ └── Dockerfile
├── linux-x86-bullseye
│ └── Makefile
├── linux-x86-buster
│ └── Makefile
├── linux-x86-clang
│ ├── Makefile
│ └── sources
│ │ └── clang-deps.list
├── linux-x86-debug
│ ├── Makefile
│ └── Dockerfile
├── linux-x86-fedora
│ ├── Makefile
│ └── Dockerfile
├── linux-x86-stretch
│ └── Makefile
├── openbsd-386
│ ├── README
│ ├── .gitignore
│ └── make.bash
├── linux-arm64-bullseye
│ └── Makefile
├── windows
│ ├── .gitignore
│ ├── rdp.bash
│ ├── ssh.bash
│ └── make.bash
├── freebsd-amd64
│ ├── sysctl.conf
│ ├── .gitignore
│ ├── rc.conf
│ ├── loader.conf
│ ├── Makefile
│ ├── buildlet
│ └── README
├── linux-ppc64le
│ └── osuosl
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── install-docker.bash
│ │ ├── p10.patch
│ │ ├── rundockerbuildlet.service
│ │ ├── install-buildlet.bash
│ │ └── setup-remote.sh
├── crosscompile
│ ├── linux-armel-cross
│ │ ├── Makefile
│ │ └── README
│ ├── linux-armhf-cross
│ │ ├── Makefile
│ │ └── README
│ └── linux-s390x-cross
│ │ ├── Makefile
│ │ └── README
├── netbsd-386
│ ├── anita-2.10.tar.gz.sha1
│ ├── .gitignore
│ └── Makefile
├── dragonfly-amd64
│ ├── .gitignore
│ ├── phase2.sh
│ └── README
├── netbsd-amd64
│ ├── .gitignore
│ ├── anita-2.10.tar.gz.sha1
│ └── Makefile
├── linux-ppc64
│ └── osuosl
│ │ ├── sid-image
│ │ ├── Dockerfile.sid
│ │ └── build-sid.sh
│ │ ├── rundockerbuildlet.service
│ │ └── buildlet-image
│ │ └── Dockerfile
├── corellium
│ ├── ios
│ │ └── files
│ │ │ ├── profile
│ │ │ ├── builder.sh
│ │ │ ├── org.golang.builder.plist
│ │ │ └── arwrap.go
│ ├── android
│ │ └── files
│ │ │ ├── run-builder-at-boot
│ │ │ ├── profile
│ │ │ ├── exec.sh
│ │ │ ├── builder.sh
│ │ │ └── clangwrap.go
│ └── README.md
├── linux-arm-qemu
│ ├── buildlet.service
│ ├── qemu.service
│ ├── Makefile
│ ├── buildlet-qemu
│ └── stage2
├── openbsd-amd64
│ ├── .gitignore
│ └── README
├── android-amd64-emu
│ ├── README.md
│ └── Makefile
├── linux-arm
│ └── aws
│ │ ├── containerd.service
│ │ ├── rundockerbuildlet.service
│ │ ├── Makefile
│ │ ├── Dockerfile
│ │ └── README.md
├── linux-x86-vmx
│ └── README.md
├── windows-arm64
│ └── azure
│ │ └── windows-arm64-stage0-loop.bat
├── darwin
│ └── aws
│ │ ├── bootptab
│ │ ├── start-mutable.sh
│ │ ├── start-snapshot.sh
│ │ └── start-installer.sh
├── wasip1-wasm-wazero
│ ├── Dockerfile
│ └── Makefile
├── js-wasm
│ └── Dockerfile
├── js-wasm-node18
│ ├── Dockerfile
│ └── Makefile
├── wasip1-wasm-wasmtime
│ ├── Dockerfile
│ └── Makefile
└── shared-makefile
│ └── Makefile
├── maintner
├── maintnerd
│ ├── .gitignore
│ ├── apipb
│ │ ├── README
│ │ └── apipb.go
│ ├── maintapi
│ │ ├── README.md
│ │ └── version
│ │ │ └── README.md
│ ├── gcslog
│ │ ├── README.md
│ │ └── gcslog_test.go
│ └── README.md
├── maintq
│ └── README.md
├── README.md
├── maintpb
│ ├── README.md
│ └── maintpb.go
├── maintwatch
│ ├── README.md
│ └── maintwatch.go
├── reclog
│ └── README.md
├── cmd
│ └── maintserve
│ │ └── README.md
├── internal
│ └── robustio
│ │ ├── README.md
│ │ ├── robustio_darwin.go
│ │ ├── robustio_other.go
│ │ └── robustio_windows.go
└── godata
│ ├── README.md
│ └── example_test.go
├── .dockerignore
├── devapp
├── static
│ ├── favicon.ico
│ └── index.html
├── README.md
├── gzip.go
├── service-staging.yaml
├── gophercon_test.go
├── release_test.go
└── deployment-staging.yaml
├── cloudfns
├── wikiwebhook
│ ├── go.mod
│ └── README.md
└── sendwikidiff
│ ├── go.mod
│ ├── go.sum
│ └── README.md
├── perfdata
├── appengine
│ ├── README.md
│ ├── app.yaml
│ ├── static
│ │ └── upload.html
│ └── .gcloudignore
├── db
│ ├── export_test.go
│ ├── dbtest
│ │ └── nocloud.go
│ ├── sqlite3
│ │ └── sqlite3.go
│ └── schema.sql
├── app
│ ├── appengine.go
│ └── local.go
├── query
│ ├── query_test.go
│ └── query.go
└── fs
│ └── gcs
│ └── gcs.go
├── vcs-test
├── dav_svn.conf
├── vcweb
│ ├── deathclock_go121_test.go
│ ├── bzr.go
│ ├── svn.go
│ ├── deathclock_test.go
│ ├── git.go
│ └── insecure.go
├── Dockerfile.apache
└── Makefile
├── gerrit
├── README.md
└── example_test.go
├── repos
├── README.md
└── repos_test.go
├── pargzip
└── README.md
├── tarutil
└── README.md
├── types
└── README.md
├── kubernetes
├── README.md
├── api
│ └── README.md
└── gke
│ └── README.md
├── autocertcache
└── README.md
├── livelog
└── README.md
├── third_party
└── bandchart
│ ├── fs.go
│ └── LICENSE
├── revdial
└── v2
│ └── README.md
├── app
└── appengine
│ └── index.yaml
├── influx
└── Dockerfile
├── perf
├── Dockerfile
└── app
│ ├── index.go
│ └── parse_test.go
├── dashboard
└── README.md
├── doc
└── deployment.md
└── CONTRIBUTING.md
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 |
--------------------------------------------------------------------------------
/internal/gcsfs/testdata/dirfs/a:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/internal/gcsfs/testdata/dirfs/b:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/cmd/gitmirror/.gitignore:
--------------------------------------------------------------------------------
1 | gitmirror
2 |
--------------------------------------------------------------------------------
/internal/gcsfs/testdata/dirfs/dir/x:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gcloudignore:
--------------------------------------------------------------------------------
1 | *.iso
2 | *.raw
3 | \.#*
4 |
--------------------------------------------------------------------------------
/cmd/coordinator/.gitignore:
--------------------------------------------------------------------------------
1 | coordinator
2 |
--------------------------------------------------------------------------------
/codereview.cfg:
--------------------------------------------------------------------------------
1 | issuerepo: golang/go
2 |
--------------------------------------------------------------------------------
/env/linux-x86-sid/Makefile:
--------------------------------------------------------------------------------
1 | ../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/plan9/.gitignore:
--------------------------------------------------------------------------------
1 | disk.raw
2 | plan9-gce.iso
3 |
--------------------------------------------------------------------------------
/cmd/docker2boot/.gitignore:
--------------------------------------------------------------------------------
1 | disk.raw
2 | docker2boot
3 |
--------------------------------------------------------------------------------
/env/linux-x86-alpine/Makefile:
--------------------------------------------------------------------------------
1 | ../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/linux-x86-bullseye/Makefile:
--------------------------------------------------------------------------------
1 | ../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/linux-x86-buster/Makefile:
--------------------------------------------------------------------------------
1 | ../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/linux-x86-clang/Makefile:
--------------------------------------------------------------------------------
1 | ../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/linux-x86-debug/Makefile:
--------------------------------------------------------------------------------
1 | ../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/linux-x86-fedora/Makefile:
--------------------------------------------------------------------------------
1 | ../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/linux-x86-stretch/Makefile:
--------------------------------------------------------------------------------
1 | ../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/openbsd-386/README:
--------------------------------------------------------------------------------
1 | See ../openbsd-amd64/README.
2 |
--------------------------------------------------------------------------------
/env/linux-arm64-bullseye/Makefile:
--------------------------------------------------------------------------------
1 | ../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/windows/.gitignore:
--------------------------------------------------------------------------------
1 | instance.txt
2 | .envrc
3 | out/*
4 |
--------------------------------------------------------------------------------
/cmd/pubsubhelper/.gitignore:
--------------------------------------------------------------------------------
1 | pubsubhelper
2 | ca-certificates.crt
3 |
--------------------------------------------------------------------------------
/env/freebsd-amd64/sysctl.conf:
--------------------------------------------------------------------------------
1 | kern.timecounter.hardware=TSC-low
2 |
--------------------------------------------------------------------------------
/env/linux-ppc64le/osuosl/.gitignore:
--------------------------------------------------------------------------------
1 | rundockerbuildlet.ppc64le
2 |
--------------------------------------------------------------------------------
/maintner/maintnerd/.gitignore:
--------------------------------------------------------------------------------
1 | maintnerd
2 | ca-certificates.crt
3 |
--------------------------------------------------------------------------------
/env/crosscompile/linux-armel-cross/Makefile:
--------------------------------------------------------------------------------
1 | ../../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/crosscompile/linux-armhf-cross/Makefile:
--------------------------------------------------------------------------------
1 | ../../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/crosscompile/linux-s390x-cross/Makefile:
--------------------------------------------------------------------------------
1 | ../../shared-makefile/Makefile
--------------------------------------------------------------------------------
/env/freebsd-amd64/.gitignore:
--------------------------------------------------------------------------------
1 | iso
2 | config.iso
3 | *.raw
4 | *.qcow2
5 |
--------------------------------------------------------------------------------
/env/netbsd-386/anita-2.10.tar.gz.sha1:
--------------------------------------------------------------------------------
1 | ../netbsd-amd64/anita-2.10.tar.gz.sha1
--------------------------------------------------------------------------------
/maintner/maintnerd/apipb/README:
--------------------------------------------------------------------------------
1 | Run "go generate" to rebuild after edits.
2 |
--------------------------------------------------------------------------------
/env/dragonfly-amd64/.gitignore:
--------------------------------------------------------------------------------
1 | *.iso
2 | *.iso.bz2
3 | disk-*
4 | disk.*
5 | isotmp
6 |
--------------------------------------------------------------------------------
/env/netbsd-386/.gitignore:
--------------------------------------------------------------------------------
1 | anita-*/
2 | anita-*.tar.gz
3 | netbsd-*.tar.gz
4 | work-*
5 |
--------------------------------------------------------------------------------
/env/plan9/plan9-gce.iso.sha1:
--------------------------------------------------------------------------------
1 | b6f362a7483806036cdea26400b64519a6e8f60a plan9-gce.iso
2 |
--------------------------------------------------------------------------------
/env/netbsd-amd64/.gitignore:
--------------------------------------------------------------------------------
1 | anita-*/
2 | anita-*.tar.gz
3 | netbsd-*.tar.gz
4 | work-*
5 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | .git
2 | **/*.tar.gz
3 | **/*.tgz
4 | **/*.iso
5 | **/*.raw
6 | env/*/work-*
7 |
--------------------------------------------------------------------------------
/devapp/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sayjun0505/build/HEAD/devapp/static/favicon.ico
--------------------------------------------------------------------------------
/env/netbsd-amd64/anita-2.10.tar.gz.sha1:
--------------------------------------------------------------------------------
1 | 042deb4c820091bc5a55560ec65ec50c997b2bd3 anita-2.10.tar.gz
2 |
--------------------------------------------------------------------------------
/internal/diff/testdata/same.txt:
--------------------------------------------------------------------------------
1 | -- old --
2 | hello world
3 | -- new --
4 | hello world
5 | -- diff --
6 |
--------------------------------------------------------------------------------
/env/linux-ppc64/osuosl/sid-image/Dockerfile.sid:
--------------------------------------------------------------------------------
1 | FROM scratch
2 | COPY ./debian_sid/ /
3 | CMD ["/bin/bash"]
4 |
--------------------------------------------------------------------------------
/internal/diff/testdata/eof.txt:
--------------------------------------------------------------------------------
1 | -- old --
2 | a
3 | b
4 | c^D
5 | -- new --
6 | a
7 | b
8 | c^D
9 | -- diff --
10 |
--------------------------------------------------------------------------------
/internal/task/testdata/terminal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sayjun0505/build/HEAD/internal/task/testdata/terminal.png
--------------------------------------------------------------------------------
/cmd/buildlet/.gitignore:
--------------------------------------------------------------------------------
1 | dev-buildlet.*
2 | buildlet
3 | buildlet.*-*
4 | stage0/buildlet-stage0.*
5 | cert.pem
6 | key.pem
7 |
--------------------------------------------------------------------------------
/cmd/relui/.prettierrc.yaml:
--------------------------------------------------------------------------------
1 | arrowParens: avoid
2 | singleQuote: true
3 | bracketSpacing: false
4 | quoteProps: consistent
5 |
--------------------------------------------------------------------------------
/env/corellium/ios/files/profile:
--------------------------------------------------------------------------------
1 | export PATH=$HOME/bin:$HOME/go/bin:$PATH
2 | export GOROOT_BOOTSTRAP=$HOME/go-ios-arm64-bootstrap
3 |
--------------------------------------------------------------------------------
/internal/task/_data/darwinpkg/blue-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sayjun0505/build/HEAD/internal/task/_data/darwinpkg/blue-bg.png
--------------------------------------------------------------------------------
/internal/task/_data/darwinpkg/brown-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sayjun0505/build/HEAD/internal/task/_data/darwinpkg/brown-bg.png
--------------------------------------------------------------------------------
/cloudfns/wikiwebhook/go.mod:
--------------------------------------------------------------------------------
1 | module golang.org/x/build/cloudfns/wikiwebhook
2 |
3 | go 1.13
4 |
5 | require cloud.google.com/go/pubsub v1.26.0
6 |
--------------------------------------------------------------------------------
/env/corellium/android/files/run-builder-at-boot:
--------------------------------------------------------------------------------
1 | termux-wake-lock
2 | sshd
3 | tmux new-session -d /data/data/com.termux/files/home/builder.sh
4 |
--------------------------------------------------------------------------------
/perfdata/appengine/README.md:
--------------------------------------------------------------------------------
1 | # perfdata.golang.org
2 |
3 | Deploy:
4 |
5 | ```
6 | gcloud app deploy --project=golang-org app.yaml
7 | ```
8 |
--------------------------------------------------------------------------------
/env/corellium/android/files/profile:
--------------------------------------------------------------------------------
1 | export GOROOT_BOOTSTRAP=$HOME/go-android-arm64-bootstrap
2 | export PATH=$HOME/go/bin:$PATH
3 | export TMPDIR=$HOME/tmpdir
4 |
--------------------------------------------------------------------------------
/env/crosscompile/linux-armel-cross/README:
--------------------------------------------------------------------------------
1 | The docker image created from this directory can be used to cross compile go
2 | from linux/amd64 to linux/armel.
3 |
--------------------------------------------------------------------------------
/env/crosscompile/linux-armhf-cross/README:
--------------------------------------------------------------------------------
1 | The docker image created from this directory can be used to cross compile go
2 | from linux/amd64 to linux/armhf.
3 |
--------------------------------------------------------------------------------
/env/crosscompile/linux-s390x-cross/README:
--------------------------------------------------------------------------------
1 | The docker image created from this directory can be used to cross compile go
2 | from linux/amd64 to linux/s390x.
3 |
--------------------------------------------------------------------------------
/cmd/coordinator/internal/legacydash/static/status_good.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sayjun0505/build/HEAD/cmd/coordinator/internal/legacydash/static/status_good.gif
--------------------------------------------------------------------------------
/cmd/coordinator/internal/legacydash/static/status_alert.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sayjun0505/build/HEAD/cmd/coordinator/internal/legacydash/static/status_alert.gif
--------------------------------------------------------------------------------
/env/linux-arm-qemu/buildlet.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Buildlet
3 |
4 | [Service]
5 | ExecStart=/usr/local/bin/stage0
6 |
7 | [Install]
8 | WantedBy=multi-user.target
9 |
--------------------------------------------------------------------------------
/env/linux-arm-qemu/qemu.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=QEMU
3 |
4 | [Service]
5 | ExecStart=/usr/local/bin/buildlet-qemu
6 |
7 | [Install]
8 | WantedBy=multi-user.target
9 |
--------------------------------------------------------------------------------
/internal/diff/testdata/allnew.txt:
--------------------------------------------------------------------------------
1 | -- old --
2 | -- new --
3 | a
4 | b
5 | c
6 | -- diff --
7 | diff old new
8 | --- old
9 | +++ new
10 | @@ -0,0 +1,3 @@
11 | +a
12 | +b
13 | +c
14 |
--------------------------------------------------------------------------------
/internal/diff/testdata/allold.txt:
--------------------------------------------------------------------------------
1 | -- old --
2 | a
3 | b
4 | c
5 | -- new --
6 | -- diff --
7 | diff old new
8 | --- old
9 | +++ new
10 | @@ -1,3 +0,0 @@
11 | -a
12 | -b
13 | -c
14 |
--------------------------------------------------------------------------------
/env/openbsd-386/.gitignore:
--------------------------------------------------------------------------------
1 | auto_install.conf
2 | boot.conf
3 | disk.raw
4 | disklabel.template
5 | etc
6 | install.site
7 | install*.iso
8 | openbsd-*-gce.tar.gz
9 | random.seed
10 | site58.tgz
11 |
--------------------------------------------------------------------------------
/env/openbsd-amd64/.gitignore:
--------------------------------------------------------------------------------
1 | auto_install.conf
2 | boot.conf
3 | disk.raw
4 | disklabel.template
5 | etc
6 | install.site
7 | install*.iso
8 | openbsd-*-gce.tar.gz
9 | random.seed
10 | site58.tgz
11 |
--------------------------------------------------------------------------------
/vcs-test/dav_svn.conf:
--------------------------------------------------------------------------------
1 |
Hello gophers,
2 |We plan to issue Go 1.18.4 during US business hours on Tuesday, July 12.
3 |This minor release includes PRIVATE security fixes to the toolchain, covering the following CVEs:
4 |Following our security policy, this is the pre-announcement of the release.
9 |Thanks,
10 | Alice and Bob for the Go team
Hello gophers,
2 |We plan to issue Go 1.18.4 and Go 1.17.12 during US business hours on Tuesday, July 12.
3 |These minor releases include PRIVATE security fixes to the standard library, covering the following CVEs:
4 |Following our security policy, this is the pre-announcement of those releases.
9 |Thanks,
10 | Alice for the Go team
Upload one or more benchmark files.
14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /internal/relui/db/db.go: -------------------------------------------------------------------------------- 1 | // Code generated by sqlc. DO NOT EDIT. 2 | // versions: 3 | // sqlc v1.15.0 4 | 5 | package db 6 | 7 | import ( 8 | "context" 9 | 10 | "github.com/jackc/pgconn" 11 | "github.com/jackc/pgx/v4" 12 | ) 13 | 14 | type DBTX interface { 15 | Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) 16 | Query(context.Context, string, ...interface{}) (pgx.Rows, error) 17 | QueryRow(context.Context, string, ...interface{}) pgx.Row 18 | } 19 | 20 | func New(db DBTX) *Queries { 21 | return &Queries{db: db} 22 | } 23 | 24 | type Queries struct { 25 | db DBTX 26 | } 27 | 28 | func (q *Queries) WithTx(tx pgx.Tx) *Queries { 29 | return &Queries{ 30 | db: tx, 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /internal/task/testdata/announce-minor.html: -------------------------------------------------------------------------------- 1 |Hello gophers,
2 |We have just released Go versions 1.18.1 and 1.17.9, minor point releases.
3 |View the release notes for more information:
4 | https://go.dev/doc/devel/release#go1.18.1
You can download binary and source distributions from the Go website:
6 | https://go.dev/dl/
To compile from source using a Git clone, update to the release with
8 | git checkout go1.18.1 and build as usual.
Thanks to everyone who contributed to the releases.
10 |Cheers,
11 | Alice, Bob, and Charlie for the Go team
Hello gophers,
2 |We have just released Go 1.19.
3 |To find out what has changed in Go 1.19, read the release notes:
4 | https://go.dev/doc/go1.19
You can download binary and source distributions from our download page:
6 | https://go.dev/dl/#go1.19
If you have Go installed already, an easy way to try go1.19
8 | is by using the go command:
9 | $ go install golang.org/dl/go1.19@latest
10 | $ go1.19 download
To compile from source using a Git clone, update to the release with
12 | git checkout go1.19 and build as usual.
Thanks to everyone who contributed to the release!
14 |Cheers,
15 | The Go team
Hello gophers,
2 |We have just released Go version 1.11.1, a minor point release.
3 |This minor release includes 2 security fixes following the security policy:
4 |abc: security fix 1
7 |xyz: security fix 2
10 |View the release notes for more information:
13 | https://go.dev/doc/devel/release#go1.11.1
You can download binary and source distributions from the Go website:
15 | https://go.dev/dl/
To compile from source using a Git clone, update to the release with
17 | git checkout go1.11.1 and build as usual.
Thanks to everyone who contributed to the release.
19 |Cheers,
20 | Alice for the Go team
13 | Releases
14 | Open reviews
15 | Owners
16 | Stats
17 |
18 | About the Dashboards
19 |
20 | These dashboards are generated by
21 | golang.org/x/build/devapp.
22 |
23 | Issue information comes directly from GitHub.
24 | To change something about an issue here, go to GitHub.
25 |
26 | CL information comes directly from Gerrit.
27 | To change something about a CL here, go to Gerrit.
28 |
29 | The UI typically reflects data changes from both sources within a few tens of
30 | milliseconds.
31 |
--------------------------------------------------------------------------------
/internal/task/template/announce-beta.md:
--------------------------------------------------------------------------------
1 | Subject: Go {{.Version|major}} Beta {{.Version|build}} is released
2 |
3 | Hello gophers,
4 |
5 | We have just released {{.Version}}, a beta version of Go {{.Version|major}}.
6 | It is cut from the master branch at the revision tagged {{.Version}}.
7 |
8 | Please try your production load tests and unit tests with the new version.
9 | Your help testing these pre-release versions is invaluable.
10 |
11 | Report any problems using the issue tracker:
12 | https://go.dev/issue/new
13 |
14 | If you have Go installed already, an easy way to try {{.Version}}
15 | is by using the go command:
16 | $ go install golang.org/dl/{{.Version}}@latest
17 | $ {{.Version}} download
18 |
19 | You can download binary and source distributions from the usual place:
20 | https://go.dev/dl/#{{.Version}}
21 |
22 | To find out what has changed in Go {{.Version|major}}, read the draft release notes:
23 | https://tip.golang.org/doc/go{{.Version|major}}
24 |
25 | Cheers,
26 | {{with .Names}}{{join .}} for the{{else}}The{{end}} Go team
27 |
--------------------------------------------------------------------------------
/env/corellium/android/files/clangwrap.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import (
8 | "os"
9 | "os/exec"
10 | )
11 |
12 | func main() {
13 | args := os.Args[1:]
14 | cmd := exec.Command("clang")
15 | if os.Getenv("GOARCH") == "arm" {
16 | pref := os.Getenv("PREFIX")
17 | cmd.Args = append(cmd.Args, "-target", "armv7a-linux-androideabi", "-Qunused-arguments", "-Wl,-rpath-link="+pref+"/../home/arm-linux-androideabi/lib", "-L"+pref+"/../home/arm-linux-androideabi/lib", "-B"+pref+"/../home/arm-linux-androideabi/lib")
18 | } else {
19 | cmd.Args = append(cmd.Args, "-Qunused-arguments", "-fuse-ld=lld")
20 | }
21 | cmd.Args = append(cmd.Args, args...)
22 | cmd.Stdout = os.Stdout
23 | cmd.Stderr = os.Stderr
24 | if err := cmd.Run(); err != nil {
25 | if err, ok := err.(*exec.ExitError); ok {
26 | os.Exit(err.ExitCode())
27 | }
28 | os.Exit(1)
29 | }
30 | os.Exit(0)
31 | }
32 |
--------------------------------------------------------------------------------
/internal/task/testdata/announce-beta.html:
--------------------------------------------------------------------------------
1 | Hello gophers,
2 | We have just released go1.19beta5, a beta version of Go 1.19.
3 | It is cut from the master branch at the revision tagged go1.19beta5.
4 | Please try your production load tests and unit tests with the new version.
5 | Your help testing these pre-release versions is invaluable.
6 | Report any problems using the issue tracker:
7 | https://go.dev/issue/new
8 | If you have Go installed already, an easy way to try go1.19beta5
9 | is by using the go command:
10 | $ go install golang.org/dl/go1.19beta5@latest
11 | $ go1.19beta5 download
12 | You can download binary and source distributions from the usual place:
13 | https://go.dev/dl/#go1.19beta5
14 | To find out what has changed in Go 1.19, read the draft release notes:
15 | https://tip.golang.org/doc/go1.19
16 | Cheers,
17 | The Go team
18 |
--------------------------------------------------------------------------------
/internal/task/testdata/announce-rc.html:
--------------------------------------------------------------------------------
1 | Hello gophers,
2 | We have just released go1.19rc6, a release candidate version of Go 1.19.
3 | It is cut from release-branch.go1.19 at the revision tagged go1.19rc6.
4 | Please try your production load tests and unit tests with the new version.
5 | Your help testing these pre-release versions is invaluable.
6 | Report any problems using the issue tracker:
7 | https://go.dev/issue/new
8 | If you have Go installed already, an easy way to try go1.19rc6
9 | is by using the go command:
10 | $ go install golang.org/dl/go1.19rc6@latest
11 | $ go1.19rc6 download
12 | You can download binary and source distributions from the usual place:
13 | https://go.dev/dl/#go1.19rc6
14 | To find out what has changed in Go 1.19, read the draft release notes:
15 | https://tip.golang.org/doc/go1.19
16 | Cheers,
17 | The Go team
18 |
--------------------------------------------------------------------------------
/cmd/greplogs/xdg.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import (
8 | "os"
9 | "os/user"
10 | "path/filepath"
11 | "runtime"
12 | )
13 |
14 | // xdgCacheDir returns the XDG Base Directory Specification cache
15 | // directory.
16 | func xdgCacheDir() string {
17 | cache := os.Getenv("XDG_CACHE_HOME")
18 | if cache == "" {
19 | home := os.Getenv("HOME")
20 | if home == "" {
21 | u, err := user.Current()
22 | if err != nil {
23 | home = u.HomeDir
24 | }
25 | }
26 | // Not XDG but standard for OS X.
27 | if runtime.GOOS == "darwin" {
28 | return filepath.Join(home, "Library/Caches")
29 | }
30 | cache = filepath.Join(home, ".cache")
31 | }
32 | return cache
33 | }
34 |
35 | // xdgCreateDir creates a directory and its parents in accordance with
36 | // the XDG Base Directory Specification.
37 | func xdgCreateDir(path string) error {
38 | return os.MkdirAll(path, 0700)
39 | }
40 |
--------------------------------------------------------------------------------
/internal/coordinator/schedule/span_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux || darwin
6 | // +build linux darwin
7 |
8 | package schedule
9 |
10 | import (
11 | "testing"
12 | )
13 |
14 | type fakeEventTimeLogger struct {
15 | event string
16 | optText []string
17 | }
18 |
19 | func (l *fakeEventTimeLogger) LogEventTime(event string, optText ...string) {
20 | l.event = event
21 | l.optText = optText
22 | }
23 |
24 | func TestSpan(t *testing.T) {
25 | l := &fakeEventTimeLogger{}
26 | event := "log_event"
27 | s := CreateSpan(l, event, "a", "b", "c")
28 | if err := s.Done(nil); err != nil {
29 | t.Fatalf("Span.Done() = %s; want no error", err)
30 | }
31 | if l.event != "finish_"+event {
32 | t.Errorf("EventTimeLogger.event = %q, want %q", l.event, "finish_"+event)
33 | }
34 | if len(l.optText) == 0 {
35 | t.Errorf("EventTimeLogger.optText = %+v; want entries", l.optText)
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/cmd/fetchlogs/xdg.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import (
8 | "os"
9 | "os/user"
10 | "path/filepath"
11 | "runtime"
12 | )
13 |
14 | // xdgCacheDir returns the XDG Base Directory Specification cache
15 | // directory.
16 | func xdgCacheDir() string {
17 | cache := os.Getenv("XDG_CACHE_HOME")
18 | if cache == "" {
19 | home := os.Getenv("HOME")
20 | if home == "" {
21 | u, err := user.Current()
22 | if err != nil {
23 | home = u.HomeDir
24 | }
25 | }
26 | // Not XDG but standard for OS X.
27 | if runtime.GOOS == "darwin" {
28 | return filepath.Join(home, "Library/Caches")
29 | }
30 | cache = filepath.Join(home, ".cache")
31 | }
32 | return cache
33 | }
34 |
35 | // xdgCreateDir creates a directory and its parents in accordance with
36 | // the XDG Base Directory Specification.
37 | func xdgCreateDir(path string) error {
38 | return os.MkdirAll(path, 0700)
39 | }
40 |
--------------------------------------------------------------------------------
/env/android-amd64-emu/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2018 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | IMAGE_NAME=$(shell basename $(CURDIR))
6 |
7 | usage:
8 | echo "see Makefile for usage for building $(IMAGE_NAME)"
9 |
10 | docker: Dockerfile
11 | go install golang.org/x/build/cmd/xb
12 | xb docker build -t golang/$(IMAGE_NAME) .
13 |
14 | push-staging: docker
15 | go install golang.org/x/build/cmd/xb
16 | $(eval REV := $(shell docker images --format={{.ID}} golang/android-amd64-emu:latest))
17 | xb --staging docker tag golang/$(IMAGE_NAME) REPO/$(IMAGE_NAME):$(REV)
18 | xb --staging docker push REPO/$(IMAGE_NAME):$(REV)
19 |
20 | push-prod: docker
21 | go install golang.org/x/build/cmd/xb
22 | $(eval REV := $(shell docker images --format={{.ID}} golang/android-amd64-emu:latest))
23 | xb --prod docker tag golang/$(IMAGE_NAME) REPO/$(IMAGE_NAME):$(REV)
24 | xb --prod docker push REPO/$(IMAGE_NAME):$(REV)
25 |
26 | vm-prod: push-prod
27 | ./create-vm.sh
28 |
--------------------------------------------------------------------------------
/internal/task/template/announce-rc.md:
--------------------------------------------------------------------------------
1 | Subject: Go {{.Version|major}} Release Candidate {{.Version|build}} is released
2 |
3 | Hello gophers,
4 |
5 | We have just released {{.Version}}, a release candidate version of Go {{.Version|major}}.
6 | It is cut from release-branch.go{{.Version|major}} at the revision tagged {{.Version}}.
7 |
8 | Please try your production load tests and unit tests with the new version.
9 | Your help testing these pre-release versions is invaluable.
10 |
11 | Report any problems using the issue tracker:
12 | https://go.dev/issue/new
13 |
14 | If you have Go installed already, an easy way to try {{.Version}}
15 | is by using the go command:
16 | $ go install golang.org/dl/{{.Version}}@latest
17 | $ {{.Version}} download
18 |
19 | You can download binary and source distributions from the usual place:
20 | https://go.dev/dl/#{{.Version}}
21 |
22 | To find out what has changed in Go {{.Version|major}}, read the draft release notes:
23 | https://tip.golang.org/doc/go{{.Version|major}}
24 |
25 | Cheers,
26 | {{with .Names}}{{join .}} for the{{else}}The{{end}} Go team
27 |
--------------------------------------------------------------------------------
/cmd/buildlet/stage0/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2017 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | FROM golang:1.19 AS build
6 | LABEL maintainer="golang-dev@googlegroups.com"
7 |
8 | RUN mkdir /gocache
9 | ENV GOCACHE /gocache
10 |
11 | COPY go.mod /go/src/golang.org/x/build/go.mod
12 | COPY go.sum /go/src/golang.org/x/build/go.sum
13 |
14 | WORKDIR /go/src/golang.org/x/build
15 |
16 | # Optimization for iterative docker build speed, not necessary for correctness:
17 | # TODO: write a tool to make writing Go module-friendly Dockerfiles easier.
18 | RUN go install cloud.google.com/go/compute/metadata
19 |
20 | COPY . /go/src/golang.org/x/build/
21 |
22 | # Install binary to /go/bin/stage0
23 | RUN go install golang.org/x/build/cmd/buildlet/stage0
24 | RUN CGO_ENABLED=0 go build -o /go/bin/stage0.static golang.org/x/build/cmd/buildlet/stage0
25 |
26 | FROM golang:1.19
27 | COPY --from=build /go/bin/stage0 /go/bin/stage0
28 | COPY --from=build /go/bin/stage0.static /go/bin/stage0.static
29 |
--------------------------------------------------------------------------------
/devapp/release_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import "testing"
8 |
9 | func TestTitleDir(t *testing.T) {
10 | testcases := []struct {
11 | title string
12 | dirs []string
13 | }{
14 | {"no title dir", nil},
15 | {" cmd/compile , cmd/go: do awesome things", []string{"cmd/compile", "cmd/go"}},
16 | {"cmd/compile: cleanup MOVaddr code generation", []string{"cmd/compile"}},
17 | {`cmd/asm, cmd/internal/obj/s390x, math: add "test under mask" instructions`,
18 | []string{"cmd/asm", "cmd/internal/obj/s390x", "math"}},
19 | }
20 | for _, tc := range testcases {
21 | r := titleDirs(tc.title)
22 | if len(r) != len(tc.dirs) {
23 | t.Fatalf("titleDirs(%q) = %v (%d); want %d length", tc.title, r, len(r), len(tc.dirs))
24 | }
25 | for i := range tc.dirs {
26 | if r[i] != tc.dirs[i] {
27 | t.Errorf("titleDirs[%d](%v) != tc.dirs[%d](%q)", i, r[i], i, tc.dirs[i])
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/env/js-wasm-node18/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2022 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | IMAGE_NAME=$(shell basename $(CURDIR))
6 | PROD_REPO=gcr.io/symbolic-datum-552
7 |
8 | usage:
9 | echo "Use prod or dev targets. For dev, specify your Docker repository with the REPO=foo argument." ; exit 1
10 |
11 | prod: Dockerfile
12 | sed 's|{{REPO}}|'"$(PROD_REPO)"'|g' Dockerfile > Dockerfile.make
13 | docker build -t $(PROD_REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
14 |
15 | pushprod: prod
16 | docker push $(PROD_REPO)/$(IMAGE_NAME):latest
17 | rm Dockerfile.make
18 |
19 | # You must provide a REPO=your-repo-name arg when you make
20 | # this target. REPO is the name of the Docker repository
21 | # that will be prefixed to the name of the image being built.
22 | dev: Dockerfile
23 | sed 's|{{REPO}}|'"$(REPO)"'|g' Dockerfile > Dockerfile.make
24 | docker build -t $(REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
25 | docker push $(REPO)/$(IMAGE_NAME):latest
26 | rm Dockerfile.make
27 |
--------------------------------------------------------------------------------
/env/netbsd-386/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2018 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | RELEASE=9.3
6 | ARCH=i386
7 |
8 | VM_IMAGE_FILE=vm-image-netbsd-${ARCH}-${RELEASE}.tar.gz
9 | VM_IMAGE_NAME=netbsd-${ARCH}-$(subst .,-,$(RELEASE))
10 |
11 |
12 | upload-staging:
13 | go install golang.org/x/build/cmd/upload
14 | upload --verbose --file=${VM_IMAGE_FILE} --public dev-go-builder-data/${VM_IMAGE_FILE}
15 |
16 | upload-prod:
17 | go install golang.org/x/build/cmd/upload
18 | upload --verbose --file=${VM_IMAGE_FILE} --public go-builder-data/${VM_IMAGE_FILE}
19 |
20 | create-image-staging:
21 | gcloud compute --project go-dashboard-dev images create ${VM_IMAGE_NAME} --source-uri gs://dev-go-builder-data/${VM_IMAGE_FILE}
22 |
23 | create-image-prod:
24 | gcloud compute --project symbolic-datum-552 images create ${VM_IMAGE_NAME} --source-uri gs://go-builder-data/${VM_IMAGE_FILE}
25 |
26 | clean:
27 | rm -rf netbsd-*.tar.gz vm-image-netbsd-*.tar.gz work-NetBSD-* anita-*.tar.gz anita-*/
28 |
--------------------------------------------------------------------------------
/env/netbsd-amd64/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2017 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | RELEASE=9.3
6 | ARCH=amd64
7 |
8 | VM_IMAGE_FILE=vm-image-netbsd-${ARCH}-${RELEASE}.tar.gz
9 | VM_IMAGE_NAME=netbsd-${ARCH}-$(subst .,-,$(RELEASE))
10 |
11 |
12 | upload-staging:
13 | go install golang.org/x/build/cmd/upload
14 | upload --verbose --file=${VM_IMAGE_FILE} --public dev-go-builder-data/${VM_IMAGE_FILE}
15 |
16 | upload-prod:
17 | go install golang.org/x/build/cmd/upload
18 | upload --verbose --file=${VM_IMAGE_FILE} --public go-builder-data/${VM_IMAGE_FILE}
19 |
20 | create-image-staging:
21 | gcloud compute --project go-dashboard-dev images create ${VM_IMAGE_NAME} --source-uri gs://dev-go-builder-data/${VM_IMAGE_FILE}
22 |
23 | create-image-prod:
24 | gcloud compute --project symbolic-datum-552 images create ${VM_IMAGE_NAME} --source-uri gs://go-builder-data/${VM_IMAGE_FILE}
25 |
26 | clean:
27 | rm -rf netbsd-*.tar.gz vm-image-netbsd-*.tar.gz work-NetBSD-* anita-*.tar.gz anita-*/
28 |
--------------------------------------------------------------------------------
/internal/internal_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package internal
6 |
7 | import (
8 | "context"
9 | "testing"
10 | "time"
11 | )
12 |
13 | func TestPeriodicallyDo(t *testing.T) {
14 | ctx, cancel := context.WithCancel(context.Background())
15 | defer cancel()
16 |
17 | didWork := make(chan time.Time, 2)
18 | done := make(chan interface{})
19 | go func() {
20 | PeriodicallyDo(ctx, time.Millisecond, func(ctx context.Context, t time.Time) {
21 | select {
22 | case didWork <- t:
23 | case <-ctx.Done():
24 | }
25 | })
26 | close(done)
27 | }()
28 | select {
29 | case <-time.After(5 * time.Second):
30 | t.Error("PeriodicallyDo() never called f, wanted at least one call")
31 | case <-didWork:
32 | // PeriodicallyDo called f successfully.
33 | }
34 | select {
35 | case <-done:
36 | t.Errorf("PeriodicallyDo() finished early, wanted it to still be looping")
37 | case <-didWork:
38 | cancel()
39 | }
40 | <-done
41 | }
42 |
--------------------------------------------------------------------------------
/env/linux-ppc64/osuosl/sid-image/build-sid.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -ex
2 | # Copyright 2022 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 |
6 | export rootfs=$(pwd)/debian_sid
7 | if [ ! -e "$rootfs" ]; then
8 | (
9 | sudo -E sh -c 'debootstrap --variant=minbase --keyring=/usr/share/keyrings/debian-ports-archive-keyring.gpg --include debian-ports-archive-keyring sid $rootfs https://deb.debian.org/debian-ports'
10 | cd "$rootfs"
11 | sudo rm -rf var/log/{dpkg,bootstrap,alternatives}.log var/cache/ldconfig/aux-cache var/cache/apt/* var/lib/apt/lists/* dev/* proc/* sys/*
12 | )
13 | else
14 | echo "skipping debootstrap"
15 | fi
16 |
17 | cat > Dockerfile.sid <<'EOF'
18 | FROM scratch
19 | COPY ./debian_sid/ /
20 | CMD ["/bin/bash"]
21 | EOF
22 |
23 | # always build with buildkit :)
24 | export DOCKER_BUILDKIT=1
25 | sudo -E docker build -f Dockerfile.sid -t murp/debian:sid-ppc64 .
26 | sudo docker run -it --rm murp/debian:sid-ppc64 cat /etc/os-release
27 |
--------------------------------------------------------------------------------
/env/dragonfly-amd64/README:
--------------------------------------------------------------------------------
1 | The Makefile in this directory creates a Google Compute Engine VM image to run the Go
2 | DragonflyBSD builder, booting up to run the buildlet.
3 |
4 | make must be run on a Linux box with qemu and a few additional packages:
5 |
6 | apt-get install qemu-system-x86 qemu-utils expect genisoimage
7 |
8 | To override the default Dragonfly version, set V= on the make command line:
9 |
10 | make V=600
11 |
12 | To add new Dragonfly versions, add lines to the "Database" in the Makefile
13 | and perhaps change the V= line to update the default.
14 |
15 | make upload-prod
16 |
17 | builds and uploads the image. To replace an existing image, use
18 |
19 | make delete-prod upload-prod
20 |
21 | s/prod/staging/ to test in the staging cluster instead.
22 |
23 | The VM needs to be run with the GCE metadata attribute "buildlet-binary-url" set to a URL
24 | of the DragonflyBSD buildlet (cross-compiled, typically).
25 |
26 | buildlet-binary-url == http://storage.googleapis.com/go-builder-data/buildlet.dragonfly-amd64
27 |
28 | The buildlet rc script is lightly modified from ../freebsd-amd64.
29 |
--------------------------------------------------------------------------------
/cmd/buildlet/stage0/stage0_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import (
8 | "io"
9 | "log"
10 | "os"
11 |
12 | "github.com/tarm/serial"
13 | )
14 |
15 | func init() {
16 | configureSerialLogOutput = configureSerialLogOutputWindows
17 | closeSerialLogOutput = closeSerialLogOutputWindows
18 | }
19 |
20 | var com1 *serial.Port
21 |
22 | func configureSerialLogOutputWindows() {
23 | c := &serial.Config{Name: "COM1", Baud: 9600}
24 | var err error
25 | com1, err = serial.OpenPort(c)
26 | if err != nil {
27 | // Oh well, we tried. This empirically works
28 | // on Windows on GCE.
29 | // We can log here anyway and hope somebody sees it
30 | // in a GUI console:
31 | log.Printf("serial.OpenPort: %v", err)
32 | return
33 | }
34 | log.SetOutput(io.MultiWriter(com1, os.Stderr))
35 | }
36 |
37 | func closeSerialLogOutputWindows() {
38 | if com1 != nil {
39 | com1.Close()
40 | com1 = nil
41 | log.SetOutput(os.Stderr)
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/env/linux-x86-alpine/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2017 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | # Alpine Linux builder
6 | # Docker tag gcr.io/go-dashboard-dev/linux-x86-alpine (staging)
7 | # and gcr.io/symbolic-datum-552/linux-x86-alpine (prod)
8 |
9 | FROM golang/buildlet-stage0 AS stage0
10 |
11 | FROM alpine:3.16
12 | MAINTAINER golang-dev
13 |
14 | RUN apk add --no-cache \
15 | bash \
16 | binutils \
17 | build-base \
18 | ca-certificates \
19 | curl \
20 | gcc \
21 | gdb \
22 | gfortran \
23 | git \
24 | go \
25 | libc-dev \
26 | lsof \
27 | make \
28 | openssh \
29 | procps \
30 | strace
31 |
32 | RUN ssh-keygen -A
33 | RUN bash -c "(echo ChallengeResponseAuthentication no; echo PasswordAuthentication no; echo PermitRootLogin yes) > /etc/ssh/sshd_config"
34 | RUN bash -c "passwd -u root || true" # might already be unlocked
35 |
36 | COPY --from=stage0 /go/bin/stage0.static /usr/local/bin/stage0
37 |
38 | ENV GOROOT_BOOTSTRAP=/usr/lib/go
39 |
40 | CMD ["/usr/local/bin/stage0"]
41 |
--------------------------------------------------------------------------------
/env/freebsd-amd64/README:
--------------------------------------------------------------------------------
1 | make.bash creates a Google Compute Engine VM image to run the Go
2 | FreeBSD builder, booting up to run the buildlet.
3 |
4 | make.bash should be run on a Linux box with qemu and a few additional packages.
5 | on ubuntu 20.04:
6 | apt-get install qemu-system-x86 qemu-utils expect genisoimage
7 |
8 | After it completes, it creates a file freebsd-amd64-gce101.tar.gz
9 |
10 | Then:
11 | gsutil cp -a public-read freebsd-amd64-103.tar.gz gs://go-builder-data/freebsd-amd64-103.tar.gz
12 | Or just use the web UI at:
13 | https://console.developers.google.com/project/symbolic-datum-552/storage/browser/go-builder-data/
14 |
15 | Then:
16 | gcloud compute --project symbolic-datum-552 images delete freebsd-amd64-103
17 | gcloud compute --project symbolic-datum-552 images create freebsd-amd64-103 --source-uri gs://go-builder-data/freebsd-amd64-103.tar.gz
18 |
19 | The VM needs to be run with the GCE metadata attribute "buildlet-binary-url" set to a URL
20 | of the FreeBSD buildlet (cross-compiled, typically).
21 |
22 | buildlet-binary-url == http://storage.googleapis.com/go-builder-data/buildlet.freebsd-amd64
23 |
--------------------------------------------------------------------------------
/env/linux-x86-fedora/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2019 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | FROM golang/buildlet-stage0 AS stage0
6 |
7 | FROM fedora:30
8 | MAINTAINER golang-dev
9 |
10 | RUN yum -y update && yum -y install \
11 | ca-certificates \
12 | findutils \
13 | gcc \
14 | glibc-static \
15 | patch \
16 | strace \
17 | which \
18 | openssh-server \
19 | make \
20 | && true
21 |
22 | RUN ssh-keygen -A
23 |
24 | RUN mkdir -p /goboot-amd64 \
25 | && ( \
26 | curl --silent https://storage.googleapis.com/golang/go1.13.4.linux-amd64.tar.gz | tar -C /goboot-amd64 -zxv \
27 | ) \
28 | && mv /goboot-amd64/go /goboot \
29 | && rm -rf /goboot-amd64 \
30 | && rm -rf /goboot/pkg/linux_amd64_race \
31 | /goboot/api \
32 | /goboot/blog \
33 | /goboot/doc \
34 | /goboot/misc \
35 | /goboot/test \
36 | && find /goboot -type d -name testdata | xargs rm -rf
37 |
38 | COPY --from=stage0 /go/bin/stage0 /usr/local/bin/stage0
39 |
40 | CMD ["/usr/local/bin/stage0"]
41 |
--------------------------------------------------------------------------------
/env/linux-ppc64/osuosl/buildlet-image/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2019 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | # build locally from debian-sid.sh
6 | FROM murp/debian:sid-ppc64
7 |
8 | ENV DEBIAN_FRONTEND noninteractive
9 |
10 | RUN apt-get update && \
11 | apt-get install --yes \
12 | gcc curl strace \
13 | ca-certificates netbase \
14 | procps lsof psmisc \
15 | libc6-dev gdb \
16 | openssh-server
17 |
18 | RUN mkdir /usr/local/go-bootstrap && \
19 | curl --silent https://storage.googleapis.com/go-builder-data/gobootstrap-linux-ppc64.tar.gz | \
20 | tar -C /usr/local/go-bootstrap -zxv
21 |
22 | ENV GOROOT_BOOTSTRAP /usr/local/go-bootstrap
23 | RUN curl -o /usr/local/bin/stage0 https://storage.googleapis.com/go-builder-data/buildlet-stage0.linux-ppc64 && \
24 | chmod +x /usr/local/bin/stage0
25 |
26 | ENV GO_BUILDER_ENV host-linux-ppc64-osu
27 |
28 | ENV GO_BUILD_KEY_DELETE_AFTER_READ true
29 | ENV GO_BUILD_KEY_PATH /buildkey/gobuildkey
30 |
31 | CMD ["/usr/local/bin/stage0"]
32 |
--------------------------------------------------------------------------------
/maintner/maintwatch/maintwatch.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // The maintwatch commands tails the maintner mutation log.
6 | package main
7 |
8 | import (
9 | "context"
10 | "flag"
11 | "fmt"
12 | "log"
13 | "os"
14 | "time"
15 |
16 | "github.com/golang/protobuf/proto"
17 | "golang.org/x/build/maintner"
18 | "golang.org/x/build/maintner/godata"
19 | )
20 |
21 | var server = flag.String("server", godata.Server, "maintner server's /logs URL")
22 |
23 | func main() {
24 | flag.Parse()
25 |
26 | tm := proto.TextMarshaler{Compact: false}
27 | for {
28 | err := maintner.TailNetworkMutationSource(context.Background(), *server, func(e maintner.MutationStreamEvent) error {
29 | if e.Err != nil {
30 | log.Printf("# ignoring err: %v\n", e.Err)
31 | time.Sleep(5 * time.Second)
32 | return nil
33 | }
34 | fmt.Println()
35 | tm.Marshal(os.Stdout, e.Mutation)
36 | return nil
37 | })
38 | log.Printf("tail error: %v; restarting\n", err)
39 | time.Sleep(time.Second)
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/maintner/maintnerd/gcslog/gcslog_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package gcslog
6 |
7 | import (
8 | "context"
9 | "testing"
10 | "time"
11 |
12 | "golang.org/x/build/maintner/maintpb"
13 | )
14 |
15 | func TestGCSLogWakeup_Timeout(t *testing.T) {
16 | testGCSLogWakeup(t, false)
17 | }
18 |
19 | func TestGCSLogWakeup_Activity(t *testing.T) {
20 | testGCSLogWakeup(t, true)
21 | }
22 |
23 | func testGCSLogWakeup(t *testing.T, activity bool) {
24 | gl := newGCSLogBase()
25 | waitc := make(chan bool, 1)
26 | ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond)
27 | defer cancel()
28 | go func() {
29 | waitc <- gl.waitSizeNot(ctx, 0)
30 | }()
31 | if activity {
32 | if err := gl.Log(new(maintpb.Mutation)); err != nil {
33 | t.Fatal(err)
34 | }
35 | }
36 | select {
37 | case got := <-waitc:
38 | if got != activity {
39 | t.Errorf("changed = %v; want %v", got, activity)
40 | }
41 | case <-time.After(2 * time.Second):
42 | t.Errorf("timeout")
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/perfdata/fs/gcs/gcs.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package gcs implements the fs.FS interface using Google Cloud Storage.
6 | package gcs
7 |
8 | import (
9 | "context"
10 |
11 | "cloud.google.com/go/storage"
12 | "golang.org/x/build/perfdata/fs"
13 | )
14 |
15 | // impl is an fs.FS backed by Google Cloud Storage.
16 | type impl struct {
17 | bucket *storage.BucketHandle
18 | }
19 |
20 | // NewFS constructs an FS that writes to the provided bucket.
21 | // On AppEngine, ctx must be a request-derived Context.
22 | func NewFS(ctx context.Context, bucketName string) (fs.FS, error) {
23 | client, err := storage.NewClient(ctx)
24 | if err != nil {
25 | return nil, err
26 | }
27 | return &impl{client.Bucket(bucketName)}, nil
28 | }
29 |
30 | func (fs *impl) NewWriter(ctx context.Context, name string, metadata map[string]string) (fs.Writer, error) {
31 | w := fs.bucket.Object(name).NewWriter(ctx)
32 | // TODO(quentin): Do these need "x-goog-meta-" prefixes?
33 | w.Metadata = metadata
34 | return w, nil
35 | }
36 |
--------------------------------------------------------------------------------
/env/linux-arm/aws/README.md:
--------------------------------------------------------------------------------
1 | # AWS Linux ARM Builder
2 |
3 | ## Machines
4 |
5 | The AWS builders use the m6 instance types which are arm64 based machines of varying specifications.
6 | The base type used will be m6g.xlarge 4 vCPUs, 16384 MiB.
7 |
8 | ## Machine Image
9 |
10 | Machine images are stored on AWS EBS service as a snapshot. New VMs can use the snapshot as an image
11 | by providing the AMI ID as the base image when a new VM is created. The machine image will be configured
12 | to install and initialize rundockerbuildlet.
13 |
14 | ## Buildlet Container Image
15 |
16 | Buildlet container images must be build on an arm/arm64 instance with the proper credentials. The instructions
17 | are as follows:
18 |
19 | * In your normal gcloud dev environment, retrieve a short-lived access token:
20 |
21 | `you@dev:~$ gcloud auth print-access-token`
22 |
23 | * On an arm64 instance, clone the build repository.
24 |
25 | * cd into the `env/linux-arm/aws` directory.
26 |
27 | * Execute: `make prod-push`
28 |
29 | * When prompted for your password, paste in the access token from the first step.
30 |
31 | * Ensure `/root/.docker/config.json` has been deleted.
32 |
--------------------------------------------------------------------------------
/env/openbsd-amd64/README:
--------------------------------------------------------------------------------
1 | make.bash creates a Google Compute Engine VM image to run the Go
2 | OpenBSD builder, booting up to run the buildlet.
3 |
4 | make.bash should be run on a Linux box with expect and qemu.
5 | Debian packages: expect qemu-utils qemu-system-x86 growisofs genisoimage.
6 | VERSION=7.2 ARCH=amd64 ./make.bash
7 |
8 | After it completes, it creates a file openbsd-${VERSION}-${ARCH}-gce.tar.gz
9 |
10 | Then:
11 | gsutil cp -a public-read openbsd-7.2-amd64-gce.tar.gz gs://go-builder-data/openbsd-amd64-72.tar.gz
12 | Or just use the web UI at:
13 | https://console.developers.google.com/project/symbolic-datum-552/storage/browser/go-builder-data/
14 |
15 | Then:
16 | gcloud compute --project symbolic-datum-552 images delete openbsd-amd64-72
17 | gcloud compute --project symbolic-datum-552 images create openbsd-amd64-72 --source-uri gs://go-builder-data/openbsd-amd64-72.tar.gz
18 |
19 | The VM needs to be run with the GCE metadata attribute "buildlet-binary-url" set to a URL
20 | of the OpenBSD buildlet (cross-compiled, typically).
21 |
22 | buildlet-binary-url == https://storage.googleapis.com/go-builder-data/buildlet.openbsd-amd64
23 |
--------------------------------------------------------------------------------
/cmd/coordinator/deployment-staging.yaml:
--------------------------------------------------------------------------------
1 | # Copyright 2022 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | apiVersion: apps/v1
6 | kind: Deployment
7 | metadata:
8 | name: coordinator-deployment
9 | spec:
10 | selector:
11 | matchLabels:
12 | app: coordinator
13 | template:
14 | metadata:
15 | labels:
16 | app: coordinator
17 | annotations:
18 | container.seccomp.security.alpha.kubernetes.io/coordinator: docker/default
19 | container.apparmor.security.beta.kubernetes.io/coordinator: runtime/default
20 | spec:
21 | containers:
22 | - name: coordinator
23 | image: gcr.io/go-dashboard-dev/coordinator:latest
24 | imagePullPolicy: Always
25 | command: ["/coordinator"]
26 | ports:
27 | - containerPort: 80
28 | - containerPort: 443
29 | - containerPort: 2222 # ssh proxy port
30 | resources:
31 | requests:
32 | cpu: "2"
33 | memory: "4Gi"
34 | limits:
35 | cpu: "3"
36 | memory: "6Gi"
37 |
--------------------------------------------------------------------------------
/internal/task/releaselet/releaselet_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import (
8 | "io/ioutil"
9 | "strings"
10 | "testing"
11 | )
12 |
13 | func TestSplitVersion(t *testing.T) {
14 | // Test splitVersion.
15 | for _, tt := range []struct {
16 | v string
17 | minor, patch int
18 | }{
19 | {"go1", 0, 0},
20 | {"go1.34", 34, 0},
21 | {"go1.34.7", 34, 7},
22 | } {
23 | minor, patch := splitVersion(tt.v)
24 | if minor != tt.minor || patch != tt.patch {
25 | t.Errorf("splitVersion(%q) = %v, %v; want %v, %v",
26 | tt.v, minor, patch, tt.minor, tt.patch)
27 | }
28 | }
29 | }
30 |
31 | func TestSingleFile(t *testing.T) {
32 | files, err := ioutil.ReadDir(".")
33 | if err != nil {
34 | t.Fatal(err)
35 | }
36 | for _, f := range files {
37 | if f.Name() == "releaselet.go" ||
38 | f.Name() == "README.md" ||
39 | strings.HasSuffix(f.Name(), "_test.go") {
40 | continue
41 | }
42 | t.Errorf("releaselet should be a single file, found %v", f.Name())
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/cmd/coordinator/module-proxy-service.yaml:
--------------------------------------------------------------------------------
1 | # Copyright 2022 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | apiVersion: v1
6 | kind: Service
7 | metadata:
8 | namespace: prod
9 | name: proxygolang-proxy
10 | annotations:
11 | cloud.google.com/load-balancer-type: "Internal"
12 | spec:
13 | type: NodePort
14 | ports:
15 | - name: proxygolang-proxy
16 | port: 8123
17 | targetPort: 8123
18 | nodePort: 30157
19 | protocol: TCP
20 | selector:
21 | app: coordinator
22 |
23 | # TODO(bradfitz): migrate (destroy & recreate) symbolic-datum-552 to get it off legacy networking
24 | # so we can use an internal LoadBalancer with a static internal IP instead, and then:
25 | #
26 | #spec:
27 | # type: LoadBalancer
28 | # loadBalancerIP: "10.240.0.we-cant-do-this-because-symbolic-datum-552-is-using-legacy-networking"
29 | # loadBalancerSourceRanges:
30 | # - "10.0.0.0/8"
31 | # ports:
32 | # - port: 8123
33 | # targetPort: 8123
34 | # selector:
35 | # app: coordinator
36 | #
37 | # ... and update the 30157 in coordinator to be 8123.
38 |
--------------------------------------------------------------------------------
/env/corellium/ios/files/arwrap.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build ignore
6 | // +build ignore
7 |
8 | // The arhost binary is a wrapper for llvm-ar, designed to be called by
9 | // cmd/link. The -extar flag is not enough because llvm-ar and ar don't
10 | // use the same flags.
11 | //
12 | // It is useful when the standard ar is broken, such as on self-hosted
13 | // iOS.
14 | package main
15 |
16 | import (
17 | "os"
18 | "os/exec"
19 | )
20 |
21 | func main() {
22 | args := os.Args[1:]
23 | // cmd/link invokes ar with -q -c -s. Replace with
24 | // just q.
25 | for i := len(args) - 1; i >= 0; i-- {
26 | switch args[i] {
27 | case "-q":
28 | args[i] = "q"
29 | case "-c", "-s":
30 | args = append(args[:i], args[i+1:]...)
31 | }
32 | }
33 | cmd := exec.Command("llvm-ar", args...)
34 | cmd.Stdout = os.Stdout
35 | cmd.Stderr = os.Stderr
36 | if err := cmd.Run(); err != nil {
37 | if err, ok := err.(*exec.ExitError); ok {
38 | os.Exit(err.ExitCode())
39 | }
40 | os.Exit(1)
41 | }
42 | os.Exit(0)
43 | }
44 |
--------------------------------------------------------------------------------
/perfdata/query/query.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package query provides tools for parsing a query.
6 | package query
7 |
8 | // SplitWords splits q into words using shell syntax (whitespace
9 | // can be escaped with double quotes or with a backslash).
10 | func SplitWords(q string) []string {
11 | var words []string
12 | word := make([]byte, len(q))
13 | w := 0
14 | quoting := false
15 | for r := 0; r < len(q); r++ {
16 | switch c := q[r]; {
17 | case c == '"' && quoting:
18 | quoting = false
19 | case quoting:
20 | if c == '\\' {
21 | r++
22 | }
23 | if r < len(q) {
24 | word[w] = q[r]
25 | w++
26 | }
27 | case c == '"':
28 | quoting = true
29 | case c == ' ', c == '\t':
30 | if w > 0 {
31 | words = append(words, string(word[:w]))
32 | }
33 | w = 0
34 | case c == '\\':
35 | r++
36 | fallthrough
37 | default:
38 | if r < len(q) {
39 | word[w] = q[r]
40 | w++
41 | }
42 | }
43 | }
44 | if w > 0 {
45 | words = append(words, string(word[:w]))
46 | }
47 | return words
48 | }
49 |
--------------------------------------------------------------------------------
/env/linux-ppc64le/osuosl/setup-remote.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Copyright 2022 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 |
6 |
7 | # See Makefile for usage
8 |
9 | set -e
10 |
11 | USER_AT_HOST=$1
12 | if [ "$USER_AT_HOST" = "" ]; then
13 | echo "Missing user@host arg; see Makefile for usage" >&2
14 | exit 2
15 | fi
16 | HOST_TYPE=$2
17 | if [ "$HOST_TYPE" = "" ]; then
18 | echo "Missing host type arg; see Makefile for usage" >&2
19 | exit 2
20 | fi
21 |
22 | GOARCH=ppc64le GOOS=linux go build -o rundockerbuildlet.ppc64le golang.org/x/build/cmd/rundockerbuildlet
23 |
24 | rsync -e "ssh -i ~/.ssh/id_ed25519_golang1" -avPW ./ $USER_AT_HOST:./
25 | scp -i ~/.ssh/id_ed25519_golang1 $HOME/keys/${HOST_TYPE}.buildkey $USER_AT_HOST:.gobuildkey
26 |
27 | # Install Docker, including adding our username to the "docker" group:
28 | ssh -i ~/.ssh/id_ed25519_golang1 $USER_AT_HOST ./install-docker.bash
29 |
30 | # Now that we have Docker, "log in" again (with access to the docker
31 | # group) and do the rest:
32 | ssh -i ~/.ssh/id_ed25519_golang1 $USER_AT_HOST ./install-buildlet.bash $HOST_TYPE
33 |
--------------------------------------------------------------------------------
/perf/app/index.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package app
6 |
7 | import (
8 | _ "embed"
9 | "log"
10 | "net/http"
11 |
12 | "github.com/google/safehtml/template"
13 | "golang.org/x/build/perfdata"
14 | )
15 |
16 | // index redirects / to /search.
17 | func (a *App) index(w http.ResponseWriter, r *http.Request) {
18 | ctx := r.Context()
19 |
20 | t, err := template.New("index.html").ParseFS(tmplFS, "template/index.html")
21 | if err != nil {
22 | http.Error(w, err.Error(), 500)
23 | return
24 | }
25 |
26 | var uploads []perfdata.UploadInfo
27 | ul := a.StorageClient.ListUploads(ctx, "", []string{"by", "upload-time"}, 16)
28 | defer ul.Close()
29 | for ul.Next() {
30 | uploads = append(uploads, ul.Info())
31 | }
32 | if err := ul.Err(); err != nil {
33 | log.Printf("failed to fetch recent uploads: %v", err)
34 | }
35 |
36 | w.Header().Set("Content-Type", "text/html; charset=utf-8")
37 | if err := t.Execute(w, struct{ RecentUploads []perfdata.UploadInfo }{uploads}); err != nil {
38 | http.Error(w, err.Error(), 500)
39 | return
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/perf/app/parse_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package app
6 |
7 | import (
8 | "reflect"
9 | "testing"
10 | )
11 |
12 | func TestParseQueryString(t *testing.T) {
13 | tests := []struct {
14 | q string
15 | wantPrefix string
16 | wantParts []string
17 | }{
18 | {"prefix | one vs two", "prefix", []string{"one", "two"}},
19 | {"prefix one vs two", "", []string{"prefix one", "two"}},
20 | {"anything else", "", []string{"anything else"}},
21 | {`one vs "two vs three"`, "", []string{"one", `"two vs three"`}},
22 | {"mixed\ttabs \"and\tspaces\"", "", []string{"mixed tabs \"and\tspaces\""}},
23 | }
24 | for _, test := range tests {
25 | t.Run(test.q, func(t *testing.T) {
26 | havePrefix, haveParts := parseQueryString(test.q)
27 | if havePrefix != test.wantPrefix {
28 | t.Errorf("parseQueryString returned prefix %q, want %q", havePrefix, test.wantPrefix)
29 | }
30 | if !reflect.DeepEqual(haveParts, test.wantParts) {
31 | t.Errorf("parseQueryString returned parts %#v, want %#v", haveParts, test.wantParts)
32 | }
33 | })
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vcs-test/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2022 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | MUTABLE_VERSION ?= latest
6 | VERSION ?= $(shell git rev-parse --short HEAD)
7 |
8 | IMAGE_PROD := gcr.io/symbolic-datum-552/vcs-test
9 | IMAGE_PROD_APACHE := gcr.io/symbolic-datum-552/vcs-test-apache
10 |
11 | docker-prod: Dockerfile Dockerfile.apache
12 | docker build --force-rm -f Dockerfile --tag=$(IMAGE_PROD):$(VERSION) ../
13 | docker tag $(IMAGE_PROD):$(VERSION) $(IMAGE_PROD):$(MUTABLE_VERSION)
14 | docker build --force-rm -f Dockerfile.apache --tag=$(IMAGE_PROD_APACHE):$(VERSION) ../
15 | docker tag $(IMAGE_PROD_APACHE):$(VERSION) $(IMAGE_PROD_APACHE):$(MUTABLE_VERSION)
16 |
17 | push-prod: docker-prod
18 | docker push $(IMAGE_PROD):$(VERSION)
19 | docker push $(IMAGE_PROD):$(MUTABLE_VERSION)
20 | docker push $(IMAGE_PROD_APACHE):$(VERSION)
21 | docker push $(IMAGE_PROD_APACHE):$(MUTABLE_VERSION)
22 |
23 |
24 | deploy-prod: push-prod
25 | go install golang.org/x/build/cmd/xb
26 | xb --prod kubectl --namespace prod set image deployment/vcs-test-deployment vcs-test=$(IMAGE_PROD):$(VERSION) apache=$(IMAGE_PROD_APACHE):$(VERSION)
27 |
--------------------------------------------------------------------------------
/devapp/deployment-staging.yaml:
--------------------------------------------------------------------------------
1 | # Copyright 2022 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | apiVersion: apps/v1
6 | kind: Deployment
7 | metadata:
8 | name: devapp-deployment
9 | spec:
10 | replicas: 2
11 | selector:
12 | matchLabels:
13 | app: devapp
14 | template:
15 | metadata:
16 | labels:
17 | app: devapp
18 | annotations:
19 | container.seccomp.security.alpha.kubernetes.io/devapp: docker/default
20 | container.apparmor.security.beta.kubernetes.io/devapp: runtime/default
21 | spec:
22 | containers:
23 | - name: devapp
24 | image: gcr.io/go-dashboard-dev/devapp:latest
25 | imagePullPolicy: Always
26 | command: ["/devapp", "-listen=:80", "-autocert-bucket=golang-devapp-dev-autocert"]
27 | readinessProbe:
28 | httpGet:
29 | path: /healthz
30 | port: 80
31 | ports:
32 | - containerPort: 80
33 | - containerPort: 443
34 | resources:
35 | requests:
36 | cpu: "1"
37 | memory: "2Gi"
38 | limits:
39 | memory: "4Gi"
40 |
--------------------------------------------------------------------------------
/cmd/coordinator/queues_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.16 && (linux || darwin)
6 | // +build go1.16
7 | // +build linux darwin
8 |
9 | package main
10 |
11 | import (
12 | "testing"
13 | "time"
14 | )
15 |
16 | func TestHumanDuration(t *testing.T) {
17 | cases := []struct {
18 | desc string
19 | duration string
20 | want string
21 | }{
22 | {
23 | desc: "format days",
24 | duration: "99h2m1s",
25 | want: "4d3h2m1s",
26 | },
27 | {
28 | desc: "handle tiny durations",
29 | duration: "1ns",
30 | want: "0s",
31 | },
32 | {
33 | desc: "handle seconds",
34 | duration: "3s",
35 | want: "3s",
36 | },
37 | }
38 | for _, c := range cases {
39 | t.Run(c.duration, func(t *testing.T) {
40 | d, err := time.ParseDuration(c.duration)
41 | if err != nil {
42 | t.Fatalf("time.ParseDuration(%q) = %q, %q, wanted no error", c.duration, d, err)
43 | }
44 | if got := humanDuration(d); got != c.want {
45 | t.Errorf("humanDuration(%v) = %q, wanted %q", d, got, c.want)
46 | }
47 | })
48 | }
49 | }
50 |
--------------------------------------------------------------------------------