Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Go version in Docker, and re-enable SCC/Scorecard #2957

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ RUN set -x \
&& /opt/venv/bin/pip install wheel \
&& /opt/venv/bin/pip install .

RUN ./scripts/docker/install-go.sh
ENV PATH="${PATH}:/usr/local/go/bin"
RUN ./scripts/docker/install-workers-deps.sh

RUN ./scripts/docker/install-go.sh
# RUN ./scripts/install/workers.sh

RUN mkdir -p repos/ logs/ /augur/facade/
Expand Down
16 changes: 8 additions & 8 deletions scripts/docker/install-go.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
# install Go
installGo() (
cd "$(mktemp -d)"
wget https://golang.org/dl/go1.16.5.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz
)
installGo
export PATH=$PATH:/usr/local/go/bin

export VERSION="1.22.9"

cd "$(mktemp -d)"
wget https://golang.org/dl/go${VERSION}.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go${VERSION}.linux-amd64.tar.gz

export PATH=$PATH:/usr/local/go/bin
23 changes: 22 additions & 1 deletion scripts/docker/install-workers-deps.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -x

OLD=$(pwd)
for i in $(find . | grep -i setup.py);
do

cd $(dirname $i)
/opt/venv/bin/pip install .
cd $OLD
Expand All @@ -14,3 +14,24 @@ done
for i in stopwords punkt popular universal_tagset ; do
/opt/venv/bin/python -m nltk.downloader $i
done

# Note this
CURRENT_DIR=$PWD;

# Install scc
SCC_DIR="$HOME/scc"
echo "Cloning Sloc Cloc and Code (SCC) to generate value data ..."
git clone https://github.com/boyter/scc "$SCC_DIR"
cd $SCC_DIR
go build;
echo "scc build done"
cd $CURRENT_DIR

# Install scorecard
SCORECARD_DIR="$HOME/scorecard"
echo "Cloning OSSF Scorecard to generate scorecard data ..."
git clone https://github.com/ossf/scorecard $SCORECARD_DIR
cd $SCORECARD_DIR
go build;
echo "scorecard build done"
cd $CURRENT_DIR
Loading