Commit 2b6fd74f authored by Yakubov, Sergey's avatar Yakubov, Sergey
Browse files

fix google-authenticator params

parent eaa05151
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -15,12 +15,20 @@ after_script:
    - sudo chown -R gitlab-runner .

docker-build:
    variables:
        IMAGE_PREFIX: "/$CI_COMMIT_REF_NAME"
    rules:
        - if: $CI_COMMIT_REF_NAME == 'master'
          variables:
            IMAGE_PREFIX: ""
    stage: build
    script:
        - docker login --username=$CI_REGISTRY_USER --password=$CI_REGISTRY_PASSWORD $CI_REGISTRY
        - docker build -f server_side/Dockerfile -t $NO2FA_URL/$CI_COMMIT_REF_NAME:latest --target no2fa ./server_side
        - docker build -f server_side/Dockerfile -t $WITH2FA_URL/$CI_COMMIT_REF_NAME:latest --target with2fa ./server_side
        - docker push $NO2FA_URL/$CI_COMMIT_REF_NAME:latest
        - docker push $WITH2FA_URL/$CI_COMMIT_REF_NAME:latest
        - docker build -f server_side/Dockerfile -t no2fa --target no2fa ./server_side
        - docker build -f server_side/Dockerfile -t with2fa --target with2fa ./server_side
        - docker tag no2fa $NO2FA_URL$IMAGE_PREFIX:latest
        - docker tag with2fa $WITH2FA_URL$IMAGE_PREFIX:latest
        - docker push $NO2FA_URL$IMAGE_PREFIX:latest
        - docker push $WITH2FA_URL$IMAGE_PREFIX:latest
    tags:
        - rse-multi-builder
+2 −2
Original line number Diff line number Diff line
FROM ubuntu:latest AS no2fa

RUN apt-get update && apt-get install -y ssh libpam-python  curl python2
RUN apt-get update && apt-get install -y ssh libpam-python  curl python2 sudo
RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py && python2 get-pip.py 
RUN pip2 config set global.target /lib/python2.7 && pip2 install requests

+3 −5
Original line number Diff line number Diff line
#!/bin/bash
set -e

su test
chown test: -R /home/test

if [ ! -e "/home/test/auth_secrets" ]; then
  bash -c "google-authenticator -t -d -f -W -u" > /home/test/auth_secrets
  su test bash -c "google-authenticator -t -d -f -W -u -C" > /home/test/auth_secrets
fi


su root

cd /tmp/oidc
python2 /tmp/oidc/update_oidc_config.py