Skip to content

Commit

Permalink
chore: Update IC dependency and rustc version
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa-tomic committed Mar 1, 2023
1 parent d32c208 commit 093f701
Show file tree
Hide file tree
Showing 20 changed files with 392 additions and 252 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ site

# Sensitive credentials
*-credentials.yaml
target/
rs/target/
rs/*/target/
*.pem
Expand Down
45 changes: 37 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
default:
image: registry.gitlab.com/dfinity-lab/core/release/ci-build@sha256:d0d2195ba8637185d22a1fbb7863e6145a2f0404a3c4a70b20e4e7fd6016dcea
image: registry.gitlab.com/dfinity-lab/core/release/ci-build@sha256:69753f4aeae90531e1b01c9aaa849e0b04267383ea4e5c36b50d409e207e316c
tags:
# Use the Dfinity CI runners (they have following tags)
# Use the DFINITY CI runners (they have following tags)
- dfinity
- docker
- ubuntu
Expand Down Expand Up @@ -114,7 +114,7 @@ before_script:
# forget original timestamp/timestamp when compressing ~ important for reproducibility
export GZIP=-n
# alpine image don't have git nor rsync
# alpine images do not have: git, sudo, rsync, ...
if [[ -n "$(which apk)" ]]; then
apk add rsync sudo git
fi
Expand All @@ -127,7 +127,8 @@ before_script:
fi
# Set the IC repo URL to https instead of ssh, and check out the submodule
sudo chown ubuntu:ubuntu -R .
sudo chown ubuntu:ubuntu -R .
ls -la
git submodule set-url ic "https://github.com/dfinity/ic.git"
if ! git submodule update --init --recursive --remote; then
cat .git/config
Expand Down Expand Up @@ -516,8 +517,22 @@ qualify-release:

metrics-proxy-release:
stage: release
extends:
- .rules-default
needs: []
dependencies: []
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: # auto run if there are changes in this dir
- metrics-proxy
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: manual # manual runs otherwise on MRs
allow_failure: true # the pipeline continues running even if the manual job is not run
- if: '$CI_PIPELINE_SOURCE == "web"'
when: manual
allow_failure: true # the pipeline continues running even if the manual job is not run
- if: '$CI_PIPELINE_SOURCE == "trigger"'
when: manual
allow_failure: true # the pipeline continues running even if the manual job is not run
- if: '$CI_PIPELINE_SOURCE == "push"'
interruptible: true
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
Expand All @@ -534,8 +549,22 @@ metrics-proxy-release:

linear-jira-release:
stage: release
extends:
- .rules-default
needs: []
dependencies: []
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: # auto run if there are changes in this dir
- linear-jira
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: manual # manual runs otherwise on MRs
allow_failure: true # the pipeline continues running even if the manual job is not run
- if: '$CI_PIPELINE_SOURCE == "web"'
when: manual
allow_failure: true # the pipeline continues running even if the manual job is not run
- if: '$CI_PIPELINE_SOURCE == "trigger"'
when: manual
allow_failure: true # the pipeline continues running even if the manual job is not run
- if: '$CI_PIPELINE_SOURCE == "push"'
interruptible: true
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ ENV RUSTUP_HOME=/opt/rustup \
PATH=/opt/cargo/bin:$PATH

# Make sure /rust-toolchain.toml has the same version
ARG rust_version=1.60.0
ARG rust_version=1.65.0
RUN curl --fail https://sh.rustup.rs -sSf \
| sh -s -- -y --default-toolchain ${rust_version}-x86_64-unknown-linux-gnu --no-modify-path && \
rustup default ${rust_version}-x86_64-unknown-linux-gnu && \
Expand All @@ -134,6 +134,7 @@ RUN gpg --batch --keyserver hkp:https://keyserver.ubuntu.com:80 --recv-keys 595E85A6B1

# Used to detect the Dockerfile changes and automatically rebuild the image
COPY docker /docker
COPY --from=docker/buildx-bin:latest /buildx /usr/libexec/docker/cli-plugins/docker-buildx

# Download ic-admin
ARG ic_git_revision=344a20409415f65a494cb4dc2f9241b687c34868
Expand Down
6 changes: 4 additions & 2 deletions docker/docker-update-image.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,16 @@ def repo_changes_push():
if not git_branch:
_print_magenta("Cannot find git branch. Cannot push changes.")
return
print("Active git branch", git_branch)
git_repo.git.checkout(git_branch)
git_repo.config_writer().set_value("pull", "rebase", "true").release()
git_repo.config_writer().set_value("rebase", "autoStash", "true").release()
git_repo.config_writer().set_value("user", "name", "Release Team").release()
git_repo.config_writer().set_value(
"user", "email", "[email protected]"
).release()
git_repo.git.stash()
print("Active git branch", git_branch)
git_repo.git.checkout(git_branch)
git_repo.git.stash("pop")
# Update the remote URL to include the token with the write access
origin = git_repo.remotes.origin
remote_url = list(origin.urls)[0]
Expand Down
Loading

0 comments on commit 093f701

Please sign in to comment.